From ac268623e76eee4d835f4dfb8b54c2750b754310 Mon Sep 17 00:00:00 2001 From: Shawn Betts Date: Mon, 15 May 2006 22:20:08 +0000 Subject: [PATCH] [lice @ initial input] --- buffer.lisp | 4 ++++ minibuffer.lisp | 2 +- subr.lisp | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/buffer.lisp b/buffer.lisp index f7e3920..c8a3f9f 100644 --- a/buffer.lisp +++ b/buffer.lisp @@ -847,4 +847,8 @@ means that other_buffer is more likely to choose a relevant buffer." "Return t if object is an editor buffer." (typep object 'buffer)) +(defvar *default-directory* (truename "") + "Name of default directory of current buffer. +To interactively change the default directory, use command `cd'.") + (provide :lice-0.1/buffer) diff --git a/minibuffer.lisp b/minibuffer.lisp index 3fe798f..687eb55 100644 --- a/minibuffer.lisp +++ b/minibuffer.lisp @@ -145,7 +145,6 @@ MINIBUF must be a minibuffer." (delete-region end (zv minibuf))))) (defun setup-minibuffer-for-read (major-mode prompt initial-contents history) - (declare (ignore initial-contents)) (save-window-excursion ;; Create a new minibuffer (let* ((frame (selected-frame)) @@ -162,6 +161,7 @@ MINIBUF must be a minibuffer." (show-minibuffer-prompt frame prompt) ;; move to the end of input (setf (marker-position (buffer-point new-minibuffer)) (buffer-size new-minibuffer)) + (when initial-contents (insert initial-contents)) ;; enter recursive edit (dformat +debug-v+ "ya ohoe~%") (incf (frame-minibuffers-active frame)) diff --git a/subr.lisp b/subr.lisp index e718a16..4b95eed 100644 --- a/subr.lisp +++ b/subr.lisp @@ -137,7 +137,7 @@ provides a file dialog box. See also `read-file-name-completion-ignore-case' and `read-file-name-function'." (declare (ignore predicate initial mustmatch default-filename dir)) - (completing-read prompt #'file-completions)) + (completing-read prompt #'file-completions :initial-input (princ-to-string *default-directory*))) (defun region-limit (beginningp) "Return the start or end position of the region. -- 2.11.4.GIT