aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorVibhav Pant2020-08-21 14:04:35 +0530
committerVibhav Pant2020-08-21 14:04:35 +0530
commitf0f8d7b82492e741950c363a03b886965c91b1b0 (patch)
tree19b716830b1ebabc0d7d75949c4e6800c0f104ad /lisp/textmodes
parent9e64a087c4d167e7ec1c4e22bea3e6af53b563de (diff)
parentc818c29771d3cb51875643b2f6c894073e429dd2 (diff)
downloademacs-feature/native-comp-macos-fixes.tar.gz
emacs-feature/native-comp-macos-fixes.zip
Merge branch 'feature/native-comp' into feature/native-comp-macos-fixesfeature/native-comp-macos-fixes
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/bibtex.el1
-rw-r--r--lisp/textmodes/flyspell.el61
-rw-r--r--lisp/textmodes/ispell.el16
-rw-r--r--lisp/textmodes/remember.el3
4 files changed, 27 insertions, 54 deletions
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 0018b89d858..910bd7dbb9d 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -3445,6 +3445,7 @@ if that value is non-nil.
3445 (set (make-local-variable 'syntax-propertize-function) 3445 (set (make-local-variable 'syntax-propertize-function)
3446 (syntax-propertize-via-font-lock 3446 (syntax-propertize-via-font-lock
3447 bibtex-font-lock-syntactic-keywords)) 3447 bibtex-font-lock-syntactic-keywords))
3448 (bibtex-set-dialect nil t)
3448 ;; Allow `bibtex-dialect' as a file-local variable. 3449 ;; Allow `bibtex-dialect' as a file-local variable.
3449 (add-hook 'hack-local-variables-hook #'bibtex-set-dialect nil t)) 3450 (add-hook 'hack-local-variables-hook #'bibtex-set-dialect nil t))
3450 3451
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 39a1b488a74..23f96d7e0ee 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -57,7 +57,6 @@
57(defcustom flyspell-highlight-flag t 57(defcustom flyspell-highlight-flag t
58 "How Flyspell should indicate misspelled words. 58 "How Flyspell should indicate misspelled words.
59Non-nil means use highlight, nil means use minibuffer messages." 59Non-nil means use highlight, nil means use minibuffer messages."
60 :group 'flyspell
61 :type 'boolean) 60 :type 'boolean)
62 61
63(defcustom flyspell-mark-duplications-flag t 62(defcustom flyspell-mark-duplications-flag t
@@ -65,12 +64,10 @@ Non-nil means use highlight, nil means use minibuffer messages."
65See `flyspell-mark-duplications-exceptions' to add exceptions to this rule. 64See `flyspell-mark-duplications-exceptions' to add exceptions to this rule.
66Detection of repeated words is not implemented in 65Detection of repeated words is not implemented in
67\"large\" regions; see variable `flyspell-large-region'." 66\"large\" regions; see variable `flyspell-large-region'."
68 :group 'flyspell
69 :type 'boolean) 67 :type 'boolean)
70 68
71(defcustom flyspell-case-fold-duplications t 69(defcustom flyspell-case-fold-duplications t
72 "Non-nil means Flyspell matches duplicate words case-insensitively." 70 "Non-nil means Flyspell matches duplicate words case-insensitively."
73 :group 'flyspell
74 :type 'boolean 71 :type 'boolean
75 :version "27.1") 72 :version "27.1")
76 73
@@ -87,7 +84,6 @@ dictionary name (`ispell-local-dictionary' or
87 84
88EXCEPTION-LIST is a list of strings. The checked word is 85EXCEPTION-LIST is a list of strings. The checked word is
89downcased before comparing with these exceptions." 86downcased before comparing with these exceptions."
90 :group 'flyspell
91 :type '(alist :key-type (choice (const :tag "All dictionaries" nil) 87 :type '(alist :key-type (choice (const :tag "All dictionaries" nil)
92 regexp) 88 regexp)
93 :value-type (repeat string)) 89 :value-type (repeat string))
@@ -97,7 +93,6 @@ downcased before comparing with these exceptions."
97 "If non-nil, sort the corrections before popping them. 93 "If non-nil, sort the corrections before popping them.
98The sorting is controlled by the `flyspell-sort-corrections-function' 94The sorting is controlled by the `flyspell-sort-corrections-function'
99variable, and defaults to sorting alphabetically." 95variable, and defaults to sorting alphabetically."
100 :group 'flyspell
101 :version "21.1" 96 :version "21.1"
102 :type 'boolean) 97 :type 'boolean)
103 98
@@ -109,8 +104,7 @@ function takes three parameters -- the two correction candidates
109to be sorted, and the third parameter is the word that's being 104to be sorted, and the third parameter is the word that's being
110corrected." 105corrected."
111 :version "26.1" 106 :version "26.1"
112 :type 'function 107 :type 'function)
113 :group 'flyspell)
114 108
115(defun flyspell-sort-corrections-alphabetically (corr1 corr2 _) 109(defun flyspell-sort-corrections-alphabetically (corr1 corr2 _)
116 (string< corr1 corr2)) 110 (string< corr1 corr2))
@@ -130,14 +124,12 @@ Flyspell uses a different face (`flyspell-duplicate') to highlight it.
130This variable specifies how far to search to find such a duplicate. 124This variable specifies how far to search to find such a duplicate.
131-1 means no limit (search the whole buffer). 125-1 means no limit (search the whole buffer).
1320 means do not search for duplicate unrecognized spellings." 1260 means do not search for duplicate unrecognized spellings."
133 :group 'flyspell
134 :version "24.5" ; -1 -> 400000 127 :version "24.5" ; -1 -> 400000
135 :type '(choice (const :tag "no limit" -1) 128 :type '(choice (const :tag "no limit" -1)
136 number)) 129 number))
137 130
138(defcustom flyspell-delay 3 131(defcustom flyspell-delay 3
139 "The number of seconds to wait before checking, after a \"delayed\" command." 132 "The number of seconds to wait before checking, after a \"delayed\" command."
140 :group 'flyspell
141 :type 'number) 133 :type 'number)
142 134
143(defcustom flyspell-persistent-highlight t 135(defcustom flyspell-persistent-highlight t
@@ -147,12 +139,10 @@ is highlighted, and the highlight is turned off as soon as point moves
147off the misspelled word. 139off the misspelled word.
148 140
149Make sure this variable is non-nil if you use `flyspell-region'." 141Make sure this variable is non-nil if you use `flyspell-region'."
150 :group 'flyspell
151 :type 'boolean) 142 :type 'boolean)
152 143
153(defcustom flyspell-highlight-properties t 144(defcustom flyspell-highlight-properties t
154 "Non-nil means highlight incorrect words even if a property exists for this word." 145 "Non-nil means highlight incorrect words even if a property exists for this word."
155 :group 'flyspell
156 :type 'boolean) 146 :type 'boolean)
157 147
158(defcustom flyspell-default-delayed-commands 148(defcustom flyspell-default-delayed-commands
@@ -164,7 +154,6 @@ Make sure this variable is non-nil if you use `flyspell-region'."
164 backward-delete-char-untabify) 154 backward-delete-char-untabify)
165 "The standard list of delayed commands for Flyspell. 155 "The standard list of delayed commands for Flyspell.
166See `flyspell-delayed-commands'." 156See `flyspell-delayed-commands'."
167 :group 'flyspell
168 :version "21.1" 157 :version "21.1"
169 :type '(repeat (symbol))) 158 :type '(repeat (symbol)))
170 159
@@ -172,7 +161,6 @@ See `flyspell-delayed-commands'."
172 "List of commands that are \"delayed\" for Flyspell mode. 161 "List of commands that are \"delayed\" for Flyspell mode.
173After these commands, Flyspell checking is delayed for a short time, 162After these commands, Flyspell checking is delayed for a short time,
174whose length is specified by `flyspell-delay'." 163whose length is specified by `flyspell-delay'."
175 :group 'flyspell
176 :type '(repeat (symbol))) 164 :type '(repeat (symbol)))
177 165
178(defcustom flyspell-default-deplacement-commands 166(defcustom flyspell-default-deplacement-commands
@@ -182,7 +170,6 @@ whose length is specified by `flyspell-delay'."
182 scroll-down) 170 scroll-down)
183 "The standard list of deplacement commands for Flyspell. 171 "The standard list of deplacement commands for Flyspell.
184See variable `flyspell-deplacement-commands'." 172See variable `flyspell-deplacement-commands'."
185 :group 'flyspell
186 :version "21.1" 173 :version "21.1"
187 :type '(repeat (symbol))) 174 :type '(repeat (symbol)))
188 175
@@ -190,18 +177,15 @@ See variable `flyspell-deplacement-commands'."
190 "List of commands that are \"deplacement\" for Flyspell mode. 177 "List of commands that are \"deplacement\" for Flyspell mode.
191After these commands, Flyspell checking is performed only if the previous 178After these commands, Flyspell checking is performed only if the previous
192command was not the very same command." 179command was not the very same command."
193 :group 'flyspell
194 :version "21.1" 180 :version "21.1"
195 :type '(repeat (symbol))) 181 :type '(repeat (symbol)))
196 182
197(defcustom flyspell-issue-welcome-flag t 183(defcustom flyspell-issue-welcome-flag t
198 "Non-nil means that Flyspell should display a welcome message when started." 184 "Non-nil means that Flyspell should display a welcome message when started."
199 :group 'flyspell
200 :type 'boolean) 185 :type 'boolean)
201 186
202(defcustom flyspell-issue-message-flag t 187(defcustom flyspell-issue-message-flag t
203 "Non-nil means that Flyspell emits messages when checking words." 188 "Non-nil means that Flyspell emits messages when checking words."
204 :group 'flyspell
205 :type 'boolean) 189 :type 'boolean)
206 190
207(defcustom flyspell-incorrect-hook nil 191(defcustom flyspell-incorrect-hook nil
@@ -213,7 +197,6 @@ of possible corrections as returned by `ispell-parse-output'.
213 197
214If any of the functions return non-nil, the word is not highlighted as 198If any of the functions return non-nil, the word is not highlighted as
215incorrect." 199incorrect."
216 :group 'flyspell
217 :version "21.1" 200 :version "21.1"
218 :type 'hook) 201 :type 'hook)
219 202
@@ -225,14 +208,12 @@ when flyspell is started, the value of that variable is used instead
225of `flyspell-default-dictionary' to select the default dictionary. 208of `flyspell-default-dictionary' to select the default dictionary.
226Otherwise, if `flyspell-default-dictionary' is nil, it means to use 209Otherwise, if `flyspell-default-dictionary' is nil, it means to use
227Ispell's ultimate default dictionary." 210Ispell's ultimate default dictionary."
228 :group 'flyspell
229 :version "21.1" 211 :version "21.1"
230 :type '(choice string (const :tag "Default" nil))) 212 :type '(choice string (const :tag "Default" nil)))
231 213
232(defcustom flyspell-tex-command-regexp 214(defcustom flyspell-tex-command-regexp
233 "\\(\\(begin\\|end\\)[ \t]*{\\|\\(cite[a-z*]*\\|label\\|ref\\|eqref\\|usepackage\\|documentclass\\)[ \t]*\\(\\[[^]]*\\]\\)?{[^{}]*\\)" 215 "\\(\\(begin\\|end\\)[ \t]*{\\|\\(cite[a-z*]*\\|label\\|ref\\|eqref\\|usepackage\\|documentclass\\)[ \t]*\\(\\[[^]]*\\]\\)?{[^{}]*\\)"
234 "A string that is the regular expression that matches TeX commands." 216 "A string that is the regular expression that matches TeX commands."
235 :group 'flyspell
236 :version "21.1" 217 :version "21.1"
237 :type 'regexp) 218 :type 'regexp)
238 219
@@ -241,34 +222,29 @@ Ispell's ultimate default dictionary."
241TeX math environments are discovered by `texmathp', implemented 222TeX math environments are discovered by `texmathp', implemented
242inside AUCTeX package. That package may be found at 223inside AUCTeX package. That package may be found at
243URL `https://www.gnu.org/software/auctex/'" 224URL `https://www.gnu.org/software/auctex/'"
244 :group 'flyspell
245 :type 'boolean) 225 :type 'boolean)
246 226
247(defcustom flyspell-dictionaries-that-consider-dash-as-word-delimiter 227(defcustom flyspell-dictionaries-that-consider-dash-as-word-delimiter
248 '("francais" "deutsch8" "norsk") 228 '("francais" "deutsch8" "norsk")
249 "List of dictionary names that consider `-' as word delimiter." 229 "List of dictionary names that consider `-' as word delimiter."
250 :group 'flyspell
251 :version "21.1" 230 :version "21.1"
252 :type '(repeat (string))) 231 :type '(repeat (string)))
253 232
254(defcustom flyspell-abbrev-p 233(defcustom flyspell-abbrev-p
255 nil 234 nil
256 "If non-nil, add correction to abbreviation table." 235 "If non-nil, add correction to abbreviation table."
257 :group 'flyspell
258 :version "21.1" 236 :version "21.1"
259 :type 'boolean) 237 :type 'boolean)
260 238
261(defcustom flyspell-use-global-abbrev-table-p 239(defcustom flyspell-use-global-abbrev-table-p
262 nil 240 nil
263 "If non-nil, prefer global abbrev table to local abbrev table." 241 "If non-nil, prefer global abbrev table to local abbrev table."
264 :group 'flyspell
265 :version "21.1" 242 :version "21.1"
266 :type 'boolean) 243 :type 'boolean)
267 244
268(defcustom flyspell-mode-line-string " Fly" 245(defcustom flyspell-mode-line-string " Fly"
269 "String displayed on the mode line when flyspell is active. 246 "String displayed on the mode line when flyspell is active.
270Set this to nil if you don't want a mode line indicator." 247Set this to nil if you don't want a mode line indicator."
271 :group 'flyspell
272 :type '(choice string (const :tag "None" nil))) 248 :type '(choice string (const :tag "None" nil)))
273 249
274(defcustom flyspell-large-region 1000 250(defcustom flyspell-large-region 1000
@@ -282,30 +258,25 @@ Doubled words are not detected in a large region, because Ispell
282does not check for them. 258does not check for them.
283 259
284If this variable is nil, all regions are treated as small." 260If this variable is nil, all regions are treated as small."
285 :group 'flyspell
286 :version "21.1" 261 :version "21.1"
287 :type '(choice number (const :tag "All small" nil))) 262 :type '(choice number (const :tag "All small" nil)))
288 263
289(defcustom flyspell-insert-function (function insert) 264(defcustom flyspell-insert-function (function insert)
290 "Function for inserting word by flyspell upon correction." 265 "Function for inserting word by flyspell upon correction."
291 :group 'flyspell
292 :type 'function) 266 :type 'function)
293 267
294(defcustom flyspell-before-incorrect-word-string nil 268(defcustom flyspell-before-incorrect-word-string nil
295 "String used to indicate an incorrect word starting." 269 "String used to indicate an incorrect word starting."
296 :group 'flyspell
297 :type '(choice string (const nil))) 270 :type '(choice string (const nil)))
298 271
299(defcustom flyspell-after-incorrect-word-string nil 272(defcustom flyspell-after-incorrect-word-string nil
300 "String used to indicate an incorrect word ending." 273 "String used to indicate an incorrect word ending."
301 :group 'flyspell
302 :type '(choice string (const nil))) 274 :type '(choice string (const nil)))
303 275
304(defvar flyspell-mode-map) 276(defvar flyspell-mode-map)
305 277
306(defcustom flyspell-use-meta-tab t 278(defcustom flyspell-use-meta-tab t
307 "Non-nil means that flyspell uses M-TAB to correct word." 279 "Non-nil means that flyspell uses M-TAB to correct word."
308 :group 'flyspell
309 :type 'boolean 280 :type 'boolean
310 :initialize 'custom-initialize-default 281 :initialize 'custom-initialize-default
311 :set (lambda (sym val) 282 :set (lambda (sym val)
@@ -316,8 +287,7 @@ If this variable is nil, all regions are treated as small."
316(defcustom flyspell-auto-correct-binding 287(defcustom flyspell-auto-correct-binding
317 [(control ?\;)] 288 [(control ?\;)]
318 "The key binding for flyspell auto correction." 289 "The key binding for flyspell auto correction."
319 :type 'key-sequence 290 :type 'key-sequence)
320 :group 'flyspell)
321 291
322;;*---------------------------------------------------------------------*/ 292;;*---------------------------------------------------------------------*/
323;;* Mode specific options */ 293;;* Mode specific options */
@@ -475,6 +445,22 @@ like <img alt=\"Some thing.\">."
475 map) 445 map)
476 "Minor mode keymap for Flyspell mode--for the whole buffer.") 446 "Minor mode keymap for Flyspell mode--for the whole buffer.")
477 447
448;; correct on mouse 3
449(defun flyspell--set-use-mouse-3-for-menu (var value)
450 (set-default var value)
451 (if value
452 (progn (define-key flyspell-mouse-map [mouse-2] nil)
453 (define-key flyspell-mouse-map [down-mouse-3] 'flyspell-correct-word))
454 (define-key flyspell-mouse-map [mouse-2] 'flyspell-correct-word)
455 (define-key flyspell-mouse-map [down-mouse-3] nil)))
456
457(defcustom flyspell-use-mouse-3-for-menu nil
458 "Non-nil means to bind `mouse-3' to `flyspell-correct-word'.
459If this is set, also unbind `mouse-2'."
460 :type 'boolean
461 :set 'flyspell--set-use-mouse-3-for-menu
462 :version "28.1")
463
478;; dash character machinery 464;; dash character machinery
479(defvar flyspell-consider-dash-as-word-delimiter-flag nil 465(defvar flyspell-consider-dash-as-word-delimiter-flag nil
480 "Non-nil means that the `-' char is considered as a word delimiter.") 466 "Non-nil means that the `-' char is considered as a word delimiter.")
@@ -493,8 +479,7 @@ like <img alt=\"Some thing.\">."
493 (t 479 (t
494 :underline t :inherit error)) 480 :underline t :inherit error))
495 "Flyspell face for misspelled words." 481 "Flyspell face for misspelled words."
496 :version "24.4" 482 :version "24.4")
497 :group 'flyspell)
498 483
499(defface flyspell-duplicate 484(defface flyspell-duplicate
500 '((((supports :underline (:style wave))) 485 '((((supports :underline (:style wave)))
@@ -503,8 +488,7 @@ like <img alt=\"Some thing.\">."
503 :underline t :inherit warning)) 488 :underline t :inherit warning))
504 "Flyspell face for words that appear twice in a row. 489 "Flyspell face for words that appear twice in a row.
505See also `flyspell-duplicate-distance'." 490See also `flyspell-duplicate-distance'."
506 :version "24.4" 491 :version "24.4")
507 :group 'flyspell)
508 492
509(defvar flyspell-overlay nil) 493(defvar flyspell-overlay nil)
510 494
@@ -546,7 +530,10 @@ in your init file.
546 :group 'flyspell 530 :group 'flyspell
547 (if flyspell-mode 531 (if flyspell-mode
548 (condition-case err 532 (condition-case err
549 (flyspell-mode-on) 533 (progn
534 (when flyspell-use-mouse-3-for-menu
535 (flyspell--set-use-mouse-3-for-menu 'flyspell-use-mouse-3-for-menu t))
536 (flyspell-mode-on))
550 (error (message "Error enabling Flyspell mode:\n%s" (cdr err)) 537 (error (message "Error enabling Flyspell mode:\n%s" (cdr err))
551 (flyspell-mode -1))) 538 (flyspell-mode -1)))
552 (flyspell-mode-off))) 539 (flyspell-mode-off)))
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 65f61644b6d..b2ccbc8da24 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -621,15 +621,6 @@ For Aspell, non-nil also means to try to automatically find its dictionaries.
621Earlier Aspell versions do not consistently support charset encoding. Handling 621Earlier Aspell versions do not consistently support charset encoding. Handling
622this would require some extra guessing in `ispell-aspell-find-dictionary'.") 622this would require some extra guessing in `ispell-aspell-find-dictionary'.")
623 623
624(defvar ispell-aspell-supports-utf8 nil
625 "Non-nil if Aspell has consistent command line UTF-8 support. Obsolete.
626ispell.el and flyspell.el will use for this purpose the more generic
627variable `ispell-encoding8-command' for both Aspell and Hunspell. Is left
628here just for backwards compatibility.")
629
630(make-obsolete-variable 'ispell-aspell-supports-utf8
631 'ispell-encoding8-command "23.1")
632
633(defvar ispell-dicts-name2locale-equivs-alist 624(defvar ispell-dicts-name2locale-equivs-alist
634 '(("american" "en_US") 625 '(("american" "en_US")
635 ("brasileiro" "pt_BR") 626 ("brasileiro" "pt_BR")
@@ -682,9 +673,7 @@ Otherwise returns the library directory name, if that is defined."
682 ;; all versions, since versions earlier than 3.0.09 didn't identify 673 ;; all versions, since versions earlier than 3.0.09 didn't identify
683 ;; themselves on startup. 674 ;; themselves on startup.
684 (interactive "p") 675 (interactive "p")
685 (let ((default-directory (or (and (boundp 'temporary-file-directory) 676 (let ((default-directory (or temporary-file-directory default-directory))
686 temporary-file-directory)
687 default-directory))
688 (get-config-var 677 (get-config-var
689 (lambda (var) 678 (lambda (var)
690 (when (re-search-forward 679 (when (re-search-forward
@@ -3734,8 +3723,7 @@ looking for a dictionary, please see the distribution of the GNU ispell
3734program, or do an Internet search; there are various dictionaries 3723program, or do an Internet search; there are various dictionaries
3735available on the net." 3724available on the net."
3736 (interactive) 3725 (interactive)
3737 (if (and (boundp 'transient-mark-mode) transient-mark-mode 3726 (if (and transient-mark-mode mark-active)
3738 (boundp 'mark-active) mark-active)
3739 (ispell-region (region-beginning) (region-end)) 3727 (ispell-region (region-beginning) (region-end))
3740 (ispell-buffer))) 3728 (ispell-buffer)))
3741 3729
diff --git a/lisp/textmodes/remember.el b/lisp/textmodes/remember.el
index 279dbb4450c..7bc7dc1762e 100644
--- a/lisp/textmodes/remember.el
+++ b/lisp/textmodes/remember.el
@@ -487,9 +487,6 @@ Most useful for remembering things from other applications."
487 (interactive) 487 (interactive)
488 (remember-region (point-min) (point-max))) 488 (remember-region (point-min) (point-max)))
489 489
490;; Org needs this
491(define-obsolete-function-alias 'remember-buffer 'remember-finalize "23.1")
492
493(defun remember-destroy () 490(defun remember-destroy ()
494 "Destroy the current *Remember* buffer." 491 "Destroy the current *Remember* buffer."
495 (interactive) 492 (interactive)