project-switch-commands
" "))
-(defun project--switch-project-command ()
+(defun project--switch-project-command (&optional dir)
(let* ((commands-menu
(mapcar
(lambda (row)
(propertize "Unrecognized input"
'face 'warning)
(help-key-description choice nil)))))
- (setq choice (read-key-sequence (concat "Choose: " prompt)))
+ (setq choice (read-key-sequence (concat
+ (if dir
+ (format-message "Command in `%s': "
+ (propertize
+ dir 'face
+ 'font-lock-string-face))
+ "Command: ")
+ prompt)))
(when (setq command (lookup-key commands-map choice))
(when (numberp command) (setq command nil))
(unless (or project-switch-use-entire-map
(project--remember-dir dir)
(let ((command (if (symbolp project-switch-commands)
project-switch-commands
- (project--switch-project-command)))
+ (project--switch-project-command dir)))
(buffer (current-buffer)))
(unwind-protect
(progn