Mercurial > emacs
comparison lisp/emulation/viper-mous.el @ 22285:2e952bf93040
(viper-surrounding-word): Added '_' to alpha modifiers.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Sat, 30 May 1998 14:29:44 +0000 |
parents | f44ff2c52fac |
children | 4f315ca65976 |
comparison
equal
deleted
inserted
replaced
22284:7c92be9aea04 | 22285:2e952bf93040 |
---|---|
156 For convenience, in Lisp modes, `-' is considered alphanumeric. | 156 For convenience, in Lisp modes, `-' is considered alphanumeric. |
157 | 157 |
158 If CLICK-COUNT is 3 or more, returns the line clicked on with leading and | 158 If CLICK-COUNT is 3 or more, returns the line clicked on with leading and |
159 trailing space and tabs removed. In that case, the first argument, COUNT, | 159 trailing space and tabs removed. In that case, the first argument, COUNT, |
160 is ignored." | 160 is ignored." |
161 (let ((modifiers "") | 161 (let ((modifiers "_") |
162 beg skip-flag result | 162 beg skip-flag result |
163 word-beg) | 163 word-beg) |
164 (if (> click-count 2) | 164 (if (> click-count 2) |
165 (save-excursion | 165 (save-excursion |
166 (beginning-of-line) | 166 (beginning-of-line) |
173 (or (save-excursion (viper-backward-char-carefully) | 173 (or (save-excursion (viper-backward-char-carefully) |
174 (viper-looking-at-alpha)) | 174 (viper-looking-at-alpha)) |
175 (save-excursion (viper-forward-char-carefully) | 175 (save-excursion (viper-forward-char-carefully) |
176 (viper-looking-at-alpha)))) | 176 (viper-looking-at-alpha)))) |
177 (setq modifiers | 177 (setq modifiers |
178 (cond ((looking-at "\\\\") "\\\\") | 178 (concat modifiers |
179 ((looking-at "-") "C-C-") | 179 (cond ((looking-at "\\\\") "\\\\") |
180 ((looking-at "[][]") "][") | 180 ((looking-at "-") "C-C-") |
181 ((looking-at "[()]") ")(") | 181 ((looking-at "[][]") "][") |
182 ((looking-at "[{}]") "{}") | 182 ((looking-at "[()]") ")(") |
183 ((looking-at "[<>]") "<>") | 183 ((looking-at "[{}]") "{}") |
184 ((looking-at "[`']") "`'") | 184 ((looking-at "[<>]") "<>") |
185 ((looking-at "\\^") "\\^") | 185 ((looking-at "[`']") "`'") |
186 ((viper-looking-at-separator) "") | 186 ((looking-at "\\^") "\\^") |
187 (t (char-to-string (following-char)))) | 187 ((viper-looking-at-separator) "") |
188 (t (char-to-string (following-char)))) | |
189 ) | |
188 )) | 190 )) |
189 | 191 |
190 ;; Add `-' to alphanum, if it wasn't added and if we are in Lisp | 192 ;; Add `-' to alphanum, if it wasn't added and if we are in Lisp |
191 (or (looking-at "-") | 193 (or (looking-at "-") |
192 (not (string-match "lisp" (symbol-name major-mode))) | 194 (not (string-match "lisp" (symbol-name major-mode))) |