Show
Ignore:
Timestamp:
09/30/06 09:12:06 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp

    • Property svn:ignore changed from
      *.elc
      MANIFEST
      Makefile
      Makefile.unix
      makefile
      elc.tar.gz
      cus-load.el
      finder-inf.el
      subdirs.el
      loaddefs.el
      to
      *.elc
      MANIFEST
      Makefile
      Makefile.unix
      makefile
      elc.tar.gz
      cus-load.el
      finder-inf.el
      subdirs.el
      loaddefs.el
      pre-mh-loaddefs.el-CMD
  • trunk/lisp/isearch.el

    r4111 r4169  
    18081808 
    18091809  ;; Append the char to the search string, update the message and re-search. 
    1810   (if (char-table-p translation-table-for-input) 
    1811       (setq char (or (aref translation-table-for-input char) char))) 
    18121810  (isearch-process-search-string 
    18131811   (char-to-string char) 
     
    19941992      (if isearch-forward 'search-forward 'search-backward))))) 
    19951993 
     1994(defun isearch-search-string (string bound noerror) 
     1995  ;; Search for the first occurance of STRING or its translation.  If 
     1996  ;; found, move point to the end of the occurance, update 
     1997  ;; isearch-match-beg and isearch-match-end, and return point. 
     1998  (let ((func (isearch-search-fun)) 
     1999        (len (length string)) 
     2000        pos1 pos2) 
     2001    (setq pos1 (save-excursion (funcall func string bound noerror))) 
     2002    (if (and (char-table-p translation-table-for-input) 
     2003             (> (string-bytes string) len)) 
     2004        (let (translated match-data) 
     2005          (dotimes (i len) 
     2006            (let ((x (aref translation-table-for-input (aref string i)))) 
     2007              (when x 
     2008                (or translated (setq translated (copy-sequence string))) 
     2009                (aset translated i x)))) 
     2010          (when translated 
     2011            (save-match-data 
     2012              (save-excursion 
     2013                (if (setq pos2 (funcall func translated bound noerror)) 
     2014                    (setq match-data (match-data t))))) 
     2015            (when (and pos2 
     2016                       (or (not pos1) 
     2017                           (if isearch-forward (< pos2 pos1) (> pos2 pos1)))) 
     2018              (setq pos1 pos2) 
     2019              (set-match-data match-data))))) 
     2020    (if pos1 
     2021        (goto-char pos1)) 
     2022    pos1)) 
     2023 
    19962024(defun isearch-search () 
    19972025  ;; Do the search with the current search string. 
     
    20092037        (while retry 
    20102038          (setq isearch-success 
    2011                 (funcall 
    2012                  (isearch-search-fun) 
    2013                  isearch-string nil t)) 
     2039                (isearch-search-string isearch-string nil t)) 
    20142040          ;; Clear RETRY unless we matched some invisible text 
    20152041          ;; and we aren't supposed to do that. 
     
    23542380        (search-spaces-regexp search-whitespace-regexp)) 
    23552381    (condition-case nil 
    2356         (funcall (isearch-search-fun) 
     2382        (isearch-search-string 
    23572383                 isearch-lazy-highlight-last-string 
    23582384                 (if isearch-forward