;; -*- emacs-lisp -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; $Id: emacs_minibuffer.el,v 1.2 2006-11-06 21:02:42 rscholz Exp $ ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; Cabo's minibuffer ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Kommandos fuer den Minibuffer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun scroll-completions-down (&optional arg) (interactive "p") (save-excursion (save-selected-window (let ((compwin (get-buffer-window "*Completions*"))) (if compwin (progn (select-window compwin) (call-interactively 'scroll-down))))))) (defun scroll-completions-up (&optional arg) (interactive "p") (save-excursion (save-selected-window (let ((compwin (get-buffer-window "*Completions*"))) (if compwin (progn (select-window compwin) (call-interactively 'scroll-up))))))) (defun ins-buffer-file-name (relative) "Insert the file name of the current buffer into the minibuffer." (interactive "*P") ;; We assume that the second entry in the buffer list is the "real" ;; current buffer, since "(current-buffer)" just returns the ;; minibuffer we're in. This is obviously wrong for recursive ;; minibuffer excursions. (let ((fn (buffer-file-name (car (cdr (buffer-list)))))) (if fn (if (and relative (= 0 (string-match (regexp-quote (expand-file-name default-directory)) fn))) (insert (substring fn (match-end 0))) (insert fn)) (beep)))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Fixes fuer Filename-Completion im Minibuffer ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (autoload 'comint-dynamic-complete-filename "comint" "Dynamically complete the filename at point." t) (setq cabo:shell-minibuffer-local-map (copy-keymap minibuffer-local-map)) (define-key cabo:shell-minibuffer-local-map "\C-i" 'comint-dynamic-complete-filename)