diff options
| author | Simon Marshall | 1995-06-02 07:42:12 +0000 |
|---|---|---|
| committer | Simon Marshall | 1995-06-02 07:42:12 +0000 |
| commit | 4288965cef96a22f5f7b1a59cb1cb0c9ef70a6de (patch) | |
| tree | 1e7cb661b26c1306e7ff66d7053ece55b1862968 | |
| parent | 04486a2df2cf62fd8c944a131c84a9c808daaaab (diff) | |
| download | emacs-4288965cef96a22f5f7b1a59cb1cb0c9ef70a6de.tar.gz emacs-4288965cef96a22f5f7b1a59cb1cb0c9ef70a6de.zip | |
Don't go forward over a word-char if we're at bob, and set match-data.
| -rw-r--r-- | lisp/comint.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index de0d63a50db..6897ae6511d 100644 --- a/lisp/comint.el +++ b/lisp/comint.el | |||
| @@ -1848,10 +1848,15 @@ inside of a \"[...]\" (see `skip-chars-forward')." | |||
| 1848 | (let ((non-word-chars (concat "[^\\\\" word-chars "]")) (here (point))) | 1848 | (let ((non-word-chars (concat "[^\\\\" word-chars "]")) (here (point))) |
| 1849 | (while (and (re-search-backward non-word-chars nil 'move) | 1849 | (while (and (re-search-backward non-word-chars nil 'move) |
| 1850 | ;(memq (char-after (point)) shell-file-name-quote-list) | 1850 | ;(memq (char-after (point)) shell-file-name-quote-list) |
| 1851 | (not (bolp)) (eq (char-after (1- (point))) ?\\)) | 1851 | (eq (preceding-char) ?\\)) |
| 1852 | (backward-char 1)) | 1852 | (backward-char 1)) |
| 1853 | (forward-char 1) | 1853 | ;; Don't go forward over a word-char (this can happen if we're at bob). |
| 1854 | (and (< (point) here) (buffer-substring (point) here))))) | 1854 | (if (or (not (bobp)) (looking-at non-word-chars)) |
| 1855 | (forward-char 1)) | ||
| 1856 | ;; Set match-data to match the entire string. | ||
| 1857 | (if (< (point) here) | ||
| 1858 | (progn (store-match-data (list (point) here)) | ||
| 1859 | (match-string 0)))))) | ||
| 1855 | 1860 | ||
| 1856 | 1861 | ||
| 1857 | (defun comint-match-partial-filename () | 1862 | (defun comint-match-partial-filename () |