emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/eshell/esh-module.el,v


From: Glenn Morris
Subject: [Emacs-diffs] Changes to emacs/lisp/eshell/esh-module.el,v
Date: Wed, 21 May 2008 03:49:48 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       08/05/21 03:49:48

Index: esh-module.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/eshell/esh-module.el,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -b -r1.22 -r1.23
--- esh-module.el       6 May 2008 03:36:20 -0000       1.22
+++ esh-module.el       21 May 2008 03:49:48 -0000      1.23
@@ -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 <address@hidden>
 ;; 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:
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]