comparison lisp/minibuf.el @ 294:4b85ae5eabfb r21-0b45

Import from CVS: tag r21-0b45
author cvs
date Mon, 13 Aug 2007 10:38:01 +0200
parents c9fe270a4101
children 9ea74add5d37
comparison
equal deleted inserted replaced
293:403535bfea94 294:4b85ae5eabfb
2073 (push (list dcase) clist))) 2073 (push (list dcase) clist)))
2074 (forward-char 1)) 2074 (forward-char 1))
2075 (kill-buffer (current-buffer)))) 2075 (kill-buffer (current-buffer))))
2076 (setq x-read-color-completion-table clist) 2076 (setq x-read-color-completion-table clist)
2077 x-read-color-completion-table))) 2077 x-read-color-completion-table)))
2078 (mswindows
2079 (mapcar #'list (mswindows-color-list)))
2078 (tty 2080 (tty
2079 (mapcar #'list (tty-color-list))))) 2081 (mapcar #'list (tty-color-list)))))
2080 2082
2081 (defun read-color (prompt &optional must-match initial-contents) 2083 (defun read-color (prompt &optional must-match initial-contents)
2082 "Read the name of a color from the minibuffer. 2084 "Read the name of a color from the minibuffer.
2083 On X devices, this uses `x-library-search-path' to find rgb.txt in order 2085 On X devices, this uses `x-library-search-path' to find rgb.txt in order
2084 to build a completion table. 2086 to build a completion table.
2085 On TTY devices, this uses `tty-color-list'." 2087 On TTY devices, this uses `tty-color-list'.
2088 On mswindows devices, this uses `mswindows-color-list'."
2086 (let ((table (read-color-completion-table))) 2089 (let ((table (read-color-completion-table)))
2087 (completing-read prompt table nil (and table must-match) 2090 (completing-read prompt table nil (and table must-match)
2088 initial-contents))) 2091 initial-contents)))
2089 2092
2090 2093