From 06ca5129c4c925108dec126d75abb55dbc49103c Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 18 Oct 2013 15:16:13 +0900 Subject: [PATCH] slight performance improvement --- emacs.el | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/emacs.el b/emacs.el index a54002f..d020bc9 100644 --- a/emacs.el +++ b/emacs.el @@ -2062,12 +2062,23 @@ this is test, does not rename files" ;; ".") ;; " Stupid!"))) +(defvar my-system-info + nil + "System info in the form of \"[user@host] \".") +(setq my-system-info + (concat "[" + user-login-name + "@" + (car (split-string system-name + "\\.")) + "] ")) + (defadvice read-from-minibuffer (before info-in-prompt activate) (ad-set-arg 0 - (concat "[" user-login-name "@" system-name "] " + (concat my-system-info (ad-get-arg 0)))) (defadvice read-string (before info-in-prompt activate) (ad-set-arg 0 - (concat "[" user-login-name "@" system-name "] " + (concat my-system-info (ad-get-arg 0))))