diff options
| author | Richard M. Stallman | 1997-05-19 01:01:25 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-05-19 01:01:25 +0000 |
| commit | 6f0b000cf676338352f2fb75d7979b7ba376057f (patch) | |
| tree | 17d8330fced6ea853cdb5465a7bbdded31142660 | |
| parent | acc35c361fa20cd41212fd376173c7cc3b8e62ac (diff) | |
| download | emacs-6f0b000cf676338352f2fb75d7979b7ba376057f.tar.gz emacs-6f0b000cf676338352f2fb75d7979b7ba376057f.zip | |
(dabbrev-expand, dabbrev--abbrev-at-point)
(dabbrev--search): Use buffer-substring-no-properties.
| -rw-r--r-- | lisp/dabbrev.el | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/lisp/dabbrev.el b/lisp/dabbrev.el index ed2d37eb662..1d789a06b3b 100644 --- a/lisp/dabbrev.el +++ b/lisp/dabbrev.el | |||
| @@ -493,9 +493,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." | |||
| 493 | ;; as our expansion this time. | 493 | ;; as our expansion this time. |
| 494 | (re-search-forward | 494 | (re-search-forward |
| 495 | (concat "\\(\\(" dabbrev--abbrev-char-regexp "\\)+\\)")) | 495 | (concat "\\(\\(" dabbrev--abbrev-char-regexp "\\)+\\)")) |
| 496 | (setq expansion | 496 | (setq expansion (buffer-substring-no-properties |
| 497 | (buffer-substring dabbrev--last-expansion-location | 497 | dabbrev--last-expansion-location (point))) |
| 498 | (point))) | ||
| 499 | (if dabbrev--last-case-pattern | 498 | (if dabbrev--last-case-pattern |
| 500 | (setq expansion (upcase expansion))) | 499 | (setq expansion (upcase expansion))) |
| 501 | 500 | ||
| @@ -624,8 +623,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." | |||
| 624 | (error "No possible abbreviation preceding point")))) | 623 | (error "No possible abbreviation preceding point")))) |
| 625 | ;; Now find the beginning of that one. | 624 | ;; Now find the beginning of that one. |
| 626 | (dabbrev--goto-start-of-abbrev) | 625 | (dabbrev--goto-start-of-abbrev) |
| 627 | (buffer-substring dabbrev--last-abbrev-location | 626 | (buffer-substring-no-properties |
| 628 | (point)))) | 627 | dabbrev--last-abbrev-location (point)))) |
| 629 | 628 | ||
| 630 | ;;; Initializes all global variables | 629 | ;;; Initializes all global variables |
| 631 | (defun dabbrev--reset-global-variables () | 630 | (defun dabbrev--reset-global-variables () |
| @@ -884,8 +883,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." | |||
| 884 | nil | 883 | nil |
| 885 | ;; We have a truly valid match. Find the end. | 884 | ;; We have a truly valid match. Find the end. |
| 886 | (re-search-forward pattern2) | 885 | (re-search-forward pattern2) |
| 887 | (setq found-string | 886 | (setq found-string (buffer-substring-no-properties |
| 888 | (buffer-substring (match-beginning 1) (match-end 1))) | 887 | (match-beginning 1) (match-end 1))) |
| 889 | (and ignore-case (setq found-string (downcase found-string))) | 888 | (and ignore-case (setq found-string (downcase found-string))) |
| 890 | ;; Ignore this match if it's already in the table. | 889 | ;; Ignore this match if it's already in the table. |
| 891 | (if (dabbrev-filter-elements | 890 | (if (dabbrev-filter-elements |
| @@ -900,8 +899,8 @@ See also `dabbrev-abbrev-char-regexp' and \\[dabbrev-completion]." | |||
| 900 | (if found-string | 899 | (if found-string |
| 901 | ;; Put it into `dabbrev--last-table' | 900 | ;; Put it into `dabbrev--last-table' |
| 902 | ;; and return it (either downcased, or as is). | 901 | ;; and return it (either downcased, or as is). |
| 903 | (let ((result | 902 | (let ((result (buffer-substring-no-properties |
| 904 | (buffer-substring (match-beginning 0) (match-end 0)))) | 903 | (match-beginning 0) (match-end 0)))) |
| 905 | (setq dabbrev--last-table | 904 | (setq dabbrev--last-table |
| 906 | (cons found-string dabbrev--last-table)) | 905 | (cons found-string dabbrev--last-table)) |
| 907 | (if (and ignore-case (eval dabbrev-case-replace)) | 906 | (if (and ignore-case (eval dabbrev-case-replace)) |