Mercurial > hg > xemacs-beta
comparison lisp/prim/minibuf.el @ 48:56c54cf7c5b6 r19-16b90
Import from CVS: tag r19-16b90
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:56:04 +0200 |
parents | 4103f0995bd7 |
children | 131b0175ea99 |
comparison
equal
deleted
inserted
replaced
47:11c6df210d7f | 48:56c54cf7c5b6 |
---|---|
265 (defvar minibuffer-history-position) | 265 (defvar minibuffer-history-position) |
266 | 266 |
267 (defvar minibuffer-history-minimum-string-length 3 | 267 (defvar minibuffer-history-minimum-string-length 3 |
268 "If this variable is non-nil, a string will not be added to the | 268 "If this variable is non-nil, a string will not be added to the |
269 minibuffer history if its length is less than that value.") | 269 minibuffer history if its length is less than that value.") |
270 | |
271 (define-error 'input-error "Keyboard input error") | |
270 | 272 |
271 (defun read-from-minibuffer (prompt &optional initial-contents | 273 (defun read-from-minibuffer (prompt &optional initial-contents |
272 keymap | 274 keymap |
273 readp | 275 readp |
274 history | 276 history |
418 (error "Trailing garbage following expression")))) | 420 (error "Trailing garbage following expression")))) |
419 (setq v (car v)) | 421 (setq v (car v)) |
420 ;; total total kludge | 422 ;; total total kludge |
421 (if (stringp v) (setq v (list 'quote v))) | 423 (if (stringp v) (setq v (list 'quote v))) |
422 (setq val v)) | 424 (setq val v)) |
423 (error (setq err e)))) | 425 (end-of-file |
426 (setq err | |
427 '(input-error "End of input before end of expression"))) | |
428 (error (setq err e)))) | |
424 ;; Add the value to the appropriate history list unless | 429 ;; Add the value to the appropriate history list unless |
425 ;; it's already the most recent element, or it's only | 430 ;; it's already the most recent element, or it's only |
426 ;; two characters long. | 431 ;; two characters long. |
427 (if (and (symbolp minibuffer-history-variable) | 432 (if (and (symbolp minibuffer-history-variable) |
428 (boundp minibuffer-history-variable)) | 433 (boundp minibuffer-history-variable)) |
1762 result) | 1767 result) |
1763 (t file)))) | 1768 (t file)))) |
1764 | 1769 |
1765 (defun mouse-file-display-completion-list (window dir minibuf user-data) | 1770 (defun mouse-file-display-completion-list (window dir minibuf user-data) |
1766 (let ((standard-output (window-buffer window))) | 1771 (let ((standard-output (window-buffer window))) |
1767 (display-completion-list | 1772 (condition-case nil |
1768 (directory-files dir nil nil nil t) | 1773 (display-completion-list |
1769 :window-width (* 2 (window-width window)) | 1774 (directory-files dir nil nil nil t) |
1770 :activate-callback | 1775 :window-width (* 2 (window-width window)) |
1771 'mouse-read-file-name-activate-callback | 1776 :activate-callback |
1772 :user-data user-data | 1777 'mouse-read-file-name-activate-callback |
1773 :reference-buffer minibuf | 1778 :user-data user-data |
1774 :help-string ""))) | 1779 :reference-buffer minibuf |
1780 :help-string "") | |
1781 (t nil)))) | |
1775 | 1782 |
1776 (defun mouse-directory-display-completion-list (window dir minibuf user-data) | 1783 (defun mouse-directory-display-completion-list (window dir minibuf user-data) |
1777 (let ((standard-output (window-buffer window))) | 1784 (let ((standard-output (window-buffer window))) |
1778 (display-completion-list | 1785 (condition-case nil |
1779 (delete "." (directory-files dir nil nil nil 1)) | 1786 (display-completion-list |
1780 :window-width (window-width window) | 1787 (delete "." (directory-files dir nil nil nil 1)) |
1781 :activate-callback | 1788 :window-width (window-width window) |
1782 'mouse-read-file-name-activate-callback | 1789 :activate-callback |
1783 :user-data user-data | 1790 'mouse-read-file-name-activate-callback |
1784 :reference-buffer minibuf | 1791 :user-data user-data |
1785 :help-string ""))) | 1792 :reference-buffer minibuf |
1793 :help-string "") | |
1794 (t nil)))) | |
1786 | 1795 |
1787 (defun mouse-read-file-name-activate-callback (event extent user-data) | 1796 (defun mouse-read-file-name-activate-callback (event extent user-data) |
1788 (let* ((file (extent-string extent)) | 1797 (let* ((file (extent-string extent)) |
1789 (minibuf (symbol-value-in-buffer 'completion-reference-buffer | 1798 (minibuf (symbol-value-in-buffer 'completion-reference-buffer |
1790 (extent-object extent))) | 1799 (extent-object extent))) |