[PATCH] REVISED patch for #'cd
15 years, 5 months
FKtPp
Hi Dear Developers,
Could you please help review this path?
Thanks,
FKtPp
lisp/ChangeLog addition:
2009-06-20 It's me FKtPp ;) <m_pupil(a)yahoo.com.cn>
* files.el (cd): Do not #'split-path on nil #'getenv result; Make
sure the cd-path value is a list.
core-beta[XEmacs] source patch:
Diff command: hg diff -wbB
Files affected: lisp/files.el
diff -r a90b63846dc4 lisp/files.el
--- lisp/files.el Sun Jun 07 16:47:04 2009 +0100
+++ lisp/files.el Sat Jun 20 22:50:52 2009 +0800
@@ -593,29 +593,33 @@
default-directory default-directory
(and (member cd-path '(nil ("./")))
(null (getenv "CDPATH"))))))
- (if (file-name-absolute-p dir)
- (cd-absolute (expand-file-name dir))
- ;; XEmacs change. I'm not sure respecting CDPATH is the right thing to
- ;; do under Windows.
- (unless (and cd-path (equal (getenv "CDPATH") cdpath-previous))
- (let ((trypath (split-path (setq cdpath-previous (getenv "CDPATH")))))
+
+ (let* ((cdpath-current (getenv "CDPATH"))
+ (trypath (if cdpath-current
+ (split-path (setq cdpath-previous cdpath-current))
+ nil))) ; null list
+ (if (file-name-absolute-p dir)
+ (cd-absolute (expand-file-name dir))
+ ;; XEmacs change. I'm not sure respecting CDPATH is the right thing to
+ ;; do under Windows.
+ (unless (and cd-path (equal cdpath-current cdpath-previous))
(setq cd-path (or (and trypath
(mapcar #'file-name-as-directory trypath))
- (file-name-as-directory "")))))
- (or (catch 'found
- (mapcar #'(lambda (x)
+ (list (file-name-as-directory "")))))
+ (or (catch 'found
+ (mapcar #'(lambda (x)
(let ((f (expand-file-name (concat x dir))))
(if (file-directory-p f)
(progn
(cd-absolute f)
(throw 'found t)))))
- cd-path)
- nil)
- ;; jwz: give a better error message to those of us with the
- ;; good taste not to use a kludge like $CDPATH.
- (if (equal cd-path '("./"))
- (error "No such directory: %s" (expand-file-name dir))
- (error "Directory not found in $CDPATH: %s" dir)))))
+ cd-path)
+ nil)
+ ;; jwz: give a better error message to those of us with the
+ ;; good taste not to use a kludge like $CDPATH.
+ (if (equal cd-path '("./"))
+ (error "No such directory: %s" (expand-file-name dir))
+ (error "Directory not found in $CDPATH: %s" dir))))))
(defun load-file (file)
"Load the Lisp file named FILE."
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Do not #'split-path on nil #'getenv result. <877hz7lzrt.fsf@yahoo.com.cn>
15 years, 5 months
Jerry James
changeset: 4645:f2a991ff6db0
tag: tip
user: Jerry James <james(a)xemacs.org>
date: Mon Jun 29 08:20:47 2009 -0600
files: lisp/ChangeLog lisp/files.el
description:
Do not #'split-path on nil #'getenv result. <877hz7lzrt.fsf(a)yahoo.com.cn>
diff -r b0ae008bf1a0 -r f2a991ff6db0 lisp/ChangeLog
--- a/lisp/ChangeLog Sat Jun 20 04:07:12 2009 +0900
+++ b/lisp/ChangeLog Mon Jun 29 08:20:47 2009 -0600
@@ -1,3 +1,7 @@
+2009-06-20 It's me FKtPp ;) <m_pupil(a)yahoo.com.cn>
+ * files.el (cd): Do not #'split-path on nil #'getenv result; Make
+ sure the cd-path value is a list.
+
2009-06-14 Aidan Kehoe <kehoea(a)parhasard.net>
* help.el (describe-function-1):
diff -r b0ae008bf1a0 -r f2a991ff6db0 lisp/files.el
--- a/lisp/files.el Sat Jun 20 04:07:12 2009 +0900
+++ b/lisp/files.el Mon Jun 29 08:20:47 2009 -0600
@@ -593,29 +593,33 @@
default-directory default-directory
(and (member cd-path '(nil ("./")))
(null (getenv "CDPATH"))))))
- (if (file-name-absolute-p dir)
- (cd-absolute (expand-file-name dir))
- ;; XEmacs change. I'm not sure respecting CDPATH is the right thing to
- ;; do under Windows.
- (unless (and cd-path (equal (getenv "CDPATH") cdpath-previous))
- (let ((trypath (split-path (setq cdpath-previous (getenv "CDPATH")))))
- (setq cd-path (or (and trypath
+
+ (let* ((cdpath-current (getenv "CDPATH"))
+ (trypath (if cdpath-current
+ (split-path (setq cdpath-previous cdpath-current))
+ nil))) ; null list
+ (if (file-name-absolute-p dir)
+ (cd-absolute (expand-file-name dir))
+ ;; XEmacs change. I'm not sure respecting CDPATH is the right thing to
+ ;; do under Windows.
+ (unless (and cd-path (equal cdpath-current cdpath-previous))
+ (setq cd-path (or (and trypath
(mapcar #'file-name-as-directory trypath))
- (file-name-as-directory "")))))
- (or (catch 'found
- (mapcar #'(lambda (x)
- (let ((f (expand-file-name (concat x dir))))
+ (list (file-name-as-directory "")))))
+ (or (catch 'found
+ (mapcar #'(lambda (x)
+ (let ((f (expand-file-name (concat x dir))))
(if (file-directory-p f)
(progn
- (cd-absolute f)
- (throw 'found t)))))
- cd-path)
- nil)
- ;; jwz: give a better error message to those of us with the
- ;; good taste not to use a kludge like $CDPATH.
- (if (equal cd-path '("./"))
- (error "No such directory: %s" (expand-file-name dir))
- (error "Directory not found in $CDPATH: %s" dir)))))
+ (cd-absolute f)
+ (throw 'found t)))))
+ cd-path)
+ nil)
+ ;; jwz: give a better error message to those of us with the
+ ;; good taste not to use a kludge like $CDPATH.
+ (if (equal cd-path '("./"))
+ (error "No such directory: %s" (expand-file-name dir))
+ (error "Directory not found in $CDPATH: %s" dir))))))
(defun load-file (file)
"Load the Lisp file named FILE."
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Cygwin-1.7 support
15 years, 6 months
Reini Urban
Cygwin 1.7 comes with wchar.h (finally) so we need this patch.
(inlined)
Tested okay.
diff -u xemacs-21.5.28/src/syswindows.h.orig xemacs-21.5.28/src/syswindows.h
--- xemacs-21.5.28/src/syswindows.h.orig 2006-12-08 03:22:02.000000000 +0100
+++ xemacs-21.5.28/src/syswindows.h 2009-06-24 12:01:06.546875000 +0200
@@ -481,7 +481,10 @@
#ifdef CYGWIN
-/* All but wcscmp and wcslen left out of Cygwin headers -- but present
+#if (CYGWIN_VERSION_API_MINOR >= 181)
+# include <wchar.h>
+#else
+/* All but wcscmp and wcslen left out of Cygwin 1.5 headers -- but present
in /usr/include/mingw/string.h! */
wchar_t* wcscat (wchar_t*, const wchar_t*);
wchar_t* wcschr (const wchar_t*, wchar_t);
@@ -499,6 +502,7 @@
wchar_t* wcsstr (const wchar_t*, const wchar_t*);
wchar_t* wcstok (wchar_t*, const wchar_t*);
size_t wcsxfrm (wchar_t*, const wchar_t*, size_t);
+#endif /* CYGWIN 1.5 */
#endif /* CYGWIN */
--
Reini Urban
http://phpwiki.org/ http://murbreak.at/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[AC21.5] Document restriction on `interactive' [was: #'cd was broken]
15 years, 6 months
Stephen J. Turnbull
It's me FKtPp ;) writes:
> "Stephen J. Turnbull" <stephen(a)xemacs.org> writes:
>
> > It's me FKtPp ;) writes:
> > > Dear Developers,
> > >
> > > Here's my patch for the #'cd problem.. Wish it be helpful~
> >
> > > + (let ((cdpath-current (getenv "CDPATH")))
> > > + (interactive
> >
> > Have you tested this?
>
> Ah.. Sorry, it seemed that I break its interactive-ablity
> completely. But I do tested the code, say in eshell-mode..
;-)
How were you supposed to know? It wasn't documented. I can fix
that....
diff -r e9ccbc62f7e7 src/ChangeLog
--- a/src/ChangeLog Sun Jun 14 16:08:22 2009 +0100
+++ b/src/ChangeLog Sat Jun 20 03:56:56 2009 +0900
@@ -0,0 +1,5 @@
+2009-06-20 Stephen Turnbull <stephen(a)xemacs.org>
+
+ * callint.c (Finteractive): Document that (interactive) must
+ appear at the "top level" of a function definition to be effective.
+
diff -r e9ccbc62f7e7 src/callint.c
--- a/src/callint.c Sun Jun 14 16:08:22 2009 +0100
+++ b/src/callint.c Sat Jun 20 03:56:56 2009 +0900
@@ -86,6 +86,9 @@
The "call" to `interactive' is actually a declaration rather than a function;
it tells `call-interactively' how to read arguments
to pass to the function.
+The interactive form must appear at the top level of the function body. If
+ it is wrapped in a `let' or `progn' or similar, Lisp will not even realize
+ the function is an interactive command!
When actually called, `interactive' just returns nil.
The argument of `interactive' is usually a string containing a code letter
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] #'cd was broken
15 years, 6 months
Stephen J. Turnbull
It's me FKtPp ;) writes:
> Dear Developers,
>
> Here's my patch for the #'cd problem.. Wish it be helpful~
> + (let ((cdpath-current (getenv "CDPATH")))
> + (interactive
Have you tested this? I don't think it can work correctly, because
`interactive' does nothing when called. The interactive spec is
parsed out of a lambda form like this:
(assq 'interactive (cddr lambda-form))
but that won't find the interactive form when it's wrapped in a let.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] #'cd was broken
15 years, 6 months
FKtPp
Dear Developers,
Here's my patch for the #'cd problem.. Wish it be helpful~
Thanks,
FKtPp
lisp/ChangeLog addition:
2009-06-20 It's me FKtPp ;) <m_pupil(a)yahoo.com.cn>
* files.el (cd): First, #'split-path may fail with wrong type of argument
error stringp nil, if 'cd-path 'cdpath-previrus and (getenv
"CDPATH") were all nil; Second, cd-path was expect to be a list,
not a string; Third, there's only one #'getenv call now.
core-beta[XEmacs] source patch:
Diff command: hg diff -wbB
Files affected: lisp/files.el
diff -r a90b63846dc4 lisp/files.el
--- lisp/files.el Sun Jun 07 16:47:04 2009 +0100
+++ lisp/files.el Sat Jun 20 00:16:43 2009 +0800
@@ -587,35 +587,38 @@
"Make DIR become the current buffer's default directory.
If your environment includes a `CDPATH' variable, try each one of that
colon-separated list of directories when resolving a relative directory name."
- (interactive
- ;; XEmacs change? (read-file-name => read-directory-name)
- (list (read-directory-name "Change default directory: "
- default-directory default-directory
- (and (member cd-path '(nil ("./")))
- (null (getenv "CDPATH"))))))
- (if (file-name-absolute-p dir)
- (cd-absolute (expand-file-name dir))
- ;; XEmacs change. I'm not sure respecting CDPATH is the right thing to
- ;; do under Windows.
- (unless (and cd-path (equal (getenv "CDPATH") cdpath-previous))
- (let ((trypath (split-path (setq cdpath-previous (getenv "CDPATH")))))
- (setq cd-path (or (and trypath
- (mapcar #'file-name-as-directory trypath))
- (file-name-as-directory "")))))
- (or (catch 'found
- (mapcar #'(lambda (x)
+ (let ((cdpath-current (getenv "CDPATH")))
+ (interactive
+ ;; XEmacs change? (read-file-name => read-directory-name)
+ (list (read-directory-name "Change default directory: "
+ default-directory default-directory
+ (and (member cd-path '(nil ("./")))
+ (null cdpath-current)))))
+ (if (file-name-absolute-p dir)
+ (cd-absolute (expand-file-name dir))
+ ;; XEmacs change. I'm not sure respecting CDPATH is the right thing to
+ ;; do under Windows.
+ (unless (and cd-path (equal cdpath-current cdpath-previous))
+ (let ((trypath (if cdpath-current
+ (split-path (setq cdpath-previous cdpath-current))
+ nil)))
+ (setq cd-path (or (and trypath
+ (mapcar #'file-name-as-directory trypath))
+ (list (file-name-as-directory ""))))))
+ (or (catch 'found
+ (mapcar #'(lambda (x)
(let ((f (expand-file-name (concat x dir))))
(if (file-directory-p f)
(progn
(cd-absolute f)
(throw 'found t)))))
- cd-path)
- nil)
- ;; jwz: give a better error message to those of us with the
- ;; good taste not to use a kludge like $CDPATH.
- (if (equal cd-path '("./"))
- (error "No such directory: %s" (expand-file-name dir))
- (error "Directory not found in $CDPATH: %s" dir)))))
+ cd-path)
+ nil)
+ ;; jwz: give a better error message to those of us with the
+ ;; good taste not to use a kludge like $CDPATH.
+ (if (equal cd-path '("./"))
+ (error "No such directory: %s" (expand-file-name dir))
+ (error "Directory not found in $CDPATH: %s" dir))))))
(defun load-file (file)
"Load the Lisp file named FILE."
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
VC patches for Issue 491
15 years, 6 months
Rodney Sparapani
>/ Here is the remaining patch that has not yet been applied
/>/ from Issue 491 (see the Issue Tracker for more info if you dare!).
/>/ This makes vc-dired work in all ways that I have tried with svn.//
/>/ --- vc-hooks.el~ Tue Mar 3 09:10:43 2009
/>/ +++ vc-hooks.el Mon May 4 15:03:50 2009
/>/ @@ -38,6 +38,8 @@
/>/ (eval-when-compile
/>/ (require 'cl))
/>/
/>/ +(defvar vc-dired-terse-mode nil)
/>/ +
/>/ ;; Customization Variables (the rest is in vc.el)
/>/
/>/ (defvar vc-ignore-vc-files nil)
/>/
/
I have a cattle prod and I am not afraid to use it! :o)
--
Rodney Sparapani Center for Patient Care & Outcomes Research (PCOR)
Sr. Biostatistician http://www.mcw.edu/pcor
4 wheels good, 2 wheels better! Medical College of Wisconsin (MCW)
WWLD?: What Would Lombardi Do? Milwaukee, WI, USA
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [A] eshell-mode, Use #'manual-entry instead of GNU's #'man
15 years, 6 months
Stephen J. Turnbull
John Wiegley writes:
> > John disclaimed responsibility for that and pcomplete quite a while
> > ago, IIRC, and my checkout of the packages (just updated) lists
> > "XEmacs Dev Team" as maintainer for both.
>
> I still maintain them, just inactively so. :)
I thought that you were maintaining the upstream (GNU Emacs) versions,
but not particularly interested in maintaining/controlling patches to
the XEmacs packaged versions. The last I have from you was a comment
in 4th quarter 2008 to the effect that "I'm not adding [certain
patches] to GNU Emacs because they're XEmacs-specific". It's the
XEmacs packages that are in question here, again these are
XEmacs-specific patches.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [COMMIT] Support #'function-arglist with built-in special forms.
15 years, 6 months
Aidan Kehoe
Ar an séú lá déag de mí Meitheamh, scríobh Stephen J. Turnbull:
> Stephen J. Turnbull writes:
> > Aidan Kehoe writes:
> >
> > > Unfortunately, actually, for my purposes, it’s not. If you look
> > > in any DOC file and search for
> > > dontusethis-set-symbol-value-handler, the argument list looks
> > > like so:
> > > arguments: (VARIABLE HANDLER-TYPE HANDLER &optional HARG \
> > > KEEP-EXISTING))
> >
> > Ah, OK. I think this is probably my bug, then. make-docfile didn't
> > work properly at all when Jerry first added the UNUSED stuff, so I
> > hacked its parser to work with it (more or less). I'll take a look at
> > make-docfile.c in a day or so and see if I can remember what was
> > supposed to be happening there.
>
> I've made some progress on this, I do remember what is going on.
> However, I don't have any test cases except that one (ie, broken
> docstrings). Aidan, can you tell me any other functions where you've
> seen breakage?
I’ve only seen the broken docstrings. That should be enough for a test case,
though—e.g.:
(Assert (not (string-match "))$" (function-arglist #'event-to-character))))
The last argument of #'event-to-character will remain unused; you might want
to check that (function-max-args #'event-to-character) still gives four,
though. Or M-C-s [A-Z]))$ RET in DOC for other examples.
> I wonder how much extra build time it would cost to put this in
> Lisp.... Anyway, I think I'm going to refactor the C to make it
> clearer what's going on.
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghe, que tuvo que huir
precipitadamente de la aldea por culpa de la escasez de rinocerontes?
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] eshell-mode, Use #'manual-entry instead of GNU's #'man
15 years, 6 months
FKtPp
Dear Developers,
I've met function's value was not defined error several times when run
`man something' in eshell mode. And finally got it fixed by change
this two defination.
Could you please help review and commit it to package repository?
Thanks,
FKtPp
ChangeLog addition:
2009-06-12 It's me FKtPp ;) <m_pupil(a)yahoo.com.cn>
* em-cmpl.el (eshell-cmpl-man-function): Use #'manual-entry instead
of #'man
* em-unix.el (eshell/man): Use #'manual-entry instead of #'man
eshell[Packages] source patch:
Diff command: cvs -q diff -u
Files affected: em-unix.el
===================================================================
RCS em-cmpl.el
===================================================================
RCS
Index: em-cmpl.el
===================================================================
RCS file:
/pack/xemacscvs/XEmacs/packages/xemacs-packages/eshell/em-cmpl.el,v
retrieving revision 1.2
diff -u -r1.2 em-cmpl.el
--- em-cmpl.el 2008/08/27 21:26:30 1.2
+++ em-cmpl.el 2009/06/12 13:25:05
@@ -168,7 +168,9 @@
:type (get 'pcomplete-recexact 'custom-type)
:group 'eshell-cmpl)
-(defcustom eshell-cmpl-man-function 'man
+(defcustom eshell-cmpl-man-function (if (featurep 'xemacs)
+ #'manual-entry
+ #'man)
(documentation-property 'pcomplete-man-function
'variable-documentation)
:type (get 'pcomplete-man-function 'custom-type)
Index: em-unix.el
===================================================================
RCS file:
/pack/xemacscvs/XEmacs/packages/xemacs-packages/eshell/em-unix.el,v
retrieving revision 1.3
diff -u -r1.3 em-unix.el
--- em-unix.el 2008/08/27 21:26:32 1.3
+++ em-unix.el 2009/06/12 13:25:05
@@ -163,7 +163,10 @@
(defun eshell/man (&rest args)
"Invoke man, flattening the arguments appropriately."
- (funcall 'man (apply 'eshell-flatten-and-stringify args)))
+ (funcall (if (featurep 'xemacs)
+ #'manual-entry
+ #'man)
+ (apply 'eshell-flatten-and-stringify args)))
(put 'eshell/man 'eshell-no-numeric-conversions t)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches