Latest Cygwin Xpm-noX package breaks configure (with patch to configure.ac)
17 years, 10 months
Rick Rankin
A recent update to the Cygwin Xpm package has caused a problem with XEmacs configure when configuring for a non-X Cygwin build. The Cygwin folks renamed the library from libXpm.a to libXpm-noX.a. With the attached patch to configure.ac, configure can find the correct library.
I tested the patch on Cygwin with no-X, X-only, and combined builds, as well as on Linux (Fedora Core 6). Everything worked except the X-only Cygwin build, which failed to link because of undefined externals from src/intl-auto-encap-win32.c. I'm not sure if this file should even be used in an X-only build. It's also not clear how common an X-only build on Cygwin is, or if this issue is even worth fixing. An X-only build is an option, however, which is why I tested it.
--Rick
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Show UCS, character set in what-cursor-position.
17 years, 10 months
Aidan Kehoe
The current behaviour of what-cursor-position is annoyingly useless for
non-Latin-1 characters; it’s irrelevant what the character’s integer code
is, what I want to know about a character is its Unicode code point, and
then its Mule charset, and its position codes in that Mule charset. Our
friends in Massachusetts give more detailed information with a prefix
argument, like so:
character: ƒ (01210322, 331986, 0x510d2, U+0192)
charset: mule-unicode-0100-24ff
(Unicode characters of the range U+0100..U+24FF.)
code point: 33 82
syntax: w which means: word
category: l:Latin
buffer code: 0x9C 0xF4 0xA1 0xD2
file code: 0xC6 0x92 (encoded by coding system mule-utf-8)
display: by this font (glyph code)
-microsoft-verdana-medium-r-normal--12-116-74-75-p-74-iso10646-1 (0x192)
This is helpful (with the exception of the buffer code), but the functions
needed to integrate that into XEmacs that are very extensive, and I would
prefer to commit this for the moment:
lisp/ChangeLog addition:
2006-12-04 Aidan Kehoe <kehoea(a)parhasard.net>
* simple.el (what-cursor-position):
For non-ASCII characters, give details on what a character maps to
in Unicode, and its Mule charsets and codes, instead of simply its
integer code point in this XEmacs.
src/ChangeLog addition:
2006-12-04 Aidan Kehoe <kehoea(a)parhasard.net>
* text.c (Fsplit_char):
Make split-char available on non-Mule builds, taking out a
superfluous call to get-charset to make that possible.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: src/text.c
===================================================================
RCS lisp/simple.el
===================================================================
RCS
Index: lisp/simple.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/simple.el,v
retrieving revision 1.56
diff -u -u -r1.56 simple.el
--- lisp/simple.el 2006/11/01 21:35:36 1.56
+++ lisp/simple.el 2006/12/04 21:03:26
@@ -783,7 +783,10 @@
(- (buffer-size) (forward-line (buffer-size)))))))
(defun what-cursor-position ()
- "Print info on cursor position (on screen and within buffer)."
+ "Print info on cursor position (on screen and within buffer).
+Also describe the character after point, giving its UCS code point and Mule
+charset and codes; for ASCII characters, give its code in octal, decimal and
+hex."
;; XEmacs change
(interactive "_")
(let* ((char (char-after (point))) ; XEmacs
@@ -798,21 +801,29 @@
(hscroll (if (= (window-hscroll) 0)
""
(format " Hscroll=%d" (window-hscroll))))
- (col (+ (current-column) (if column-number-start-at-one 1 0))))
+ (col (+ (current-column) (if column-number-start-at-one 1 0)))
+ (unicode (and char (encode-char char 'ucs)))
+ (unicode-string (and unicode (natnump unicode)
+ (format (if (> unicode #xFFFF) "U+%06X" "U+%04X")
+ unicode)))
+ (narrowed-details (if (or (/= beg 1) (/= end (1+ total)))
+ (format " <%d - %d>" beg end)
+ "")))
+
(if (= pos end)
- (if (or (/= beg 1) (/= end (1+ total)))
- (message "point=%d of %d(%d%%) <%d - %d> column %d %s"
- pos total percent beg end col hscroll)
- (message "point=%d of %d(%d%%) column %d %s"
- pos total percent col hscroll))
- ;; XEmacs: don't use single-key-description
- (if (or (/= beg 1) (/= end (1+ total)))
- (message "Char: %s (0%o, %d, 0x%x) point=%d of %d(%d%%) <%d - %d> column %d %s"
- (text-char-description char) char char char pos total
- percent beg end col hscroll)
- (message "Char: %s (0%o, %d, 0x%x) point=%d of %d(%d%%) column %d %s"
- (text-char-description char) char char char pos total
- percent col hscroll)))))
+ (message "point=%d of %d(%d%%)%s column %d %s"
+ pos total percent narrowed-details col hscroll)
+ ;; XEmacs: don't use single-key-description, treat non-ASCII
+ ;; characters differently.
+ (if (< char ?\x80)
+ (message "Char: %s (0%o, %d, %x) point=%d of %d(%d%%)%s column %d %s"
+ (text-char-description char) char char char pos total
+ percent narrowed-details col hscroll)
+ (message "Char: %s (%s %s) point=%d of %d(%d%%)%s column %d %s"
+ (text-char-description char) unicode-string
+ (mapconcat (lambda (arg) (format "%S" arg)) (split-char char) " ")
+ pos total
+ percent narrowed-details col hscroll)))))
(defun fundamental-mode ()
"Major mode not specialized for anything in particular.
Index: src/text.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/text.c,v
retrieving revision 1.29
diff -u -u -r1.29 text.c
--- src/text.c 2006/08/24 21:21:36 1.29
+++ src/text.c 2006/12/04 21:03:29
@@ -5000,6 +5000,8 @@
invalid_constant ("Octet number must be 0 or 1", n);
}
+#endif /* MULE */
+
DEFUN ("split-char", Fsplit_char, 1, 1, 0, /*
Return list of charset and one or two position-codes of CHAR.
*/
@@ -5016,7 +5018,7 @@
BREAKUP_ICHAR (XCHAR (character), charset, c1, c2);
- if (XCHARSET_DIMENSION (Fget_charset (charset)) == 2)
+ if (XCHARSET_DIMENSION (charset) == 2)
{
rc = list3 (XCHARSET_NAME (charset), make_int (c1), make_int (c2));
}
@@ -5029,8 +5031,6 @@
return rc;
}
-#endif /* MULE */
-
/************************************************************************/
/* composite character functions */
@@ -5128,11 +5128,11 @@
syms_of_text (void)
{
DEFSUBR (Fmake_char);
+ DEFSUBR (Fsplit_char);
#ifdef MULE
DEFSUBR (Fchar_charset);
DEFSUBR (Fchar_octet);
- DEFSUBR (Fsplit_char);
#ifdef ENABLE_COMPOSITE_CHARS
DEFSUBR (Fmake_composite_char);
--
Santa Maradona, priez pour moi!
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[21.5] Check for u_int*_t typedefs in configure.ac
17 years, 10 months
Dr. Volker Zell
Hi
The following patch is for 21.5. An equivalent patch for 21.4 has
already been accepted.
2006-12-06 Dr. Volker Zell <Dr.Volker.Zell(a)oracle.com>
* configure.ac: Check for u_int*_t typedefs.
* config.h.in: New HAVE_U_INT*_T defines.
* database.c: Only use u_int*_t typedefs if not already
defined.
--- configure.ac.orig 2006-12-06 11:25:31.135572800 +0100
+++ configure.ac 2006-12-06 12:27:46.036096000 +0100
@@ -5351,6 +5351,9 @@
"$enable_database_dbm" = "yes" && \
AC_DEFINE(HAVE_DBM)
+dnl Check for u_int*_t typedefs.
+AC_CHECK_TYPES([u_int8_t, u_int16_t, u_int32_t, u_int64_t])
+
dnl Check for Berkeley DB.
if test "$enable_database_berkdb" != "no"; then
AC_MSG_CHECKING(for Berkeley db.h)
@@ -5361,14 +5364,22 @@
#ifdef HAVE_INTTYPES_H
#define __BIT_TYPES_DEFINED__
#include <inttypes.h>
+#if !HAVE_U_INT8_T
typedef uint8_t u_int8_t;
+#endif
+#if !HAVE_U_INT16_T
typedef uint16_t u_int16_t;
+#endif
+#if !HAVE_U_INT32_T
typedef uint32_t u_int32_t;
+#endif
#ifdef WE_DONT_NEED_QUADS
+#if !HAVE_U_INT64_T
typedef uint64_t u_int64_t;
#endif
#endif
#endif
+#endif
#include <$header>
])], db_h_file="$header"; break)
done
--- config.h.in.orig 2006-12-06 11:18:41.426440000 +0100
+++ config.h.in 2006-12-06 12:26:23.337180800 +0100
@@ -523,6 +523,15 @@
/* Compile in support for DBM databases? May require libgdbm or libdbm. */
#undef HAVE_DBM
+/* Define to 1 if the system has the type `u_int8_t'. */
+#undef HAVE_U_INT8_T
+/* Define to 1 if the system has the type `u_int16_t'. */
+#undef HAVE_U_INT16_T
+/* Define to 1 if the system has the type `u_int32_t'. */
+#undef HAVE_U_INT32_T
+/* Define to 1 if the system has the type `u_int64_t'. */
+#undef HAVE_U_INT64_T
+
/* Compile in support for Berkeley DB style databases? May require libdb. */
#undef HAVE_BERKELEY_DB
/* Full #include file path for Berkeley DB's db.h */
--- database.c.orig 2006-12-06 11:22:18.408444800 +0100
+++ database.c 2006-12-06 12:29:23.806683200 +0100
@@ -45,16 +45,24 @@
/* glibc 2.1 doesn't have this problem with DB 2.x */
#if !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1)
#ifdef HAVE_INTTYPES_H
+#ifndef __BIT_TYPES_DEFINED__
#define __BIT_TYPES_DEFINED__
+#endif
#include <inttypes.h>
-#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__APPLE__)
+#if !HAVE_U_INT8_T
typedef uint8_t u_int8_t;
+#endif
+#if !HAVE_U_INT16_T
typedef uint16_t u_int16_t;
+#endif
+#if !HAVE_U_INT32_T
typedef uint32_t u_int32_t;
+#endif
#ifdef WE_DONT_NEED_QUADS
+#if !HAVE_U_INT64_T
typedef uint64_t u_int64_t;
+#endif
#endif /* WE_DONT_NEED_QUADS */
-#endif /* __FreeBSD__ */
#endif /* HAVE_INTTYPES_H */
#endif /* !(defined __GLIBC__ && __GLIBC_MINOR__ >= 1) */
/* Berkeley DB wants __STDC__ to be defined; else if does `#define const' */
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Make File->Print work under Cygwin X11 version of XEmacs
17 years, 10 months
Dr. Volker Zell
2006-12-05 Dr. Volker Zell <Dr.Volker.Zell(a)oracle.com>
* printer.el (generic-print-buffer): Make File->Print work under Cygwin
X11 version of XEmacs, instead of emitting:
Feature not yet implemented: "Dialog box type", print-setup
(generic-print-region): Ditto.
diff -urN origsrc/xemacs-21.4.19/lisp/printer.el src/xemacs-21.4.19/lisp/printer.el
--- origsrc/xemacs-21.4.19/lisp/printer.el 2002-08-20 13:35:01.000000000 +0200
+++ src/xemacs-21.4.19/lisp/printer.el 2006-12-05 23:22:21.959220800 +0100
@@ -261,7 +261,8 @@
(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))
- (not display-print-dialog))
+ (not display-print-dialog)
+ (not (string-equal (device-type) "mswindows")))
(generic-print-region start end buffer)
(let* ((d (Printer-get-device))
(props (make-dialog-box 'print :device d
@@ -309,7 +310,8 @@
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 ((and (valid-specifier-tag-p 'msprinter)
+ (string-equal (device-type) "mswindows"))
;; 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
The same patch should probably be applied to 21.5.
Ciao
Volker
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Fix file-name handling for `insert-file-contents'
17 years, 10 months
Michael Sperber
This was happening too late (in `insert-file-contents-internal'),
because `insert-file-contents' would do stuff before calling
`insert-file-contents-internal'.
This would cause unpleasant interactions (with Dired, for example),
causing the coding-system problems with Dired.
2006-11-30 Mike Sperber <mike(a)xemacs.org>
* fileio.c (Finsert_file_contents_internal): Don't call the
file-name handler for `insert-file-contents' from here, which is
too late. Instead, do it from Lisp.SSper
2006-11-30 Mike Sperber <mike(a)xemacs.org>
* code-files.el (insert-file-contents): Call the file-name handler
from Lisp, not from `insert-file-contents-internal', which is too late.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
Index: src/fileio.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/fileio.c,v
retrieving revision 1.107
diff -u -r1.107 fileio.c
--- src/fileio.c 1 Nov 2006 20:25:50 -0000 1.107
+++ src/fileio.c 30 Nov 2006 10:43:10 -0000
@@ -2844,16 +2844,6 @@
filename = Fexpand_file_name (filename, Qnil);
- /* If the file name has special constructs in it,
- call the corresponding file handler. */
- handler = Ffind_file_name_handler (filename, Qinsert_file_contents);
- if (!NILP (handler))
- {
- val = call6 (handler, Qinsert_file_contents, filename,
- visit, start, end, replace);
- goto handled;
- }
-
if (!NILP (used_codesys))
CHECK_SYMBOL (used_codesys);
Index: lisp/code-files.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/code-files.el,v
retrieving revision 1.19
diff -u -r1.19 code-files.el
--- lisp/code-files.el 7 Oct 2003 21:52:15 -0000 1.19
+++ lisp/code-files.el 30 Nov 2006 10:43:13 -0000
@@ -382,86 +382,90 @@
See also `insert-file-contents-access-hook',
`insert-file-contents-pre-hook', `insert-file-contents-error-hook',
and `insert-file-contents-post-hook'."
- (let (return-val coding-system used-codesys)
- ;; OK, first load the file.
- (condition-case err
- (progn
- (run-hook-with-args 'insert-file-contents-access-hook
- filename visit)
- ;; determine the coding system to use, as described above.
- (setq coding-system
- (or
- ;; #1.
- coding-system-for-read
- ;; #2.
- (run-hook-with-args-until-success
- 'insert-file-contents-pre-hook
- filename visit)
- ;; #3.
- (find-file-coding-system-for-read-from-filename filename)
- ;; #4.
- buffer-file-coding-system-for-read
- ;; #5.
- 'raw-text))
- (if (consp coding-system)
- (setq return-val coding-system)
- (if (null (find-coding-system coding-system))
- (progn
- (lwarn 'coding-system 'notice
- "Invalid coding-system (%s), using 'undecided"
- coding-system)
- (setq coding-system 'undecided)))
- (setq return-val
- (insert-file-contents-internal filename visit start end
- replace coding-system
- ;; store here!
- 'used-codesys))
- ))
- (file-error
- (run-hook-with-args 'insert-file-contents-error-hook
- filename visit err)
- (signal (car err) (cdr err))))
- (setq coding-system used-codesys)
- ;; call any `post-read-conversion' for the coding system that
- ;; was used ...
- (let ((func
- (coding-system-property coding-system 'post-read-conversion))
- (endmark (make-marker)))
- (set-marker endmark (+ (point) (nth 1 return-val)))
- (if func
- (unwind-protect
- (save-excursion
- (let (buffer-read-only)
- (if (>= (function-max-args func) 2)
- ;; #### fuckme! Someone at FSF changed the calling
- ;; convention of post-read-conversion. We try to
- ;; support the old way. #### Should we kill this?
- (funcall func (point) (marker-position endmark))
- (funcall func (- (marker-position endmark) (point))))))
- (if visit
- (progn
- (set-buffer-auto-saved)
- (set-buffer-modified-p nil)))))
- (setcar (cdr return-val) (- (marker-position endmark) (point))))
- ;; now finally set the buffer's `buffer-file-coding-system' ...
- (if (run-hook-with-args-until-success 'insert-file-contents-post-hook
- filename visit return-val)
- nil
- (if (local-variable-p 'buffer-file-coding-system (current-buffer))
- ;; if buffer-file-coding-system is already local, just
- ;; set its eol type to what was found, if it wasn't
- ;; set already.
- (set-buffer-file-coding-system
- (subsidiary-coding-system buffer-file-coding-system
- (coding-system-eol-type coding-system)) t)
- ;; otherwise actually set buffer-file-coding-system.
- (set-buffer-file-coding-system coding-system t)))
- ;; ... and `buffer-file-coding-system-when-loaded'. the machinations
- ;; of set-buffer-file-coding-system cause the actual coding system
- ;; object to be stored, so do that here, too.
- (setq buffer-file-coding-system-when-loaded
- (get-coding-system coding-system))
- return-val))
+ (let* ((expanded (substitute-in-file-name filename))
+ (handler (find-file-name-handler expanded 'insert-file-contents)))
+ (if handler
+ (funcall handler 'insert-file-contents filename visit start end replace)
+ (let (return-val coding-system used-codesys)
+ ;; OK, first load the file.
+ (condition-case err
+ (progn
+ (run-hook-with-args 'insert-file-contents-access-hook
+ filename visit)
+ ;; determine the coding system to use, as described above.
+ (setq coding-system
+ (or
+ ;; #1.
+ coding-system-for-read
+ ;; #2.
+ (run-hook-with-args-until-success
+ 'insert-file-contents-pre-hook
+ filename visit)
+ ;; #3.
+ (find-file-coding-system-for-read-from-filename filename)
+ ;; #4.
+ buffer-file-coding-system-for-read
+ ;; #5.
+ 'raw-text))
+ (if (consp coding-system)
+ (setq return-val coding-system)
+ (if (null (find-coding-system coding-system))
+ (progn
+ (lwarn 'coding-system 'notice
+ "Invalid coding-system (%s), using 'undecided"
+ coding-system)
+ (setq coding-system 'undecided)))
+ (setq return-val
+ (insert-file-contents-internal filename visit start end
+ replace coding-system
+ ;; store here!
+ 'used-codesys))
+ ))
+ (file-error
+ (run-hook-with-args 'insert-file-contents-error-hook
+ filename visit err)
+ (signal (car err) (cdr err))))
+ (setq coding-system used-codesys)
+ ;; call any `post-read-conversion' for the coding system that
+ ;; was used ...
+ (let ((func
+ (coding-system-property coding-system 'post-read-conversion))
+ (endmark (make-marker)))
+ (set-marker endmark (+ (point) (nth 1 return-val)))
+ (if func
+ (unwind-protect
+ (save-excursion
+ (let (buffer-read-only)
+ (if (>= (function-max-args func) 2)
+ ;; #### fuckme! Someone at FSF changed the calling
+ ;; convention of post-read-conversion. We try to
+ ;; support the old way. #### Should we kill this?
+ (funcall func (point) (marker-position endmark))
+ (funcall func (- (marker-position endmark) (point))))))
+ (if visit
+ (progn
+ (set-buffer-auto-saved)
+ (set-buffer-modified-p nil)))))
+ (setcar (cdr return-val) (- (marker-position endmark) (point))))
+ ;; now finally set the buffer's `buffer-file-coding-system' ...
+ (if (run-hook-with-args-until-success 'insert-file-contents-post-hook
+ filename visit return-val)
+ nil
+ (if (local-variable-p 'buffer-file-coding-system (current-buffer))
+ ;; if buffer-file-coding-system is already local, just
+ ;; set its eol type to what was found, if it wasn't
+ ;; set already.
+ (set-buffer-file-coding-system
+ (subsidiary-coding-system buffer-file-coding-system
+ (coding-system-eol-type coding-system)) t)
+ ;; otherwise actually set buffer-file-coding-system.
+ (set-buffer-file-coding-system coding-system t)))
+ ;; ... and `buffer-file-coding-system-when-loaded'. the machinations
+ ;; of set-buffer-file-coding-system cause the actual coding system
+ ;; object to be stored, so do that here, too.
+ (setq buffer-file-coding-system-when-loaded
+ (get-coding-system coding-system))
+ return-val))))
(defvar write-region-pre-hook nil
"A special hook to decide the coding system used for writing out a file.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [V] Don't use installed non-package Lisp when running from the source tree.
17 years, 10 months
Aidan Kehoe
Ar an ceathrú lá de mí na Nollaig, scríobh Michael Sperber:
> > 2006-12-03 Aidan Kehoe <kehoea(a)parhasard.net>
> >
> > * loadup.el:
> > * loadup.el (running-from-build-directory-p): New.
> > * startup.el (startup-setup-paths):
> > Never use the installed files if we're running from under the
> > build directory. Prevents conflicts with them.
>
> More hackery downstream from the path-searching library is likely to
> cause problems. The problem with changes like this is that some
> people *need* the behavior that appears causing trouble here.
>
> Aidan, could you forward to me the build-report e-mail this is a
> response to? I'll have a look at it.
I’m not subscribed, but the message is available under:
http://mid.gmane.org/m3r6vq7o9t.fsf@iny.iki.fi
Who needs the behaviour, specifically, of preferring installed (non-package)
files to those in the source tree when running in the source tree and when
the installed files are available? Why are they relying on
startup-setup-paths to do this?
--
Santa Maradona, priez pour moi!
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Don't use installed non-package Lisp when running from the source tree.
17 years, 10 months
Aidan Kehoe
Ar an séú lá is fiche de mí na Samhain, scríobh Ilpo Nyyssönen:
> [...] Load file misc: not found
> Fatal error during load, aborting
Ilpo, if you have the time to check, does the below fix your problem? If you
don’t, then that’s okay too.
(This is in response to your mail to xemacs-buildreports of the 26th of
November, m3r6vq7o9t.fsf(a)iny.iki.fi , subject [Failure] XEmacs 21.5-b27
"fiddleheads" (+CVS-20061125) i686-pc-linux.)
lisp/ChangeLog addition:
2006-12-03 Aidan Kehoe <kehoea(a)parhasard.net>
* loadup.el:
* loadup.el (running-from-build-directory-p): New.
* startup.el (startup-setup-paths):
Never use the installed files if we're running from under the
build directory. Prevents conflicts with them.
XEmacs Trunk source patch:
Diff command: cvs -q diff -Nu
Files affected: lisp/startup.el
===================================================================
RCS lisp/loadup.el
===================================================================
RCS
Index: lisp/loadup.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/loadup.el,v
retrieving revision 1.32
diff -u -u -r1.32 loadup.el
--- lisp/loadup.el 2006/07/16 12:23:58 1.32
+++ lisp/loadup.el 2006/12/03 14:52:30
@@ -57,6 +57,7 @@
"Root of tree containing the Lisp source code for the current build.
Differs from `lisp-directory' if this XEmacs has been installed. ")
+;; Evaluated at dump time, of course.
(defconst build-directory (expand-file-name ".." invocation-directory)
"Root of tree containing object files and executables produced by build.
Differs from `source-directory' if configured with --srcdir option, a practice
@@ -71,6 +72,12 @@
(defvar Installation-string nil
"Description of XEmacs installation.")
+
+(defun running-from-build-directory-p ()
+ "Is this XEmacs running from under the directory it was built in?
+Checks the actual file executed rather than the current directory at
+startup."
+ (equal (expand-file-name ".." invocation-directory) build-directory))
;(start-profiling)
Index: lisp/startup.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/lisp/startup.el,v
retrieving revision 1.57
diff -u -u -r1.57 startup.el
--- lisp/startup.el 2006/10/30 11:17:46 1.57
+++ lisp/startup.el 2006/12/03 14:52:31
@@ -1493,22 +1493,24 @@
'external-debugging-output)
)
- (setq lisp-directory (paths-find-lisp-directory emacs-roots))
+ (setq lisp-directory
+ ;; Never use the installed files if we're running from under the
+ ;; build directory.
+ (if (running-from-build-directory-p)
+ source-lisp
+ (paths-find-lisp-directory emacs-roots))
+ mule-lisp-directory
+ (when (featurep 'mule)
+ (if (running-from-build-directory-p)
+ (paths-construct-path (list source-lisp "mule"))
+ (paths-find-mule-lisp-directory emacs-roots lisp-directory))))
- (if debug-paths
- (princ (format "lisp-directory:\n%S\n" lisp-directory)
- 'external-debugging-output))
-
- (if (featurep 'mule)
- (progn
- (setq mule-lisp-directory
- (paths-find-mule-lisp-directory emacs-roots
- lisp-directory))
- (if debug-paths
- (princ (format "mule-lisp-directory:\n%S\n"
- mule-lisp-directory)
- 'external-debugging-output)))
- (setq mule-lisp-directory '()))
+ (when debug-paths
+ (princ (format "lisp-directory:\n%S\n" lisp-directory)
+ 'external-debugging-output)
+ (princ (format "mule-lisp-directory:\n%S\n"
+ mule-lisp-directory)
+ 'external-debugging-output))
(setq site-directory (and (null inhibit-site-lisp)
(paths-find-site-lisp-directory emacs-roots)))
--
Santa Maradona, priez pour moi!
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Revert workaround missing d_ino field from 'struct dirent' for Cygwin patch
17 years, 10 months
Dr. Volker Zell
2006-11-29 Dr. Volker Zell <Dr.Volker.Zell(a)oracle.com>
* sysdir.h: Revert workaround missing d_ino field from 'struct dirent'
for Cygwin as it's back in again.
diff -urN origsrc/xemacs-21.4.19/src/sysdir.h src/xemacs-21.4.19/src/sysdir.h
--- origsrc/xemacs-21.4.19/src/sysdir.h 2006-01-24 03:54:45.000000000 +0100
+++ src/xemacs-21.4.19/src/sysdir.h 2006-11-29 21:25:12.079908800 +0100
@@ -59,11 +59,7 @@
Since applying strlen to the name always works, we'll just do that. */
#define NAMLEN(p) strlen (p->d_name)
-#ifdef __CYGWIN__
-# define DIRENTRY_NONEMPTY(p) ((p)->d_name[0] != '\0')
-#else
# define DIRENTRY_NONEMPTY(p) ((p)->d_ino)
-#endif
/* encapsulation: directory calls */
An equivalent patch should also be applied to 21.5.
Ciao
Volker
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[PATCH] Re: [Failure] The Package Smoketest
17 years, 10 months
Aidan Kehoe
Ar an triochadú lá de mí na Samhain, scríobh Stephen J. Turnbull:
> Looks like it's probably related to your work, Aidan. Please fix.
Won’t get to committing it until this evening or tomorrow, but for
reference, here’s a fix.
--- fsf-compat-unicode.el~ 2006-11-30 10:26:10.453125000 +0100
+++ fsf-compat-unicode.el 2006-11-30 10:28:36.515625000 +0100
@@ -34,14 +34,44 @@
(encode-char (decode-char 'ucs #x31C) 'ucs))))
(error "Unicode support needed for this file not available!"))
-(define-ccl-program fsf-compat-ccl-encode-to-ucs-2
- `(1
- ((r1 = (r1 << 8))
- (r1 = (r1 | r2))
- (mule-to-unicode r0 r1)
- (r1 = (r0 >> 8))
- (r2 = (r0 & 255))))
- "CCL program to transform Mule characters to UCS-2.")
+
+(if (eval-when-compile
+ (and (> emacs-major-version 20)
+ (> emacs-minor-version 4)
+ (featurep 'mule)))
+
+ ;; If we're being compiled by 21.5, use the actual define-ccl-program
+ ;; macro, but evaluated at runtime.
+ ;;
+ ;; Having this as
+ ;;
+ ;; (eval-when-compile (and (featurep 'mule) (macroexpand
+ ;; '(define-ccl-program ...))
+ ;;
+ ;; in order to have the macro evaluated at compile time, results
+ ;; in the statement being empty in the compiled file, which as I
+ ;; understand it is a bug.
+
+ (eval
+ '(define-ccl-program fsf-compat-ccl-encode-to-ucs-2
+ `(1
+ ((r1 = (r1 << 8))
+ (r1 = (r1 | r2))
+ (mule-to-unicode r0 r1)
+ (r1 = (r0 >> 8))
+ (r2 = (r0 & 255))))
+ "CCL program to transform Mule characters to UCS-2."))
+
+ ;; Pre-expand the macro for 21.4. 21.4 will error on loading this file, but
+ ;; it may compile it. define-ccl-program should not be a macro, but that's
+ ;; by the way.
+ (let ((prog [1 10 131127 8 98872 65823 147513 8 82009 255 22]))
+ (defconst fsf-compat-ccl-encode-to-ucs-2 prog
+ "CCL program to transform Mule characters to UCS-2.")
+ (put (quote fsf-compat-ccl-encode-to-ucs-2)
+ (quote ccl-program-idx)
+ (register-ccl-program (quote fsf-compat-ccl-encode-to-ucs-2) prog))
+ nil))
(defun fsf-compat-init-mule-unicode-charsets ()
"Make some Mule character sets that the FSF uses available in XEmacs.
--
Santa Maradona, priez pour moi!
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches