comparison lisp/hippie-exp.el @ 30645:4706d5e24141

(try-expand-line, try-expand-line-all-buffers): Only use comint-prompt-regexp if comint-use-prompt-regexp-instead-of-fields is non-nil.
author Miles Bader <miles@gnu.org>
date Mon, 07 Aug 2000 14:57:22 +0000
parents e10a1d0deb4b
children b174db545cfd
comparison
equal deleted inserted replaced
30644:ce7385745191 30645:4706d5e24141
632 The argument OLD has to be nil the first call of this function, and t 632 The argument OLD has to be nil the first call of this function, and t
633 for subsequent calls (for further possible completions of the same 633 for subsequent calls (for further possible completions of the same
634 string). It returns t if a new completion is found, nil otherwise." 634 string). It returns t if a new completion is found, nil otherwise."
635 (let ((expansion ()) 635 (let ((expansion ())
636 (strip-prompt (and (get-buffer-process (current-buffer)) 636 (strip-prompt (and (get-buffer-process (current-buffer))
637 comint-use-prompt-regexp-instead-of-fields
637 comint-prompt-regexp))) 638 comint-prompt-regexp)))
638 (if (not old) 639 (if (not old)
639 (progn 640 (progn
640 (he-init-string (he-line-beg strip-prompt) (point)) 641 (he-init-string (he-line-beg strip-prompt) (point))
641 (set-marker he-search-loc he-string-beg) 642 (set-marker he-search-loc he-string-beg)
678 The argument OLD has to be nil the first call of this function, and t 679 The argument OLD has to be nil the first call of this function, and t
679 for subsequent calls (for further possible completions of the same 680 for subsequent calls (for further possible completions of the same
680 string). It returns t if a new completion is found, nil otherwise." 681 string). It returns t if a new completion is found, nil otherwise."
681 (let ((expansion ()) 682 (let ((expansion ())
682 (strip-prompt (and (get-buffer-process (current-buffer)) 683 (strip-prompt (and (get-buffer-process (current-buffer))
684 comint-use-prompt-regexp-instead-of-fields
683 comint-prompt-regexp)) 685 comint-prompt-regexp))
684 (buf (current-buffer)) 686 (buf (current-buffer))
685 (orig-case-fold-search case-fold-search)) 687 (orig-case-fold-search case-fold-search))
686 (if (not old) 688 (if (not old)
687 (progn 689 (progn
704 (save-restriction 706 (save-restriction
705 (if hippie-expand-no-restriction 707 (if hippie-expand-no-restriction
706 (widen)) 708 (widen))
707 (goto-char he-search-loc) 709 (goto-char he-search-loc)
708 (setq strip-prompt (and (get-buffer-process (current-buffer)) 710 (setq strip-prompt (and (get-buffer-process (current-buffer))
711 comint-use-prompt-regexp-instead-of-fields
709 comint-prompt-regexp)) 712 comint-prompt-regexp))
710 (setq expansion 713 (setq expansion
711 (let ((case-fold-search orig-case-fold-search)) 714 (let ((case-fold-search orig-case-fold-search))
712 (he-line-search he-search-string 715 (he-line-search he-search-string
713 strip-prompt nil))) 716 strip-prompt nil)))