Mercurial > emacs
changeset 63139:be61de52f953
(ispell-check-version): Use match-string-no-properties.
(ispell-region, ispell-buffer-local-parsing, ispell-buffer-local-dict)
(ispell-buffer-local-words): Likewise.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 08 Jun 2005 15:45:34 +0000 |
parents | 2a347143dae3 |
children | bd94b75dbfe8 |
files | lisp/textmodes/ispell.el |
diffstat | 1 files changed, 8 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/textmodes/ispell.el Wed Jun 08 15:43:59 2005 +0000 +++ b/lisp/textmodes/ispell.el Wed Jun 08 15:45:34 2005 +0000 @@ -796,19 +796,16 @@ nil t) case-fold-search case-fold-search-val) (if (or (not status) ; major version mismatch - (< (car (read-from-string (buffer-substring-no-properties - (match-beginning 2) (match-end 2)))) + (< (car (read-from-string (match-string-no-properties 2))) (car (cdr ispell-required-version)))) ; minor version mismatch (error "%s version 3 release %d.%d.%d or greater is required" ispell-program-name (car ispell-required-version) (car (cdr ispell-required-version)) (car (cdr (cdr ispell-required-version)))) ;; check that it is the correct version. - (if (and (= (car (read-from-string (buffer-substring-no-properties - (match-beginning 2)(match-end 2)))) + (if (and (= (car (read-from-string (match-string-no-properties 2))) (car (cdr ispell-required-version))) - (< (car (read-from-string (buffer-substring-no-properties - (match-beginning 3)(match-end 3)))) + (< (car (read-from-string (match-string-no-properties 3))) (car (cdr (cdr ispell-required-version))))) (setq ispell-offset 0)) ;; Check to see if it's really aspell. @@ -2567,9 +2564,7 @@ (ispell-begin-skip-region-regexp) ispell-region-end t)) (progn - (setq key (buffer-substring-no-properties - (car (match-data)) - (car (cdr (match-data))))) + (setq key (match-string-no-properties 0)) (set-marker skip-region-start (- (point) (length key))) (goto-char rstart)) @@ -3510,8 +3505,7 @@ (search-forward ispell-parsing-keyword) (while (re-search-forward " *\\([^ \"]+\\)" end t) ;; space separated definitions. - (setq string (downcase (buffer-substring-no-properties - (match-beginning 1) (match-end 1)))) + (setq string (downcase (match-string-no-properties 1))) (cond ((and (string-match "latex-mode" string) (not (eq 'exclusive ispell-check-comments))) (ispell-send-string "+\n~tex\n")) @@ -3544,8 +3538,7 @@ (setq end (save-excursion (end-of-line) (point))) (if (re-search-forward " *\\([^ \"]+\\)" end t) (setq ispell-local-dictionary - (buffer-substring-no-properties (match-beginning 1) - (match-end 1))))))) + (match-string-no-properties 1)))))) (goto-char (point-max)) (if (search-backward ispell-pdict-keyword nil t) (progn @@ -3553,8 +3546,7 @@ (setq end (save-excursion (end-of-line) (point))) (if (re-search-forward " *\\([^ \"]+\\)" end t) (setq ispell-local-pdict - (buffer-substring-no-properties (match-beginning 1) - (match-end 1)))))))) + (match-string-no-properties 1))))))) ;; Reload if new personal dictionary defined. (if (and ispell-local-pdict (not (equal ispell-local-pdict ispell-personal-dictionary))) @@ -3584,8 +3576,7 @@ ;; buffer-local words separated by a space, and can contain ;; any character other than a space. Not rigorous enough. (while (re-search-forward " *\\([^ ]+\\)" end t) - (setq string (buffer-substring-no-properties (match-beginning 1) - (match-end 1))) + (setq string (match-string-no-properties 1)) ;; This can fail when string contains a word with illegal chars. ;; Error handling needs to be added between ispell and emacs. (if (and (< 1 (length string))