Re: [PATCH] Support Carbon-specific package paths.
16 years, 5 months
Aidan Kehoe
Ar an triú lá déag de mí Bealtaine, scríobh Stephen J. Turnbull:
> Michael Sperber writes:
> > Aidan Kehoe <kehoea(a)parhasard.net> writes:
>
> > > Hmm, won’t that make it look under ~/Library/Application Support for
> > > init.el? I don’t really want that, personally.
> >
> > Yes it would, and I think it would be the natural consequence of the
> > change you're suggesting we make
>
> +1 I'm watching this same debate over on Python-Dev. It's definitely
> schizophrenic. There are people who are perfectly happy to have Unix
> conventions, and there are those who want stuff in ~/Library/$PKG.
> Neither camp would be happy with some stuff in ~/Library and some in a
> .directory.
I would be okay with a potential data-root in
/Library/Application Support/XEmacs/XEmacs Packages/ , and a potential
user-init-directory in ~/Library/Application/XEmacs , if and only if the
latter will be overridden by an existing ~/.xemacs/ .
That allows the pure Mac people to be conscientious and Mac about their work
habits, and the mixed Unix-Mac people to reasonable behaviour by default.
> > ---which is why I'm somewhat dubious about it.
>
> -0 In that same debate, the Mac fans are pretty vociferous about
> wanting ~/Library. Curiously enough, these are also the people who
> actually contribute to Mac-oriented stuff in Python, they're not the
> peanut gallery.
>
> > I'd rather just have it be ~/.xemacs everwhere rather than
> > having platform-specific changes, even if Mac OS X conventions say
> > otherwise.
>
> Sure, but I doubt that's what the users will say.
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, 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
commit: Provide SHEBANG_PROGNAME on Win32; correct a bug with it and string concat'ing
16 years, 5 months
Aidan Kehoe
changeset: 4458:d9b9b5f903863b3ac33713441ea9c91e2553f144
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue May 13 20:16:53 2008 +0200
files: nt/ChangeLog nt/xemacs.mak src/ChangeLog src/emacs.c
description:
Provide SHEBANG_PROGNAME on Win32; correct a bug with it and string concat'ing
nt/ChangeLog addition:
2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
* xemacs.mak (PROGRAM_DEFINES):
Provide SHEBANG_PROGNAME on Win32 too.
src/ChangeLog addition:
2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
* emacs.c (SHEBANG_EXE_PROGNAME_LENGTH):
Use WEXTSTRING separately on the two concatenated strings,
avoiding an error on Win32.
diff -r 2fddd822ce87c676cc23043237fdfa35cfd886ac -r d9b9b5f903863b3ac33713441ea9c91e2553f144 nt/ChangeLog
--- a/nt/ChangeLog Tue May 13 20:11:51 2008 +0200
+++ b/nt/ChangeLog Tue May 13 20:16:53 2008 +0200
@@ -1,3 +1,8 @@ 2008-01-25 Michael Sperber <mike@xemac
+2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * xemacs.mak (PROGRAM_DEFINES):
+ Provide SHEBANG_PROGNAME on Win32 too.
+
2008-01-25 Michael Sperber <mike(a)xemacs.org>
* xemacs.mak (version.sh): Generate version.sh via Mercurial.
diff -r 2fddd822ce87c676cc23043237fdfa35cfd886ac -r d9b9b5f903863b3ac33713441ea9c91e2553f144 nt/xemacs.mak
--- a/nt/xemacs.mak Tue May 13 20:11:51 2008 +0200
+++ b/nt/xemacs.mak Tue May 13 20:16:53 2008 +0200
@@ -427,6 +427,7 @@ PROGRAM_DEFINES=-DINFODOCK \
-DPATH_VERSION=\"$(INFODOCK_VERSION_STRING)\" \
-DPATH_PROGNAME=\"infodock\" \
-DEMACS_PROGNAME=\"infodock\" \
+ -DSHEBANG_PROGNAME=\"infodock-script\" \
-DEMACS_VERSION=\"$(INFODOCK_VERSION_STRING)\" \
-DINFODOCK_MAJOR_VERSION=$(infodock_major_version) \
-DINFODOCK_MINOR_VERSION=$(infodock_minor_version) \
@@ -444,7 +445,7 @@ PROGRAM_DEFINES= \
-DPATH_VERSION=\"$(XEMACS_VERSION_STRING)\" \
-DPATH_PROGNAME=\"xemacs\" \
-DEMACS_VERSION=\"$(XEMACS_VERSION_STRING)\" \
- -DEMACS_PROGNAME=\"xemacs\"
+ -DEMACS_PROGNAME=\"xemacs\" -DSHEBANG_PROGNAME=\"xemacs-script\"
!endif
########################### Set up installation and package directories.
diff -r 2fddd822ce87c676cc23043237fdfa35cfd886ac -r d9b9b5f903863b3ac33713441ea9c91e2553f144 src/ChangeLog
--- a/src/ChangeLog Tue May 13 20:11:51 2008 +0200
+++ b/src/ChangeLog Tue May 13 20:16:53 2008 +0200
@@ -1,3 +1,9 @@ 2008-05-13 Aidan Kehoe <kehoea@parhasa
+2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * emacs.c (SHEBANG_EXE_PROGNAME_LENGTH):
+ Use WEXTSTRING separately on the two concatenated strings,
+ avoiding an error on Win32.
+
2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
* config.h.in (_CRT_NONSTDC_NO_DEPRECATE):
diff -r 2fddd822ce87c676cc23043237fdfa35cfd886ac -r d9b9b5f903863b3ac33713441ea9c91e2553f144 src/emacs.c
--- a/src/emacs.c Tue May 13 20:11:51 2008 +0200
+++ b/src/emacs.c Tue May 13 20:16:53 2008 +0200
@@ -958,7 +958,7 @@ main_1 (int argc, Wexttext **argv, Wextt
#define SHEBANG_PROGNAME_LENGTH \
(int)((sizeof (WEXTSTRING (SHEBANG_PROGNAME)) - sizeof (WEXTSTRING (""))))
#define SHEBANG_EXE_PROGNAME_LENGTH \
- (int)(sizeof (WEXTSTRING (SHEBANG_PROGNAME ".exe")) \
+ (int)(sizeof (WEXTSTRING (SHEBANG_PROGNAME) WEXTSTRING(".exe")) \
- sizeof (WEXTSTRING ("")))
{
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: #define _CRT_NONSTDC_NO_DEPRECATE on Win32
16 years, 5 months
Aidan Kehoe
changeset: 4457:2fddd822ce87c676cc23043237fdfa35cfd886ac
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue May 13 20:11:51 2008 +0200
files: src/ChangeLog src/config.h.in
description:
#define _CRT_NONSTDC_NO_DEPRECATE on Win32
2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
* config.h.in (_CRT_NONSTDC_NO_DEPRECATE):
Define this, to avoid warnings about using standard POSIX and C9X
functions on Win32; fixes part of Matthew Persico's problems of
9ea6aaa80805081832r1a3308e9wb6d2bfea7457379f(a)mail.gmail.com .
diff -r c785f98c6737d0da7774c975790b6247717af226 -r 2fddd822ce87c676cc23043237fdfa35cfd886ac src/ChangeLog
--- a/src/ChangeLog Tue May 13 20:08:28 2008 +0200
+++ b/src/ChangeLog Tue May 13 20:11:51 2008 +0200
@@ -1,3 +1,10 @@ 2008-01-20 Aidan Kehoe <kehoea@parhasa
+2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * config.h.in (_CRT_NONSTDC_NO_DEPRECATE):
+ Define this, to avoid warnings about using standard POSIX and C9X
+ functions on Win32; fixes part of Matthew Persico's problems of
+ 9ea6aaa80805081832r1a3308e9wb6d2bfea7457379f(a)mail.gmail.com .
+
2008-01-20 Aidan Kehoe <kehoea(a)parhasard.net>
* config.h.in: Add SHEBANG_PROGNAME.
diff -r c785f98c6737d0da7774c975790b6247717af226 -r 2fddd822ce87c676cc23043237fdfa35cfd886ac src/config.h.in
--- a/src/config.h.in Tue May 13 20:08:28 2008 +0200
+++ b/src/config.h.in Tue May 13 20:11:51 2008 +0200
@@ -875,6 +875,7 @@ things are arranged in config.h.in. In
"deprecated" in favor of Microsoft-specific "secure" ones (!)
This must go *before* the inclusion of any system files. */
#define _CRT_SECURE_NO_DEPRECATE
+#define _CRT_NONSTDC_NO_DEPRECATE
#endif
/* alloca twiddling.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
commit: Pass READ_BINARY to scan_lisp_file, scan_c_file in make-docfile.c
16 years, 5 months
Aidan Kehoe
changeset: 4456:c785f98c6737d0da7774c975790b6247717af226
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue May 13 20:08:28 2008 +0200
files: lib-src/ChangeLog lib-src/make-docfile.c
description:
Pass READ_BINARY to scan_lisp_file, scan_c_file in make-docfile.c
2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
* make-docfile.c (scan_file):
Pass READ_BINARY to scan_lisp_file, scan_c_file; avoids an
assertion failure with Visual C++ 2005 Express Edition, and is
logically more coherent, given that our Lisp and C files are saved
with Unix line endings.
diff -r 49f8ed0345005a02146572b11bdb55f0127d3bf2 -r c785f98c6737d0da7774c975790b6247717af226 lib-src/ChangeLog
--- a/lib-src/ChangeLog Mon May 12 11:53:04 2008 +0200
+++ b/lib-src/ChangeLog Tue May 13 20:08:28 2008 +0200
@@ -1,3 +1,11 @@ 2007-08-27 Mike Sperber <mike(a)xemacs.o
+2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * make-docfile.c (scan_file):
+ Pass READ_BINARY to scan_lisp_file, scan_c_file; avoids an
+ assertion failure with Visual C++ 2005 Express Edition, and is
+ logically more coherent, given that our Lisp and C files are saved
+ with Unix line endings.
+
2007-08-27 Mike Sperber <mike(a)xemacs.org>
* config.values.in (datarootdir): Add.
diff -r 49f8ed0345005a02146572b11bdb55f0127d3bf2 -r c785f98c6737d0da7774c975790b6247717af226 lib-src/make-docfile.c
--- a/lib-src/make-docfile.c Mon May 12 11:53:04 2008 +0200
+++ b/lib-src/make-docfile.c Tue May 13 20:08:28 2008 +0200
@@ -306,12 +306,12 @@ scan_file (const char *filename)
else if (ellcc == 0 && len > 3 && !strcmp (filename + len - 3, ".el"))
{
Current_file_type = el_file;
- return scan_lisp_file (filename, READ_TEXT);
+ return scan_lisp_file (filename, READ_BINARY);
}
else
{
Current_file_type = c_file;
- return scan_c_file (filename, READ_TEXT);
+ return scan_c_file (filename, READ_BINARY);
}
}
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Handle printing correctly on non-mswindows.
16 years, 5 months
Aidan Kehoe
Thank you for the bug report, Robert!
This addresses Issue 124 in the issue tracker. Are the filters set up to feed
this to it correctly?
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1210683398 -7200
# Node ID 78767f901c2bd946fdc2c725c2be4eee3f07dd78
# Parent 49f8ed0345005a02146572b11bdb55f0127d3bf2
Handle printing correctly on non-mswindows.
2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
* printer.el (generic-print-region):
(generic-print-buffer):
Use #'valid-device-type-p instead of #'valid-specifier-tag-p to
check if the msprinter device is available, now that msprinter is
always available as a specifier tag.
diff -r 49f8ed034500 -r 78767f901c2b lisp/ChangeLog
--- a/lisp/ChangeLog Mon May 12 11:53:04 2008 +0200
+++ b/lisp/ChangeLog Tue May 13 14:56:38 2008 +0200
@@ -1,3 +1,11 @@ 2008-05-11 Aidan Kehoe <kehoea@parhasa
+2008-05-13 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * printer.el (generic-print-region):
+ (generic-print-buffer):
+ Use #'valid-device-type-p instead of #'valid-specifier-tag-p to
+ check if the msprinter device is available, now that msprinter is
+ always available as a specifier tag.
+
2008-05-11 Aidan Kehoe <kehoea(a)parhasard.net>
* disp-table.el (make-display-table):
diff -r 49f8ed034500 -r 78767f901c2b lisp/printer.el
--- a/lisp/printer.el Mon May 12 11:53:04 2008 +0200
+++ b/lisp/printer.el Tue May 13 14:56:38 2008 +0200
@@ -263,7 +263,7 @@ If BUFFER is nil or omitted, the current
(let* ((print-region (and (interactive-p) (region-active-p)))
(start (if print-region (region-beginning) (point-min buffer)))
(end (if print-region (region-end) (point-max buffer))))
- (if (or (not (valid-specifier-tag-p 'msprinter))
+ (if (or (not (valid-device-type-p 'msprinter))
(not display-print-dialog))
(generic-print-region start end buffer)
(let* ((d (Printer-get-device))
@@ -312,7 +312,7 @@ Recognized properties are the same as th
to-page Last page to print, inclusive, If omitted, printing ends at
the end.
copies Number of copies to print. If omitted, one copy is printed."
- (cond ((valid-specifier-tag-p 'msprinter)
+ (cond ((valid-device-type-p 'msprinter)
;; loop, printing one copy of document per loop. kill and
;; re-create the frame each time so that we eject the piece
;; of paper at the end even if we're printing more than one
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, 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
commit: Support #!, to allow XEmacs to be called as a script interpreter.
16 years, 5 months
Aidan Kehoe
changeset: 4448:fd8a9a4d81d944bffd5a1c3258dab652470b27d4
parent: 4408:8bbabcab2c42867d7ed8338cc5f575551fd2443c
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Jan 20 19:53:54 2008 +0100
files: ChangeLog Makefile.in.in configure configure.ac lisp/ChangeLog lisp/startup.el man/ChangeLog man/xemacs/cmdargs.texi src/ChangeLog src/config.h.in src/emacs.c src/lread.c
description:
Support #!, to allow XEmacs to be called as a script interpreter.
ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea(a)parhasard.net>
* Makefile.in.in (SHEBANG_PROGNAME):
New variable; a symbol link to the XEmacs binary to tell it it
should read a script from stdin.
* configure.ac (XE_EXPAND_VARIABLE):
Set SHEBANG_PROGNAME.
* configure:
Regenerate.
src/ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea(a)parhasard.net>
* config.h.in: Add SHEBANG_PROGNAME.
* emacs.c (main_1):
If we've been called using SHEBANG_PROGNAME, rewrite our arguments
to add a --script argument.
Also, handle the --script argument by setting noninteractive and
vanilla.
* lread.c (Fload_internal):
If the first two characters of a file are #!, replace them with ;!
before they get to the Lisp reader.
lisp/ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea(a)parhasard.net>
* startup.el (command-line-do-script): New.
(command-switch-alist): Use command-line-do-script.
New argument, compatible with GNU; --script or -script says "treat
the following argument as a file to load in batch mode".
man/ChangeLog addition:
2008-01-20 Aidan Kehoe <kehoea(a)parhasard.net>
* xemacs/cmdargs.texi (Command Switches):
Describe --script, -script.
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 ChangeLog
--- a/ChangeLog Sun Jan 20 13:09:58 2008 +0100
+++ b/ChangeLog Sun Jan 20 19:53:54 2008 +0100
@@ -1,3 +1,13 @@ 2008-01-17 Aidan Kehoe <kehoea@parhasa
+2008-01-20 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * Makefile.in.in (SHEBANG_PROGNAME):
+ New variable; a symbol link to the XEmacs binary to tell it it
+ should read a script from stdin.
+ * configure.ac (XE_EXPAND_VARIABLE):
+ Set SHEBANG_PROGNAME.
+ * configure:
+ Regenerate.
+
2008-01-17 Aidan Kehoe <kehoea(a)parhasard.net>
* configure.ac:
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 Makefile.in.in
--- a/Makefile.in.in Sun Jan 20 13:09:58 2008 +0100
+++ b/Makefile.in.in Sun Jan 20 19:53:54 2008 +0100
@@ -92,6 +92,7 @@ configuration=@configuration@
## This will be the name of the generated binary and is set automatically
## by configure.
PROGNAME=@PROGNAME@
+SHEBANG_PROGNAME=@SHEBANG_PROGNAME@
## ==================== Where To Install Things ====================
@@ -407,10 +408,12 @@ install-arch-dep: mkdir
${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}.exe
-chmod 0755 ${bindir}/${PROGNAME}-${version}.exe
cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${PROGNAME}
+ cd ${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${SHEBANG_PROGNAME}
# else
${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}
-chmod 0755 ${bindir}/${PROGNAME}-${version}
cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME}
+ cd ${bindir} && $(RM) ./${SHEBANG_PROGNAME} && ${LN_S} ${PROGNAME}-${version}.exe ./${SHEBANG_PROGNAME}
# endif /* CYGWIN */
#endif /* WIN32_NATIVE */
if test "${prefix}" != "${exec_prefix}"; then \
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 configure
--- a/configure Sun Jan 20 13:09:58 2008 +0100
+++ b/configure Sun Jan 20 19:53:54 2008 +0100
@@ -4851,13 +4851,20 @@ _ACEOF
version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
PROGNAME=infodock
+ SHEBANG_PROGNAME=infodock-script
CPPFLAGS="$CPPFLAGS -DINFODOCK"
else
PROGNAME=xemacs
+ SHEBANG_PROGNAME=xemacs-script
fi
cat >>confdefs.h <<_ACEOF
#define EMACS_PROGNAME "$PROGNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define SHEBANG_PROGNAME "${PROGNAME}-script"
_ACEOF
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 configure.ac
--- a/configure.ac Sun Jan 20 13:09:58 2008 +0100
+++ b/configure.ac Sun Jan 20 19:53:54 2008 +0100
@@ -1219,12 +1219,16 @@ if test "$with_infodock" = "yes"; then
AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version)
version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
PROGNAME=infodock
+ SHEBANG_PROGNAME=infodock-script
CPPFLAGS="$CPPFLAGS -DINFODOCK"
else
PROGNAME=xemacs
+ SHEBANG_PROGNAME=xemacs-script
fi
AC_DEFINE_UNQUOTED(EMACS_PROGNAME, "$PROGNAME")
+
+AC_DEFINE_UNQUOTED(SHEBANG_PROGNAME, "${PROGNAME}-script")
dnl ----------------------------------
dnl Error checking and debugging flags
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 lisp/ChangeLog
--- a/lisp/ChangeLog Sun Jan 20 13:09:58 2008 +0100
+++ b/lisp/ChangeLog Sun Jan 20 19:53:54 2008 +0100
@@ -1,3 +1,10 @@ 2008-01-17 Mike Sperber <mike(a)xemacs.o
+2008-01-20 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * startup.el (command-line-do-script): New.
+ (command-switch-alist): Use command-line-do-script.
+ New argument, compatible with GNU; --script or -script says "treat
+ the following argument as a file to load in batch mode".
+
2008-01-17 Mike Sperber <mike(a)xemacs.org>
* files.el (insert-directory): Bind `coding-system-for-read' to
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 lisp/startup.el
--- a/lisp/startup.el Sun Jan 20 13:09:58 2008 +0100
+++ b/lisp/startup.el Sun Jan 20 19:53:54 2008 +0100
@@ -234,6 +234,8 @@ after, and will not be true at any time
("-eval" . command-line-do-eval)
("-load" . command-line-do-load)
("-l" . command-line-do-load)
+ ("--script" . command-line-do-script)
+ ("-script" . command-line-do-script)
("-insert" . command-line-do-insert)
("-i" . command-line-do-insert)
("-kill" . command-line-do-kill)
@@ -436,6 +438,12 @@ Type ^H^H^H (Control-h Control-h Control
(if (file-exists-p (expand-file-name file))
(setq file (expand-file-name file)))
(load file nil t)))
+
+(defun command-line-do-script (arg)
+ "Load the named file of Lisp code into XEmacs.
+<file>"
+ (let ((file (pop command-line-args-left)))
+ (load file nil t t)))
(defun command-line-do-insert (arg)
"Insert file into the current buffer.
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 man/ChangeLog
--- a/man/ChangeLog Sun Jan 20 13:09:58 2008 +0100
+++ b/man/ChangeLog Sun Jan 20 19:53:54 2008 +0100
@@ -1,3 +1,8 @@ 2007-12-17 Aidan Kehoe <kehoea@parhasa
+2008-01-20 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * xemacs/cmdargs.texi (Command Switches):
+ Describe --script, -script.
+
2007-12-17 Aidan Kehoe <kehoea(a)parhasard.net>
* lispref/strings.texi (Formatting Strings):
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 man/xemacs/cmdargs.texi
--- a/man/xemacs/cmdargs.texi Sun Jan 20 13:09:58 2008 +0100
+++ b/man/xemacs/cmdargs.texi Sun Jan 20 19:53:54 2008 +0100
@@ -171,6 +171,27 @@ Do not process early packages. (For mor
Do not process early packages. (For more information on startup issues
concerning the package system, @xref{Startup Paths}.)
+@item -script @var{file}
+@item --script @var{file}
+Load @var{file} as a (compiled or interpreted) Lisp file; do not load
+any window-system or TTY code, do not load the user init file, the site
+file, or the early packages. This is comparable to running
+@samp{xemacs} @samp{-batch} @samp{-l} @var{file}.
+
+You can also specify this flag implicitly by calling the XEmacs binary
+with a value for @samp{argv[0]} of @samp{xemacs-script}, normally by
+means of a symbolic link. On a POSIX system, this means that adding the
+line:
+
+@example
+#!/usr/bin/env xemacs-script
+@end example
+
+at the start of an XEmacs Lisp file, and changing that file's
+permissions to executable, creates a script that can be invoked by
+typing the path to the file. XEmacs has logic to ignore the #! line at
+the start of the script, so that won't cause an error.
+
@item -vanilla
This is equivalent to @samp{-q -no-site-file -no-early-packages}.
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 src/ChangeLog
--- a/src/ChangeLog Sun Jan 20 13:09:58 2008 +0100
+++ b/src/ChangeLog Sun Jan 20 19:53:54 2008 +0100
@@ -1,3 +1,15 @@ 2007-12-26 Aidan Kehoe <kehoea@parhasa
+2008-01-20 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * config.h.in: Add SHEBANG_PROGNAME.
+ * emacs.c (main_1):
+ If we've been called using SHEBANG_PROGNAME, rewrite our arguments
+ to add a --script argument.
+ Also, handle the --script argument by setting noninteractive and
+ vanilla.
+ * lread.c (Fload_internal):
+ If the first two characters of a file are #!, replace them with ;!
+ before they get to the Lisp reader.
+
2007-12-26 Aidan Kehoe <kehoea(a)parhasard.net>
* casetab.c:
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 src/config.h.in
--- a/src/config.h.in Sun Jan 20 13:09:58 2008 +0100
+++ b/src/config.h.in Sun Jan 20 19:53:54 2008 +0100
@@ -90,6 +90,9 @@ things are arranged in config.h.in. In
/* Program name */
#undef EMACS_PROGNAME
+
+/* Name of the link to the program to be used with #! scripts */
+#undef SHEBANG_PROGNAME
/* Allow s&m files to differentiate OS versions without having
multiple files to maintain. */
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 src/emacs.c
--- a/src/emacs.c Sun Jan 20 13:09:58 2008 +0100
+++ b/src/emacs.c Sun Jan 20 19:53:54 2008 +0100
@@ -955,6 +955,42 @@ main_1 (int argc, Wexttext **argv, Wextt
init_free_hook ();
#endif
+#define SHEBANG_PROGNAME_LENGTH \
+ (int)((sizeof (WEXTSTRING (SHEBANG_PROGNAME)) - sizeof (WEXTSTRING (""))))
+#define SHEBANG_EXE_PROGNAME_LENGTH \
+ (int)(sizeof (WEXTSTRING (SHEBANG_PROGNAME ".exe")) \
+ - sizeof (WEXTSTRING ("")))
+
+ {
+ int progname_len = wext_strlen (argv[0]);
+ if (progname_len >= SHEBANG_PROGNAME_LENGTH)
+ {
+ if (!wext_strcmp_ascii (argv[0] +
+ (progname_len - SHEBANG_PROGNAME_LENGTH),
+ SHEBANG_PROGNAME)
+ /* Allow trailing .exe. Don't check it, it could also be
+ .com. */
+ || (progname_len >= SHEBANG_EXE_PROGNAME_LENGTH &&
+ !wext_strncmp_ascii
+ (argv[0] + (progname_len - SHEBANG_EXE_PROGNAME_LENGTH),
+ SHEBANG_PROGNAME,
+ SHEBANG_PROGNAME_LENGTH)))
+ {
+ Wexttext **newarr = alloca_array (Wexttext *, argc + 2);
+ int j;
+
+ newarr[0] = argv[0];
+ newarr[1] = WEXTSTRING ("--script");
+ for (j = 1; j < argc; ++j)
+ {
+ newarr[j + 1] = argv[j];
+ }
+ argv = newarr;
+ argc++;
+ }
+ }
+ }
+
sort_args (argc, argv);
#if 0 /* defined (_SCO_DS)
@@ -1048,6 +1084,20 @@ main_1 (int argc, Wexttext **argv, Wextt
noninteractive = 1;
}
+ {
+ int count_before = skip_args;
+ /* Handle the -script switch, which implies batch and vanilla. The -l
+ part of its functionality is implemented in Lisp. */
+ if (argmatch (argv, argc, "-script", "--script", 0, NULL,
+ &skip_args))
+ {
+ noninteractive = 1;
+ vanilla_inhibiting = 1;
+ }
+
+ /* Don't actually discard this argument. */
+ skip_args = count_before;
+ }
#ifdef WIN32_NATIVE
{
/* Since we aren't a console application, we can't easily be terminated
@@ -2690,6 +2740,7 @@ static const struct standard_args standa
{ "-sd", "--show-dump-id", 105, 0 },
{ "-nd", "--no-dump-file", 95, 0 },
{ "-batch", "--batch", 88, 0 },
+ { "-script", "--script", 89, 1 },
#ifdef WIN32_NATIVE
{ "-mswindows-termination-handle", 0, 84, 1 },
{ "-nuni", "--no-unicode-lib-calls", 83, 0 },
diff -r 8bbabcab2c42867d7ed8338cc5f575551fd2443c -r fd8a9a4d81d944bffd5a1c3258dab652470b27d4 src/lread.c
--- a/src/lread.c Sun Jan 20 13:09:58 2008 +0100
+++ b/src/lread.c Sun Jan 20 19:53:54 2008 +0100
@@ -743,6 +743,25 @@ do { \
/* set it to nil; a call to #'domain will set it. */
internal_bind_lisp_object (&Vfile_domain, Qnil);
#endif
+
+ /* Is there a #!? If so, read it, and unread ;!.
+
+ GNU implement this by treating any #! anywhere in the source text as
+ commenting out the whole line. */
+ {
+ char shebangp[2];
+ int num_read;
+
+ num_read = Lstream_read (XLSTREAM (lispstream), shebangp,
+ sizeof(shebangp));
+ if (sizeof(shebangp) == num_read
+ && 0 == strncmp("#!", shebangp, sizeof(shebangp)))
+ {
+ shebangp[0] = ';';
+ }
+
+ Lstream_unread (XLSTREAM (lispstream), shebangp, num_read);
+ }
/* Now determine what sort of ELC file we're reading in. */
internal_bind_int (&load_byte_code_version, load_byte_code_version);
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [PATCH] Support Carbon-specific package paths.
16 years, 5 months
Aidan Kehoe
Ar an dara lá déag de mí Bealtaine, scríobh Michael Sperber:
>
> Aidan Kehoe <kehoea(a)parhasard.net> writes:
>
> > Ar an dara lá déag de mí Bealtaine, scríobh Michael Sperber:
> >
> > > Aidan Kehoe <kehoea(a)parhasard.net> writes:
> > >
> > > > Didier, you’ve mentioned wanting this a couple of times. The main
> > > > thing I’m not sure about with this patch is whether it’s worth
> > > > separating out the path into a variable on its own; probably not.
> > > >
> > > > Michael, is this a kosher approach to take? It *works* fine for me.
> > >
> > > Not quite, as the path in the home directory is not an installation
> > > root: You should take that part out and instead set
> > > `user-init-directory' correctly, I think.
> >
> > Hmm, won’t that make it look under ~/Library/Application Support for
> > init.el? I don’t really want that, personally.
>
> Yes it would, and I think it would be the natural consequence of the
> change you're suggesting we make---which is why I'm somewhat dubious
> about it. I'd rather just have it be ~/.xemacs everwhere rather than
> having platform-specific changes, even if Mac OS X conventions say
> otherwise.
What does Aquamacs do?
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, 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
commit: Fix path-configuration glitches:
16 years, 5 months
Michael Sperber
changeset: 4455:49f8ed0345005a02146572b11bdb55f0127d3bf2
tag: tip
user: Mike Sperber <sperber(a)deinprogramm.de>
date: Mon May 12 11:53:04 2008 +0200
files: ChangeLog configure configure.ac
description:
Fix path-configuration glitches:
2008-05-12 Michael Sperber <mike(a)xemacs.org>
* configure.ac:
A number of the checks that tried to determine whether an explicit
path was specified were wrong.
Also, add an AC_SUBST for INFOPATH.
diff -r 1f0aa40cafe090edac8b2a0584e86050da240da7 -r 49f8ed0345005a02146572b11bdb55f0127d3bf2 ChangeLog
--- a/ChangeLog Sun May 11 12:03:07 2008 +0200
+++ b/ChangeLog Mon May 12 11:53:04 2008 +0200
@@ -1,3 +1,10 @@ 2008-05-07 Aidan Kehoe <kehoea@parhasa
+2008-05-12 Michael Sperber <mike(a)xemacs.org>
+
+ * configure.ac:
+ A number of the checks that tried to determine whether an explicit
+ path was specified were wrong.
+ Also, add an AC_SUBST for INFOPATH.
+
2008-05-07 Aidan Kehoe <kehoea(a)parhasard.net>
* configure.ac (XE_EXPAND_VARIABLE): Call AC_SUBST on
diff -r 1f0aa40cafe090edac8b2a0584e86050da240da7 -r 49f8ed0345005a02146572b11bdb55f0127d3bf2 configure
--- a/configure Sun May 11 12:03:07 2008 +0200
+++ b/configure Mon May 12 11:53:04 2008 +0200
@@ -779,6 +779,7 @@ INFODIR
INFODIR
infopath
INFOPATH_USER_DEFINED
+INFOPATH
early_packages
EARLY_PACKAGE_DIRECTORIES_USER_DEFINED
EARLY_PACKAGE_DIRECTORIES
@@ -4548,39 +4549,6 @@ while true; do
*) break ;;
esac
done
-
-if test "x$datadir_expanded" != "x$prefix_expanded/share"
-then
- cat >>confdefs.h <<\_ACEOF
-#define INFODIR_USER_DEFINED 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define LISPDIR_USER_DEFINED 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define ETCDIR_USER_DEFINED 1
-_ACEOF
-
-fi
-
-if test "x$lib_expanded" != "x$prefix_expanded/lib"
-then
- cat >>confdefs.h <<\_ACEOF
-#define MODULEDIR_USER_DEFINED 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define ARCHLIBDIR_USER_DEFINED 1
-_ACEOF
-
- cat >>confdefs.h <<\_ACEOF
-#define DOCDIR_USER_DEFINED 1
-_ACEOF
-
-fi
-
exec_prefix_expanded=$exec_prefix
while true; do
case "$exec_prefix_expanded" in
@@ -4595,15 +4563,6 @@ while true; do
*) break ;;
esac
done
-
-if test "x$libdir_expanded" != "x$exec_prefix_expanded/lib"
-then
- cat >>confdefs.h <<\_ACEOF
-#define ARCHLIBDIR_USER_DEFINED 1
-_ACEOF
-
-fi
-
mandir_expanded=$mandir
while true; do
case "$mandir_expanded" in
@@ -4611,12 +4570,6 @@ while true; do
*) break ;;
esac
done
-
-if test "x$mandir_expanded" = "x$prefix_expanded/man"
-then
- mandir='${datarootdir}/man/man1'
-fi
-
infodir_expanded=$infodir
while true; do
case "$infodir_expanded" in
@@ -4625,7 +4578,39 @@ while true; do
esac
done
-if test "x$infodir_expanded" != "x${prefix_expanded}/info"
+if test "x$datadir_expanded" != "x$prefix_expanded/share"
+then
+ cat >>confdefs.h <<\_ACEOF
+#define INFODIR_USER_DEFINED 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define LISPDIR_USER_DEFINED 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define ETCDIR_USER_DEFINED 1
+_ACEOF
+
+fi
+
+if test "x$libdir_expanded" != "x$prefix_expanded/lib"
+then
+ cat >>confdefs.h <<\_ACEOF
+#define MODULEDIR_USER_DEFINED 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define ARCHLIBDIR_USER_DEFINED 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define DOCDIR_USER_DEFINED 1
+_ACEOF
+
+fi
+
+if test "x$infodir_expanded" != "x${prefix_expanded}/share/info"
then
cat >>confdefs.h <<\_ACEOF
#define INFODIR_USER_DEFINED 1
@@ -39133,6 +39118,7 @@ while true; do
*) break ;;
esac
done
+
test -n "$with_user_packages" && with_early_packages=$with_user_packages
early_packages=$with_early_packages
@@ -40576,6 +40562,7 @@ INFODIR!$INFODIR$ac_delim
INFODIR!$INFODIR$ac_delim
infopath!$infopath$ac_delim
INFOPATH_USER_DEFINED!$INFOPATH_USER_DEFINED$ac_delim
+INFOPATH!$INFOPATH$ac_delim
early_packages!$early_packages$ac_delim
EARLY_PACKAGE_DIRECTORIES_USER_DEFINED!$EARLY_PACKAGE_DIRECTORIES_USER_DEFINED$ac_delim
EARLY_PACKAGE_DIRECTORIES!$EARLY_PACKAGE_DIRECTORIES$ac_delim
@@ -40632,7 +40619,7 @@ LTLIBOBJS!$LTLIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 75; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 76; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff -r 1f0aa40cafe090edac8b2a0584e86050da240da7 -r 49f8ed0345005a02146572b11bdb55f0127d3bf2 configure.ac
--- a/configure.ac Sun May 11 12:03:07 2008 +0200
+++ b/configure.ac Mon May 12 11:53:04 2008 +0200
@@ -1068,6 +1068,10 @@ done])dnl XE_EXPAND_VARIABLE
XE_EXPAND_VARIABLE(prefix,prefix_expanded)
XE_EXPAND_VARIABLE(datadir,datadir_expanded)
+XE_EXPAND_VARIABLE(exec_prefix,exec_prefix_expanded)
+XE_EXPAND_VARIABLE(libdir,libdir_expanded)
+XE_EXPAND_VARIABLE(mandir,mandir_expanded)
+XE_EXPAND_VARIABLE(infodir,infodir_expanded)
if test "x$datadir_expanded" != "x$prefix_expanded/share"
then
@@ -1076,31 +1080,14 @@ then
AC_DEFINE(ETCDIR_USER_DEFINED)
fi
-if test "x$lib_expanded" != "x$prefix_expanded/lib"
+if test "x$libdir_expanded" != "x$prefix_expanded/lib"
then
AC_DEFINE(MODULEDIR_USER_DEFINED)
AC_DEFINE(ARCHLIBDIR_USER_DEFINED)
AC_DEFINE(DOCDIR_USER_DEFINED)
fi
-XE_EXPAND_VARIABLE(exec_prefix,exec_prefix_expanded)
-XE_EXPAND_VARIABLE(libdir,libdir_expanded)
-
-if test "x$libdir_expanded" != "x$exec_prefix_expanded/lib"
-then
- AC_DEFINE(ARCHLIBDIR_USER_DEFINED)
-fi
-
-XE_EXPAND_VARIABLE(mandir,mandir_expanded)
-
-if test "x$mandir_expanded" = "x$prefix_expanded/man"
-then
- mandir='${datarootdir}/man/man1'
-fi
-
-XE_EXPAND_VARIABLE(infodir,infodir_expanded)
-
-if test "x$infodir_expanded" != "x${prefix_expanded}/info"
+if test "x$infodir_expanded" != "x${prefix_expanded}/share/info"
then
AC_DEFINE(INFODIR_USER_DEFINED)
else
@@ -5771,6 +5758,7 @@ AC_SUBST(infopath,$with_infopath)
AC_SUBST(infopath,$with_infopath)
AC_SUBST(INFOPATH_USER_DEFINED)
XE_EXPAND_VARIABLE(with_info_path,INFOPATH)
+AC_SUBST(INFOPATH)
test -n "$with_user_packages" && with_early_packages=$with_user_packages
AC_SUBST(early_packages,$with_early_packages)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [PATCH] Support Carbon-specific package paths.
16 years, 5 months
Aidan Kehoe
Ar an dara lá déag de mí Bealtaine, scríobh Michael Sperber:
> Aidan Kehoe <kehoea(a)parhasard.net> writes:
>
> > Didier, you’ve mentioned wanting this a couple of times. The main thing
> > I’m not sure about with this patch is whether it’s worth separating out
> > the path into a variable on its own; probably not.
> >
> > Michael, is this a kosher approach to take? It *works* fine for me.
>
> Not quite, as the path in the home directory is not an installation
> root: You should take that part out and instead set
> `user-init-directory' correctly, I think.
Hmm, won’t that make it look under ~/Library/Application Support for
init.el? I don’t really want that, personally.
--
¿Dónde estará ahora mi sobrino Yoghurtu Nghé, 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