Mercurial > emacs
comparison lisp/eshell/esh-util.el @ 87082:7a4a3f1c72ee
Require individual files if needed when compiling, rather than
esh-maint. Collect any require statements. Move provide statement to
end. Move any commentary to start.
(top-level): Don't require pp. Use condition-case rather than
ignore-errors.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Wed, 05 Dec 2007 07:07:12 +0000 |
parents | 59b6ce989ba4 |
children | 107ccd98fa12 53108e6cea98 |
comparison
equal
deleted
inserted
replaced
87081:24280fb751e3 | 87082:7a4a3f1c72ee |
---|---|
20 ;; You should have received a copy of the GNU General Public License | 20 ;; You should have received a copy of the GNU General Public License |
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the | 21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 22 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
23 ;; Boston, MA 02110-1301, USA. | 23 ;; Boston, MA 02110-1301, USA. |
24 | 24 |
25 (provide 'esh-util) | 25 ;;; Commentary: |
26 | 26 |
27 (eval-when-compile (require 'esh-maint)) | 27 ;;; Code: |
28 | 28 |
29 (defgroup eshell-util nil | 29 (defgroup eshell-util nil |
30 "This is general utility code, meant for use by Eshell itself." | 30 "This is general utility code, meant for use by Eshell itself." |
31 :tag "General utilities" | 31 :tag "General utilities" |
32 :group 'eshell) | 32 :group 'eshell) |
33 | |
34 ;;; Commentary: | |
35 | |
36 (require 'pp) | |
37 | 33 |
38 ;;; User Variables: | 34 ;;; User Variables: |
39 | 35 |
40 (defcustom eshell-stringify-t t | 36 (defcustom eshell-stringify-t t |
41 "*If non-nil, the string representation of t is 't'. | 37 "*If non-nil, the string representation of t is 't'. |
427 "Allow Emacs to redisplay buffers." | 423 "Allow Emacs to redisplay buffers." |
428 ;; for some strange reason, Emacs 21 is prone to trigger an | 424 ;; for some strange reason, Emacs 21 is prone to trigger an |
429 ;; "args out of range" error in `sit-for', if this function | 425 ;; "args out of range" error in `sit-for', if this function |
430 ;; runs while point is in the minibuffer and the users attempt | 426 ;; runs while point is in the minibuffer and the users attempt |
431 ;; to use completion. Don't ask me. | 427 ;; to use completion. Don't ask me. |
432 (ignore-errors (sit-for 0 0))) | 428 (condition-case nil |
429 (sit-for 0 0) | |
430 (error nil))) | |
433 | 431 |
434 (defun eshell-read-passwd-file (file) | 432 (defun eshell-read-passwd-file (file) |
435 "Return an alist correlating gids to group names in FILE." | 433 "Return an alist correlating gids to group names in FILE." |
436 (let (names) | 434 (let (names) |
437 (when (file-readable-p file) | 435 (when (file-readable-p file) |
779 ; (make-string 9 ? ) 0)) | 777 ; (make-string 9 ? ) 0)) |
780 ; nil nil nil)))))))) | 778 ; nil nil nil)))))))) |
781 ; (or result | 779 ; (or result |
782 ; (file-attributes filename)))) | 780 ; (file-attributes filename)))) |
783 | 781 |
784 ;;; Code: | 782 (provide 'esh-util) |
785 | 783 |
786 ;;; arch-tag: 70159778-5c7a-480a-bae4-3ad332fca19d | 784 ;;; arch-tag: 70159778-5c7a-480a-bae4-3ad332fca19d |
787 ;;; esh-util.el ends here | 785 ;;; esh-util.el ends here |