Mercurial > emacs
changeset 95149:1b1b163d3028
No need for cl when compiling.
Require eshell, for eshell-defgroup.
(eshell-load-defgroups): Remove.
Require esh-groups rather than loading it.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 21 May 2008 03:49:48 +0000 |
parents | 97ef76fbfb23 |
children | 7986c1ee0292 |
files | lisp/eshell/esh-module.el |
diffstat | 1 files changed, 4 insertions(+), 60 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/eshell/esh-module.el Wed May 21 02:32:31 2008 +0000 +++ b/lisp/eshell/esh-module.el Wed May 21 03:49:48 2008 +0000 @@ -1,7 +1,7 @@ ;;; esh-module.el --- Eshell modules -;; Copyright (C) 1999, 2000, 2002, 2003, 2004, -;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007, +;; 2008 Free Software Foundation, Inc. ;; Author: John Wiegley <johnw@gnu.org> ;; Keywords: processes @@ -25,10 +25,7 @@ (provide 'esh-module) -(eval-when-compile - (require 'cl) - (require 'esh-util)) - +(require 'eshell) (require 'esh-util) (defgroup eshell-module nil @@ -38,63 +35,10 @@ :tag "Extension modules" :group 'eshell) -(eval-and-compile -(defun eshell-load-defgroups (&optional directory) - "Load `defgroup' statements from Eshell's module files." - (let ((vc-handled-backends nil)) ; avoid VC fucking things up - (with-current-buffer - (find-file-noselect (expand-file-name "esh-groups.el" directory)) - (erase-buffer) - (insert ";;; do not modify this file; it is auto-generated -*- no-byte-compile: t -*-\n\n") - (let ((files (directory-files (or directory - (car command-line-args-left)) - nil "\\`em-.*\\.el\\'"))) - (while files - (message "Loading defgroup from `%s'" (car files)) - (let (defgroup) - (catch 'handled - (with-current-buffer (find-file-noselect (car files)) - (goto-char (point-min)) - (while t - (forward-sexp) - (if (eobp) (throw 'handled t)) - (backward-sexp) - (let ((begin (point)) - (defg (looking-at "(defgroup"))) - (forward-sexp) - (if defg - (setq defgroup (buffer-substring begin (point)))))))) - (if defgroup - (insert defgroup "\n\n"))) - (setq files (cdr files)))) - ;; Don't make backups, to avoid prompting the user if there are - ;; excess backup versions. - (save-buffer 0))))) - ;; load the defgroup's for the standard extension modules, so that ;; documentation can be provided when the user customize's ;; `eshell-modules-list'. -(eval-when-compile - (when (and (boundp 'byte-compile-current-file) - byte-compile-current-file - (or - (equal (file-name-nondirectory byte-compile-current-file) - "esh-module.el") - ;; When eshell file names are expanded from a wildcard - ;; or by reading the Eshell directory, e.g. when they - ;; say "make recompile" in the lisp directory, Emacs on - ;; MS-DOS sees a truncated name "esh-modu.el" instead of - ;; "esh-module.el". - (and (fboundp 'msdos-long-file-names) - (null (msdos-long-file-names)) - (equal (file-name-nondirectory byte-compile-current-file) - "esh-modu.el")))) - (let* ((directory (file-name-directory byte-compile-current-file)) - (elc-file (expand-file-name "esh-groups.elc" directory))) - (eshell-load-defgroups directory) - (if (file-exists-p elc-file) (delete-file elc-file))))) - -(load "esh-groups" t t) +(require 'esh-groups) ;;; User Variables: