annotate lisp/eshell/esh-module.el @ 86865:45f75b257517

*** empty log message ***
author Glenn Morris <rgm@gnu.org>
date Fri, 30 Nov 2007 08:34:29 +0000
parents 69eed007ab4b
children 24280fb751e3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38414
67b464da13ec Some fixes to follow coding conventions.
Pavel Janík <Pavel@Janik.cz>
parents: 33020
diff changeset
1 ;;; esh-module.el --- Eshell modules
29876
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
2
64701
34bd8e434dd7 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64085
diff changeset
3 ;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
75346
7a3f13e2dd57 Add 2007 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 68648
diff changeset
4 ;; 2005, 2006, 2007 Free Software Foundation, Inc.
29876
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
5
29898
8f071fd1161d Require CL when compiling.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 29876
diff changeset
6 ;; Author: John Wiegley <johnw@gnu.org>
8f071fd1161d Require CL when compiling.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 29876
diff changeset
7 ;; Keywords: processes
8f071fd1161d Require CL when compiling.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 29876
diff changeset
8
29876
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
9 ;; This file is part of GNU Emacs.
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
10
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
12 ;; it under the terms of the GNU General Public License as published by
78220
a1e8300d3c55 Switch license to GPLv3 or later.
Glenn Morris <rgm@gnu.org>
parents: 75346
diff changeset
13 ;; the Free Software Foundation; either version 3, or (at your option)
29876
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
14 ;; any later version.
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
15
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
16 ;; GNU Emacs is distributed in the hope that it will be useful,
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
19 ;; GNU General Public License for more details.
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
20
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
64085
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 56027
diff changeset
23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18a818a2ee7c Update FSF's address.
Lute Kamstra <lute@gnu.org>
parents: 56027
diff changeset
24 ;; Boston, MA 02110-1301, USA.
29876
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
25
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
26 (provide 'esh-module)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
27
33020
e21feeab77fb See ChangeLog
John Wiegley <johnw@newartisans.com>
parents: 32451
diff changeset
28 (eval-when-compile
e21feeab77fb See ChangeLog
John Wiegley <johnw@newartisans.com>
parents: 32451
diff changeset
29 (require 'esh-maint)
e21feeab77fb See ChangeLog
John Wiegley <johnw@newartisans.com>
parents: 32451
diff changeset
30 (require 'cl))
29876
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
31
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
32 (defgroup eshell-module nil
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
33 "The `eshell-module' group is for Eshell extension modules, which
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
34 provide optional behavior which the user can enable or disable by
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
35 customizing the variable `eshell-modules-list'."
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
36 :tag "Extension modules"
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
37 :group 'eshell)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
38
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
39 ;;; Commentary:
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
40
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
41 (require 'esh-util)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
42
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
43 (defun eshell-load-defgroups (&optional directory)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
44 "Load `defgroup' statements from Eshell's module files."
56027
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
45 (let ((vc-handled-backends nil)) ; avoid VC fucking things up
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
46 (with-current-buffer
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
47 (find-file-noselect (expand-file-name "esh-groups.el" directory))
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
48 (erase-buffer)
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
49 (insert ";;; do not modify this file; it is auto-generated -*- no-byte-compile: t -*-\n\n")
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
50 (let ((files (directory-files (or directory
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
51 (car command-line-args-left))
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
52 nil "\\`em-.*\\.el\\'")))
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
53 (while files
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
54 (message "Loading defgroup from `%s'" (car files))
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
55 (let (defgroup)
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
56 (catch 'handled
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
57 (with-current-buffer (find-file-noselect (car files))
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
58 (goto-char (point-min))
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
59 (while t
29876
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
60 (forward-sexp)
56027
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
61 (if (eobp) (throw 'handled t))
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
62 (backward-sexp)
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
63 (let ((begin (point))
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
64 (defg (looking-at "(defgroup")))
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
65 (forward-sexp)
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
66 (if defg
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
67 (setq defgroup (buffer-substring begin (point))))))))
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
68 (if defgroup
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
69 (insert defgroup "\n\n")))
a10d964838a7 Revision: miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-397
Miles Bader <miles@gnu.org>
parents: 52401
diff changeset
70 (setq files (cdr files))))
86198
69eed007ab4b (eshell-load-defgroups): Don't make backups when saving esh-groups.el.
Eli Zaretskii <eliz@gnu.org>
parents: 78220
diff changeset
71 ;; Don't make backups, to avoid prompting the user if there are
69eed007ab4b (eshell-load-defgroups): Don't make backups when saving esh-groups.el.
Eli Zaretskii <eliz@gnu.org>
parents: 78220
diff changeset
72 ;; excess backup versions.
69eed007ab4b (eshell-load-defgroups): Don't make backups when saving esh-groups.el.
Eli Zaretskii <eliz@gnu.org>
parents: 78220
diff changeset
73 (save-buffer 0))))
29876
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
74
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
75 ;; load the defgroup's for the standard extension modules, so that
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
76 ;; documentation can be provided when the user customize's
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
77 ;; `eshell-modules-list'.
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
78 (eval-when-compile
30141
570efb22ec0b (toplevel): Reference
Eli Zaretskii <eliz@gnu.org>
parents: 29944
diff changeset
79 (when (and (boundp 'byte-compile-current-file)
570efb22ec0b (toplevel): Reference
Eli Zaretskii <eliz@gnu.org>
parents: 29944
diff changeset
80 byte-compile-current-file
31327
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
81 (or
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
82 (equal (file-name-nondirectory byte-compile-current-file)
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
83 "esh-module.el")
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
84 ;; When eshell file names are expanded from a wildcard
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
85 ;; or by reading the Eshell directory, e.g. when they
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
86 ;; say "make recompile" in the lisp directory, Emacs on
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
87 ;; MS-DOS sees a truncated name "esh-modu.el" instead of
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
88 ;; "esh-module.el".
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
89 (and (fboundp 'msdos-long-file-names)
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
90 (null (msdos-long-file-names))
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
91 (equal (file-name-nondirectory byte-compile-current-file)
02375e0f6ea7 (eval-when-compile): Don't lose if esh-module.el's file name
Eli Zaretskii <eliz@gnu.org>
parents: 30141
diff changeset
92 "esh-modu.el"))))
29876
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
93 (let* ((directory (file-name-directory byte-compile-current-file))
33020
e21feeab77fb See ChangeLog
John Wiegley <johnw@newartisans.com>
parents: 32451
diff changeset
94 (elc-file (expand-file-name "esh-groups.elc" directory)))
29876
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
95 (eshell-load-defgroups directory)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
96 (if (file-exists-p elc-file) (delete-file elc-file)))))
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
97
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
98 (load "esh-groups" t t)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
99
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
100 ;;; User Variables:
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
101
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
102 (defcustom eshell-module-unload-hook
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
103 '(eshell-unload-extension-modules)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
104 "*A hook run when `eshell-module' is unloaded."
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
105 :type 'hook
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
106 :group 'eshell-module)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
107
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
108 (defcustom eshell-modules-list
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
109 '(eshell-alias
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
110 eshell-banner
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
111 eshell-basic
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
112 eshell-cmpl
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
113 eshell-dirs
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
114 eshell-glob
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
115 eshell-hist
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
116 eshell-ls
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
117 eshell-pred
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
118 eshell-prompt
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
119 eshell-script
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
120 eshell-term
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
121 eshell-unix)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
122 "*A list of optional add-on modules to be loaded by Eshell.
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
123 Changes will only take effect in future Eshell buffers."
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
124 :type (append
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
125 (list 'set ':tag "Supported modules")
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
126 (mapcar
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
127 (function
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
128 (lambda (modname)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
129 (let ((modsym (intern modname)))
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
130 (list 'const
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
131 ':tag (format "%s -- %s" modname
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
132 (get modsym 'custom-tag))
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
133 ':link (caar (get modsym 'custom-links))
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
134 ':doc (concat "\n" (get modsym 'group-documentation)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
135 "\n ")
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
136 modsym))))
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
137 (sort (mapcar 'symbol-name
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
138 (eshell-subgroups 'eshell-module))
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
139 'string-lessp))
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
140 '((repeat :inline t :tag "Other modules" symbol)))
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
141 :group 'eshell-module)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
142
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
143 ;;; Code:
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
144
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
145 (defsubst eshell-using-module (module)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
146 "Return non-nil if a certain Eshell MODULE is in use.
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
147 The MODULE should be a symbol corresponding to that module's
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
148 customization group. Example: `eshell-cmpl' for that module."
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
149 (memq module eshell-modules-list))
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
150
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
151 (defun eshell-unload-extension-modules ()
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
152 "Unload any memory resident extension modules."
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
153 (eshell-for module (eshell-subgroups 'eshell-module)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
154 (if (featurep module)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
155 (ignore-errors
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
156 (message "Unloading %s..." (symbol-name module))
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
157 (unload-feature module)
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
158 (message "Unloading %s...done" (symbol-name module))))))
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
159
52401
695cf19ef79e Add arch taglines
Miles Bader <miles@gnu.org>
parents: 47727
diff changeset
160 ;;; arch-tag: 97a3fa16-9d08-40e6-bc2c-36bd70986507
29876
edfec1c0d511 *** empty log message ***
Gerd Moellmann <gerd@gnu.org>
parents:
diff changeset
161 ;;; esh-module.el ends here