]> code.delx.au - gnu-emacs/blobdiff - lisp/eshell/em-prompt.el
Update copyright year to 2015
[gnu-emacs] / lisp / eshell / em-prompt.el
index 448d2cdf3030810a234a84cd405a9ae797507d2d..69c5bd62259dd17f94e50091be970b80bbea553b 100644 (file)
@@ -1,6 +1,6 @@
-;;; em-prompt.el --- command prompts
+;;; em-prompt.el --- command prompts  -*- lexical-binding:t -*-
 
-;; Copyright (C) 1999-201 Free Software Foundation, Inc.
+;; Copyright (C) 1999-2015 Free Software Foundation, Inc.
 
 ;; Author: John Wiegley <johnw@gnu.org>
 
 
 ;;; Code:
 
+(require 'esh-mode)
 (eval-when-compile (require 'eshell))
 
 ;;;###autoload
-(eshell-defgroup eshell-prompt nil
+(progn
+(defgroup eshell-prompt nil
   "This module provides command prompts, and navigation between them,
 as is common with most shells."
   :tag "Command prompts"
-  :group 'eshell-module)
+  :group 'eshell-module))
 
 ;;; User Variables:
 
-(defcustom eshell-prompt-load-hook '(eshell-prompt-initialize)
+(defcustom eshell-prompt-load-hook nil
   "A list of functions to call when loading `eshell-prompt'."
+  :version "24.1"                      ; removed eshell-prompt-initialize
   :type 'hook
   :group 'eshell-prompt)
 
+(autoload 'eshell/pwd "em-dirs")
+
 (defcustom eshell-prompt-function
   (function
    (lambda ()
@@ -68,9 +73,9 @@ re-entered for it to take effect."
   :group 'eshell-prompt)
 
 (defface eshell-prompt
-  '((((class color) (background light)) (:foreground "Red" :bold t))
-    (((class color) (background dark)) (:foreground "Pink" :bold t))
-    (t (:bold t)))
+  '((default :weight bold)
+    (((class color) (background light)) :foreground "Red")
+    (((class color) (background dark))  :foreground "Pink"))
   "The face used to highlight prompt strings.
 For highlighting other kinds of strings -- similar to shell mode's
 behavior -- simply use an output filer which changes text properties."
@@ -119,8 +124,9 @@ arriving, or after."
       (and eshell-highlight-prompt
           (add-text-properties 0 (length prompt)
                                '(read-only t
-                                 face eshell-prompt
-                                 rear-nonsticky (face read-only))
+                                 font-lock-face eshell-prompt
+                                 front-sticky (font-lock-face read-only)
+                                 rear-nonsticky (font-lock-face read-only))
                                prompt))
       (eshell-interactive-print prompt)))
   (run-hooks 'eshell-after-prompt-hook))