[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
isearch-mode doesn't back up on \{0,n\}
From: |
Stuart D. Herring |
Subject: |
isearch-mode doesn't back up on \{0,n\} |
Date: |
Mon, 22 Sep 2003 02:53:40 -0600 |
In GNU Emacs 21.3.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2003-04-29 on quattro
configured using `configure --prefix=/usr/lanl --with-x --with-xpm --with-jpeg
--with-tiff --with-png'
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: en_US
locale-coding-system: iso-latin-1
default-enable-multibyte-characters: t
isearch-mode's special handling for * and ? appears to need extension to the
\{\} repetition construct, as it, too, liberalizes a search (if 0 is the lower
bound on the repeat count, anyway). Unfortunately it cannot simply be
remapped to isearch-*-char as backslashes disable * and ? but enable }!
However, with the following change in isearch-*-char, adding
(define-key map "}" 'isearch-*-char)
to the definition of isearch-mode-map should be sufficient.
(when (= (mod (- (length isearch-string) idx) 2) 0)
=>
(when (= (mod (- (length isearch-string) idx) 2)
(if (eq last-command-char ?\}) 1 0))
There may be a more elegant way to handle the }-check, though -- perhaps an
alternate, similar function.
Thanks in advance, and happy debugging,
Davis Herring
Recent input:
ESC C-s d i \ { 0 , 2 \ } C-r C-r C-r RET ESC x e m
a c s ESC DEL r e p o r t - e m a c s TAB RET
Recent messages:
Loading advice...done
Loading tool-bar...done
Loading image...done
For information about the GNU Project and its goals, type C-h C-p.
Loading tex-mode...
Loading easy-mmode...done
Loading mule-util...done
Loading tex-mode...done
Mark saved where search started
Loading emacsbug...done
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- isearch-mode doesn't back up on \{0,n\},
Stuart D. Herring <=