(other-window 1))
(goto-char found-point))
;; Keep same hscrolling as at the start of the search when possible
- (let ((current-scroll (window-hscroll)))
+ (let ((current-scroll (window-hscroll))
+ visible-p)
(set-window-hscroll (selected-window) isearch-start-hscroll)
- (unless (pos-visible-in-window-p)
- (set-window-hscroll (selected-window) current-scroll))))
+ (setq visible-p (pos-visible-in-window-p nil nil t))
+ (if (or (not visible-p)
+ ;; When point is not visible because of hscroll,
+ ;; pos-visible-in-window-p returns non-nil, but
+ ;; the X coordinate it returns is 1 pixel beyond
+ ;; the last visible one.
+ (>= (car visible-p) (window-body-width nil t)))
+ (set-window-hscroll (selected-window) current-scroll))))
(if isearch-other-end
(if (< isearch-other-end (point)) ; isearch-forward?
(isearch-highlight isearch-other-end (point))
(lambda ()
(if (or (= (char-syntax (or (char-after) 0)) ?w)
(= (char-syntax (or (char-after (1+ (point))) 0)) ?w))
- (if (and (boundp 'subword-mode) subword-mode)
+ (if (or (and (boundp 'subword-mode) subword-mode)
+ (and (boundp 'superword-mode) superword-mode))
(subword-forward 1)
(forward-word 1))
- (forward-char 1)) (point))))
+ (forward-char 1))
+ (point))))
(defun isearch-yank-word (&optional arg)
"Pull next word from buffer into search string.
"word ")
"")
(if isearch-regexp "regexp " "")
- (if multi-isearch-next-buffer-current-function "multi " "")
+ (cond
+ (multi-isearch-file-list "multi-file ")
+ (multi-isearch-buffer-list "multi-buffer ")
+ (t ""))
(or isearch-message-prefix-add "")
(if nonincremental "search" "I-search")
(if isearch-forward "" " backward")
(defun isearch-text-char-description (c)
(cond
- ((< c ?\s) (propertize (format "^%c" (+ c 64)) 'face 'escape-glyph))
- ((= c ?\^?) (propertize "^?" 'face 'escape-glyph))
+ ((< c ?\s) (propertize
+ (char-to-string c)
+ 'display (propertize (format "^%c" (+ c 64)) 'face 'escape-glyph)))
+ ((= c ?\^?) (propertize
+ (char-to-string c)
+ 'display (propertize "^?" 'face 'escape-glyph)))
(t (char-to-string c))))
;; General function to unread characters or events.