diff options
| author | Joakim Verona | 2013-01-22 00:03:23 +0100 |
|---|---|---|
| committer | Joakim Verona | 2013-01-22 00:03:23 +0100 |
| commit | 2adf26f58a2435bcbd7f925f7e1208ceda907520 (patch) | |
| tree | c010555fabe45beeb3028cb03a64c53abae093a5 /lisp/textmodes | |
| parent | 9054ae6b57b275be298a919a3aed506f950409b6 (diff) | |
| parent | bb677ef7449aba3c2d5d7ede8cc4b87814f01ab3 (diff) | |
| download | emacs-2adf26f58a2435bcbd7f925f7e1208ceda907520.tar.gz emacs-2adf26f58a2435bcbd7f925f7e1208ceda907520.zip | |
auto upstream
Diffstat (limited to 'lisp/textmodes')
| -rw-r--r-- | lisp/textmodes/ispell.el | 83 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-cite.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-vars.el | 12 |
3 files changed, 91 insertions, 6 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 52e97b8248d..dbcf3910db8 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -773,6 +773,41 @@ here just for backwards compatibility.") | |||
| 773 | (make-obsolete-variable 'ispell-aspell-supports-utf8 | 773 | (make-obsolete-variable 'ispell-aspell-supports-utf8 |
| 774 | 'ispell-encoding8-command "23.1") | 774 | 'ispell-encoding8-command "23.1") |
| 775 | 775 | ||
| 776 | (defvar ispell-hunspell-dictionary-equivs-alist | ||
| 777 | '(("american" "en_US") | ||
| 778 | ("brasileiro" "pt_BR") | ||
| 779 | ("british" "en_GB") | ||
| 780 | ("castellano" "es_ES") | ||
| 781 | ("castellano8" "es_ES") | ||
| 782 | ("czech" "cs_CZ") | ||
| 783 | ("dansk" "da_DK") | ||
| 784 | ("deutsch" "de_DE") | ||
| 785 | ("deutsch8" "de_DE") | ||
| 786 | ("english" "en_US") | ||
| 787 | ("esperanto" "eo") | ||
| 788 | ("esperanto-tex" "eo") | ||
| 789 | ("finnish" "fi_FI") | ||
| 790 | ("francais7" "fr_FR") | ||
| 791 | ("francais" "fr_FR") | ||
| 792 | ("francais-tex" "fr_FR") | ||
| 793 | ("german" "de_DE") | ||
| 794 | ("german8" "de_DE") | ||
| 795 | ("italiano" "it_IT") | ||
| 796 | ("nederlands" "nl_NL") | ||
| 797 | ("nederlands8" "nl_NL") | ||
| 798 | ("norsk" "nn_NO") | ||
| 799 | ("norsk7-tex" "nn_NO") | ||
| 800 | ("polish" "pl_PL") | ||
| 801 | ("portugues" "pt_PT") | ||
| 802 | ("russian" "ru_RU") | ||
| 803 | ("russianw" "ru_RU") | ||
| 804 | ("slovak" "sk_SK") | ||
| 805 | ("slovenian" "sl_SI") | ||
| 806 | ("svenska" "sv_SE") | ||
| 807 | ("hebrew" "he_IL")) | ||
| 808 | "Alist with matching hunspell dict names for standard dict names in | ||
| 809 | `ispell-dictionary-base-alist'.") | ||
| 810 | |||
| 776 | (defvar ispell-emacs-alpha-regexp | 811 | (defvar ispell-emacs-alpha-regexp |
| 777 | (if (string-match "^[[:alpha:]]+$" "abcde") | 812 | (if (string-match "^[[:alpha:]]+$" "abcde") |
| 778 | "[[:alpha:]]" | 813 | "[[:alpha:]]" |
| @@ -1134,9 +1169,57 @@ aspell is used along with Emacs).") | |||
| 1134 | ispell-encoding8-command) | 1169 | ispell-encoding8-command) |
| 1135 | ispell-aspell-dictionary-alist | 1170 | ispell-aspell-dictionary-alist |
| 1136 | nil)) | 1171 | nil)) |
| 1172 | (ispell-dictionary-base-alist ispell-dictionary-base-alist) | ||
| 1137 | ispell-base-dicts-override-alist ; Override only base-dicts-alist | 1173 | ispell-base-dicts-override-alist ; Override only base-dicts-alist |
| 1138 | all-dicts-alist) | 1174 | all-dicts-alist) |
| 1139 | 1175 | ||
| 1176 | ;; While ispell and aspell (through aliases) use the traditional | ||
| 1177 | ;; dict naming originally expected by ispell.el, hunspell | ||
| 1178 | ;; uses locale based names with no alias. We need to map | ||
| 1179 | ;; standard names to locale based names to make default dict | ||
| 1180 | ;; definitions available for hunspell. | ||
| 1181 | (if ispell-really-hunspell | ||
| 1182 | (let (tmp-dicts-alist) | ||
| 1183 | (dolist (adict ispell-dictionary-base-alist) | ||
| 1184 | (let* ((dict-name (nth 0 adict)) | ||
| 1185 | (dict-equiv | ||
| 1186 | (cadr (assoc dict-name | ||
| 1187 | ispell-hunspell-dictionary-equivs-alist))) | ||
| 1188 | (ispell-args (nth 5 adict)) | ||
| 1189 | (ispell-args-has-d (member "-d" ispell-args)) | ||
| 1190 | skip-dict) | ||
| 1191 | ;; Remove "-d" option from `ispell-args' if present | ||
| 1192 | (if ispell-args-has-d | ||
| 1193 | (let ((ispell-args-after-d | ||
| 1194 | (cdr (cdr ispell-args-has-d))) | ||
| 1195 | (ispell-args-before-d | ||
| 1196 | (butlast ispell-args (length ispell-args-has-d)))) | ||
| 1197 | (setq ispell-args | ||
| 1198 | (nconc ispell-args-before-d | ||
| 1199 | ispell-args-after-d)))) | ||
| 1200 | ;; Unless default dict, re-add "-d" option with the mapped value | ||
| 1201 | (if dict-name | ||
| 1202 | (if dict-equiv | ||
| 1203 | (nconc ispell-args (list "-d" dict-equiv)) | ||
| 1204 | (message | ||
| 1205 | "ispell-set-spellchecker-params: Missing hunspell equiv for \"%s\". Skipping." | ||
| 1206 | dict-name) | ||
| 1207 | (setq skip-dict t))) | ||
| 1208 | |||
| 1209 | (unless skip-dict | ||
| 1210 | (add-to-list 'tmp-dicts-alist | ||
| 1211 | (list | ||
| 1212 | dict-name ; dict name | ||
| 1213 | (nth 1 adict) ; casechars | ||
| 1214 | (nth 2 adict) ; not-casechars | ||
| 1215 | (nth 3 adict) ; otherchars | ||
| 1216 | (nth 4 adict) ; many-otherchars-p | ||
| 1217 | ispell-args ; ispell-args | ||
| 1218 | (nth 6 adict) ; extended-character-mode | ||
| 1219 | (nth 7 adict) ; dict encoding | ||
| 1220 | )))) | ||
| 1221 | (setq ispell-dictionary-base-alist tmp-dicts-alist)))) | ||
| 1222 | |||
| 1140 | (run-hooks 'ispell-initialize-spellchecker-hook) | 1223 | (run-hooks 'ispell-initialize-spellchecker-hook) |
| 1141 | 1224 | ||
| 1142 | ;; Add dicts to ``ispell-dictionary-alist'' unless already present. | 1225 | ;; Add dicts to ``ispell-dictionary-alist'' unless already present. |
diff --git a/lisp/textmodes/reftex-cite.el b/lisp/textmodes/reftex-cite.el index 3b294e62b01..079101b56ee 100644 --- a/lisp/textmodes/reftex-cite.el +++ b/lisp/textmodes/reftex-cite.el | |||
| @@ -1043,6 +1043,7 @@ While entering the regexp, completion on knows citation keys is possible. | |||
| 1043 | ((= l ?k) (reftex-get-bib-field "key" entry)) | 1043 | ((= l ?k) (reftex-get-bib-field "key" entry)) |
| 1044 | ((= l ?m) (reftex-get-bib-field "month" entry)) | 1044 | ((= l ?m) (reftex-get-bib-field "month" entry)) |
| 1045 | ((= l ?n) (reftex-get-bib-field "number" entry)) | 1045 | ((= l ?n) (reftex-get-bib-field "number" entry)) |
| 1046 | ((= l ?N) (reftex-get-bib-field "note" entry)) | ||
| 1046 | ((= l ?o) (reftex-get-bib-field "organization" entry)) | 1047 | ((= l ?o) (reftex-get-bib-field "organization" entry)) |
| 1047 | ((= l ?p) (reftex-get-bib-field "pages" entry)) | 1048 | ((= l ?p) (reftex-get-bib-field "pages" entry)) |
| 1048 | ((= l ?P) (car (split-string | 1049 | ((= l ?P) (car (split-string |
| @@ -1050,6 +1051,7 @@ While entering the regexp, completion on knows citation keys is possible. | |||
| 1050 | "[- .]+"))) | 1051 | "[- .]+"))) |
| 1051 | ((= l ?s) (reftex-get-bib-field "school" entry)) | 1052 | ((= l ?s) (reftex-get-bib-field "school" entry)) |
| 1052 | ((= l ?u) (reftex-get-bib-field "publisher" entry)) | 1053 | ((= l ?u) (reftex-get-bib-field "publisher" entry)) |
| 1054 | ((= l ?U) (reftex-get-bib-field "url" entry)) | ||
| 1053 | ((= l ?r) (reftex-get-bib-field "address" entry)) | 1055 | ((= l ?r) (reftex-get-bib-field "address" entry)) |
| 1054 | ((= l ?t) (reftex-get-bib-field "title" entry)) | 1056 | ((= l ?t) (reftex-get-bib-field "title" entry)) |
| 1055 | ((= l ?T) (reftex-abbreviate-title | 1057 | ((= l ?T) (reftex-abbreviate-title |
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index db08ca3a514..2a5c9c55866 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el | |||
| @@ -1125,12 +1125,12 @@ In the format, the following percent escapes will be expanded. | |||
| 1125 | %e Works like %a, but on list of editor names. (%2e and %E work a well) | 1125 | %e Works like %a, but on list of editor names. (%2e and %E work a well) |
| 1126 | 1126 | ||
| 1127 | It is also possible to access all other BibTeX database fields: | 1127 | It is also possible to access all other BibTeX database fields: |
| 1128 | %b booktitle %c chapter %d edition %h howpublished | 1128 | %b booktitle %c chapter %d edition %h howpublished |
| 1129 | %i institution %j journal %k key %m month | 1129 | %i institution %j journal %k key %m month |
| 1130 | %n number %o organization %p pages %P first page | 1130 | %n number %N note %o organization %p pages |
| 1131 | %r address %s school %u publisher %t title | 1131 | %P first page %r address %s school %u publisher |
| 1132 | %v volume %y year | 1132 | %U url %t title %v volume %y year |
| 1133 | %B booktitle, abbreviated %T title, abbreviated | 1133 | %B booktitle, abbreviated %T title, abbreviated |
| 1134 | 1134 | ||
| 1135 | Usually, only %l is needed. The other stuff is mainly for the echo area | 1135 | Usually, only %l is needed. The other stuff is mainly for the echo area |
| 1136 | display, and for (setq reftex-comment-citations t). | 1136 | display, and for (setq reftex-comment-citations t). |