comparison lisp/minibuf.el @ 5473:ac37a5f7e5be

Merge with trunk.
author Mats Lidell <matsl@xemacs.org>
date Thu, 17 Mar 2011 23:42:59 +0100
parents 308d34e9f07d ed74d2ca7082
children 4dee0387b9de
comparison
equal deleted inserted replaced
5472:e79980ee5efe 5473:ac37a5f7e5be
1817 ;; An odd number of trailing $'s 1817 ;; An odd number of trailing $'s
1818 (let* ((start (match-beginning 3)) 1818 (let* ((start (match-beginning 3))
1819 (completion-ignore-case (file-system-ignore-case-p 1819 (completion-ignore-case (file-system-ignore-case-p
1820 (or dir default-directory))) 1820 (or dir default-directory)))
1821 (env (substring string 1821 (env (substring string
1822 (cond ((= start (length string)) 1822 (cond ((eql start (length string))
1823 ;; "...$" 1823 ;; "...$"
1824 start) 1824 start)
1825 ((= (aref string start) ?{) 1825 ((eql (aref string start) ?{)
1826 ;; "...${..." 1826 ;; "...${..."
1827 (1+ start)) 1827 (1+ start))
1828 (t 1828 (t
1829 start)))) 1829 start))))
1830 (head (substring string 0 (1- start))) 1830 (head (substring string 0 (1- start)))
2091 ;; (?? I wrote this comment above some time ago, 2091 ;; (?? I wrote this comment above some time ago,
2092 ;; and I don't understand what I'm referring to 2092 ;; and I don't understand what I'm referring to
2093 ;; any more. --ben 2093 ;; any more. --ben
2094 (lambda () 2094 (lambda ()
2095 (mouse-rfn-setup-vars prompt) 2095 (mouse-rfn-setup-vars prompt)
2096 (when-boundp #'scrollbar-width 2096 (when-boundp 'scrollbar-width
2097 (set-specifier scrollbar-width 0 (current-buffer))) 2097 (set-specifier scrollbar-width 0 (current-buffer)))
2098 (setq truncate-lines t)))) 2098 (setq truncate-lines t))))
2099 2099
2100 (set-buffer filebuf) 2100 (set-buffer filebuf)
2101 (add-local-hook 'completion-setup-hook rfcshookfun) 2101 (add-local-hook 'completion-setup-hook rfcshookfun)
2207 2207
2208 (defun read-non-nil-coding-system (prompt) 2208 (defun read-non-nil-coding-system (prompt)
2209 "Read a non-nil coding-system from the minibuffer. 2209 "Read a non-nil coding-system from the minibuffer.
2210 Prompt with string PROMPT." 2210 Prompt with string PROMPT."
2211 (let ((retval (intern ""))) 2211 (let ((retval (intern "")))
2212 (while (= 0 (length (symbol-name retval))) 2212 (while (eql 0 (length (symbol-name retval)))
2213 (setq retval (intern (completing-read prompt obarray 2213 (setq retval (intern (completing-read prompt obarray
2214 'find-coding-system 2214 'find-coding-system
2215 t)))) 2215 t))))
2216 retval)) 2216 retval))
2217 2217
2343 (if res (return (third (car res))) 2343 (if res (return (third (car res)))
2344 (message "%s%s(%s) %s" pre question possible 2344 (message "%s%s(%s) %s" pre question possible
2345 (single-key-description event)) 2345 (single-key-description event))
2346 (ding nil 'y-or-n-p) 2346 (ding nil 'y-or-n-p)
2347 (discard-input) 2347 (discard-input)
2348 (if (= (length pre) 0) 2348 (if (eql (length pre) 0)
2349 (setq pre (format "Please answer %s. " 2349 (setq pre (format "Please answer %s. "
2350 ;; 17 parens! a record in 2350 ;; 17 parens! a record in
2351 ;; our lisp code. 2351 ;; our lisp code.
2352 possible))))))))))))))))) 2352 possible)))))))))))))))))
2353 2353