From f858866510d7a553cd386ca12d63464e65288670 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 18 Oct 2013 14:52:18 +0900 Subject: [PATCH] fix code --- emacs.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/emacs.el b/emacs.el index c472afb..a54002f 100644 --- a/emacs.el +++ b/emacs.el @@ -2062,9 +2062,12 @@ this is test, does not rename files" ;; ".") ;; " Stupid!"))) -;; show usename and hostname when prompting something in minibuffer -(defadvice read-from-minibuffer - (before message-for-stupid (prompt &rest args) activate) - (setq prompt - (concat "[" user-login-name "@" system-name "] " - prompt))) +(defadvice read-from-minibuffer (before info-in-prompt activate) + (ad-set-arg 0 + (concat "[" user-login-name "@" system-name "] " + (ad-get-arg 0)))) + +(defadvice read-string (before info-in-prompt activate) + (ad-set-arg 0 + (concat "[" user-login-name "@" system-name "] " + (ad-get-arg 0))))