diff options
| -rw-r--r-- | lisp/textmodes/ispell.el | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 554905c1c65..462cb32f521 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -132,10 +132,6 @@ | |||
| 132 | "User variables for Emacs ispell interface." | 132 | "User variables for Emacs ispell interface." |
| 133 | :group 'applications) | 133 | :group 'applications) |
| 134 | 134 | ||
| 135 | (if (not (fboundp 'buffer-substring-no-properties)) | ||
| 136 | (defun buffer-substring-no-properties (start end) | ||
| 137 | (buffer-substring start end))) | ||
| 138 | |||
| 139 | (defalias 'check-ispell-version 'ispell-check-version) | 135 | (defalias 'check-ispell-version 'ispell-check-version) |
| 140 | 136 | ||
| 141 | ;;; ********************************************************************** | 137 | ;;; ********************************************************************** |
| @@ -2300,15 +2296,15 @@ Global `ispell-quit' set to start location to continue spell session." | |||
| 2300 | ((= char ?i) ; accept and insert word into pers dict | 2296 | ((= char ?i) ; accept and insert word into pers dict |
| 2301 | (ispell-send-string (concat "*" word "\n")) | 2297 | (ispell-send-string (concat "*" word "\n")) |
| 2302 | (setq ispell-pdict-modified-p '(t)) ; dictionary modified! | 2298 | (setq ispell-pdict-modified-p '(t)) ; dictionary modified! |
| 2303 | (and (fboundp 'flyspell-unhighlight-at) | 2299 | (when (fboundp 'flyspell-unhighlight-at) |
| 2304 | (flyspell-unhighlight-at start)) | 2300 | (flyspell-unhighlight-at start)) |
| 2305 | nil) | 2301 | nil) |
| 2306 | ((or (= char ?a) (= char ?A)) ; accept word without insert | 2302 | ((or (= char ?a) (= char ?A)) ; accept word without insert |
| 2307 | (ispell-send-string (concat "@" word "\n")) | 2303 | (ispell-send-string (concat "@" word "\n")) |
| 2308 | (cl-pushnew word ispell-buffer-session-localwords | 2304 | (cl-pushnew word ispell-buffer-session-localwords |
| 2309 | :test #'equal) | 2305 | :test #'equal) |
| 2310 | (and (fboundp 'flyspell-unhighlight-at) | 2306 | (when (fboundp 'flyspell-unhighlight-at) |
| 2311 | (flyspell-unhighlight-at start)) | 2307 | (flyspell-unhighlight-at start)) |
| 2312 | (or ispell-buffer-local-name ; session localwords might conflict | 2308 | (or ispell-buffer-local-name ; session localwords might conflict |
| 2313 | (setq ispell-buffer-local-name (buffer-name))) | 2309 | (setq ispell-buffer-local-name (buffer-name))) |
| 2314 | (if (null ispell-pdict-modified-p) | 2310 | (if (null ispell-pdict-modified-p) |
| @@ -4259,8 +4255,8 @@ Both should not be used to define a buffer-local dictionary." | |||
| 4259 | 4255 | ||
| 4260 | ;; Returns optionally adjusted region-end-point. | 4256 | ;; Returns optionally adjusted region-end-point. |
| 4261 | 4257 | ||
| 4262 | ;; If comment-padright is defined, newcomment must be loaded. | 4258 | ;; If comment-normalize-vars is defined, newcomment must be loaded. |
| 4263 | (declare-function comment-add "newcomment" (arg)) | 4259 | (declare-function comment-normalize-vars "newcomment" (&optional noerror)) |
| 4264 | 4260 | ||
| 4265 | (defun ispell-add-per-file-word-list (word) | 4261 | (defun ispell-add-per-file-word-list (word) |
| 4266 | "Add WORD to the per-file word list." | 4262 | "Add WORD to the per-file word list." |
| @@ -4286,16 +4282,12 @@ Both should not be used to define a buffer-local dictionary." | |||
| 4286 | (unless found (newline)) | 4282 | (unless found (newline)) |
| 4287 | (insert (if comment-start | 4283 | (insert (if comment-start |
| 4288 | (concat | 4284 | (concat |
| 4289 | (if (fboundp 'comment-padright) | 4285 | (progn |
| 4290 | ;; Try and use the proper comment marker, | 4286 | ;; Try and use the proper comment marker, |
| 4291 | ;; e.g. ";;" rather than ";". | 4287 | ;; e.g. ";;" rather than ";". |
| 4292 | (progn | 4288 | (comment-normalize-vars) |
| 4293 | ;; XEmacs: comment-normalize-vars | 4289 | (comment-padright comment-start |
| 4294 | ;; (newcomment.el) only in >= 21.5 | 4290 | (comment-add nil)) |
| 4295 | (and (fboundp 'comment-normalize-vars) | ||
| 4296 | (comment-normalize-vars)) | ||
| 4297 | (comment-padright comment-start | ||
| 4298 | (comment-add nil))) | ||
| 4299 | comment-start) | 4291 | comment-start) |
| 4300 | " ") | 4292 | " ") |
| 4301 | "") | 4293 | "") |