[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102284: Minor esh-util changes.
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102284: Minor esh-util changes. |
Date: |
Sat, 06 Nov 2010 18:56:09 -0700 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102284
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Sat 2010-11-06 18:56:09 -0700
message:
Minor esh-util changes.
* lisp/eshell/esh-util.el (subst-char-in-string)
(directory-files-and-attributes): These compatibility definitions are
not needed on any version of Emacs since at least 21.4.
modified:
lisp/ChangeLog
lisp/eshell/esh-util.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-11-07 01:50:52 +0000
+++ b/lisp/ChangeLog 2010-11-07 01:56:09 +0000
@@ -1,5 +1,9 @@
2010-11-07 Glenn Morris <address@hidden>
+ * eshell/esh-util.el (subst-char-in-string)
+ (directory-files-and-attributes): These compatibility definitions are
+ not needed on any version of Emacs since at least 21.4.
+
* progmodes/verilog-mode.el (verilog-get-beg-of-line)
(verilog-get-end-of-line): Remove.
(verilog-within-string, verilog-re-search-forward-substr)
=== modified file 'lisp/eshell/esh-util.el'
--- a/lisp/eshell/esh-util.el 2010-11-07 01:50:52 +0000
+++ b/lisp/eshell/esh-util.el 2010-11-07 01:56:09 +0000
@@ -536,17 +536,18 @@
(eshell-read-hosts eshell-hosts-file 'eshell-host-names
'eshell-host-timestamp)))
-(unless (fboundp 'subst-char-in-string)
- (defun subst-char-in-string (fromchar tochar string &optional inplace)
- "Replace FROMCHAR with TOCHAR in STRING each time it occurs.
+(and (featurep 'xemacs)
+ (not (fboundp 'subst-char-in-string))
+ (defun subst-char-in-string (fromchar tochar string &optional inplace)
+ "Replace FROMCHAR with TOCHAR in STRING each time it occurs.
Unless optional argument INPLACE is non-nil, return a new string."
- (let ((i (length string))
- (newstr (if inplace string (copy-sequence string))))
- (while (> i 0)
- (setq i (1- i))
- (if (eq (aref newstr i) fromchar)
- (aset newstr i tochar)))
- newstr)))
+ (let ((i (length string))
+ (newstr (if inplace string (copy-sequence string))))
+ (while (> i 0)
+ (setq i (1- i))
+ (if (eq (aref newstr i) fromchar)
+ (aset newstr i tochar)))
+ newstr)))
(defsubst eshell-copy-environment ()
"Return an unrelated copy of `process-environment'."
@@ -586,8 +587,9 @@
(substring string 0 sublen)
string)))
-(unless (fboundp 'directory-files-and-attributes)
- (defun directory-files-and-attributes (directory &optional full match nosort
id-format)
+(and (featurep 'xemacs)
+ (not (fboundp 'directory-files-and-attributes))
+ (defun directory-files-and-attributes (directory &optional full match
nosort id-format)
"Return a list of names of files and their attributes in DIRECTORY.
There are three optional arguments:
If FULL is non-nil, return absolute file names. Otherwise return names
@@ -599,7 +601,7 @@
(mapcar
(function
(lambda (file)
- (cons file (eshell-file-attributes (expand-file-name file
directory)))))
+ (cons file (eshell-file-attributes (expand-file-name file
directory)))))
(directory-files directory full match nosort)))))
(defvar ange-cache)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102284: Minor esh-util changes.,
Glenn Morris <=