carbon2-commit: configure, configure.ac: Fixed two typos in args of main: char *v -> char **v
15 years, 11 months
Aidan Kehoe
changeset: 4572:0ed907d0f1e9a1106751a8e192b2f7d9578ec016
user: "Vladimir G. Ivanovic" <vgivanovic(a)comcast.net>
date: Sat Dec 27 15:28:43 2008 +0000
files: ChangeLog configure configure.ac
description:
configure,configure.ac: Fixed two typos in args of main: char *v -> char **v
diff -r 69a1eda3da06721407d3085ed7aabd1112b22173 -r 0ed907d0f1e9a1106751a8e192b2f7d9578ec016 ChangeLog
--- a/ChangeLog Mon Dec 22 14:07:48 2008 +0000
+++ b/ChangeLog Sat Dec 27 15:28:43 2008 +0000
@@ -5,6 +5,11 @@ 2008-10-25 Stephen J. Turnbull <stephe
2008-10-25 Stephen J. Turnbull <stephen(a)xemacs.org>
* configure.ac (xemacs_cc_cc_mismatch): Improve g++ detection.
+
+2008-09-17 Vladimir G. Ivanovic <vladimir(a)acm.org>
+
+ * configure: Fixed two typos in args of main: char *v -> char **v
+ * configure.ac: Fixed two typos in args of main: char *v -> char **v
2008-08-03 Mats Lidell <matsl(a)xemacs.org>
diff -r 69a1eda3da06721407d3085ed7aabd1112b22173 -r 0ed907d0f1e9a1106751a8e192b2f7d9578ec016 configure
--- a/configure Mon Dec 22 14:07:48 2008 +0000
+++ b/configure Sat Dec 27 15:28:43 2008 +0000
@@ -19012,7 +19012,7 @@ cat >>conftest.$ac_ext <<_ACEOF
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <X11/Intrinsic.h>
- int main(int c, char *v) { return c>1 ? XlibSpecificationRelease : 0; }
+ int main(int c, char **v) { return c>1 ? XlibSpecificationRelease : 0; }
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
@@ -38857,7 +38857,7 @@ cat confdefs.h >>conftest.$ac_ext
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-int main(int c,char *v){return 0;}
+int main(int c,char **v){return 0;}
_ACEOF
rm -f conftest$ac_exeext
if { (ac_try="$ac_link"
diff -r 69a1eda3da06721407d3085ed7aabd1112b22173 -r 0ed907d0f1e9a1106751a8e192b2f7d9578ec016 configure.ac
--- a/configure.ac Mon Dec 22 14:07:48 2008 +0000
+++ b/configure.ac Sat Dec 27 15:28:43 2008 +0000
@@ -3434,7 +3434,7 @@ dnl Avoid re-AC_DEFINE-ing xmkmf symbols
AC_MSG_CHECKING(the version of X11 being used)
AC_RUN_IFELSE([AC_LANG_SOURCE([#include <X11/Intrinsic.h>
- int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }])],
+ int main(int c, char **v[]) { return c>1 ? XlibSpecificationRelease : 0; }])],
[./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4])
AC_MSG_RESULT(R${x11_release})
AC_DEFINE_UNQUOTED(THIS_IS_X11R${x11_release})
@@ -5582,7 +5582,7 @@ dnl One of the above link tests may have
dnl One of the above link tests may have succeeded but caused resulting
dnl executables to fail to run. Also any tests using AC_RUN_IFELSE will
dnl have reported incorrect results.
-AC_RUN_IFELSE([AC_LANG_SOURCE([int main(int c,char *v[]){return 0;}])],[:],[
+AC_RUN_IFELSE([AC_LANG_SOURCE([int main(int c,char **v[]){return 0;}])],[:],[
echo ""
echo "*** PANIC *** The C compiler can no longer build working executables."
echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Distinguish vars and functions in #'symbol-file, #'describe-{function, variable}
15 years, 11 months
Aidan Kehoe
changeset: 4571:69a1eda3da06721407d3085ed7aabd1112b22173
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Mon Dec 22 14:07:48 2008 +0000
files: lisp/ChangeLog lisp/cus-face.el lisp/help.el lisp/loadhist.el src/ChangeLog src/eval.c src/symbols.c
description:
Distinguish vars and functions in #'symbol-file, #'describe-{function,variable}
lisp/ChangeLog addition:
2008-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
* loadhist.el (symbol-file):
Add support for differentiating between variables and functions to
#'symbol-file.
* help.el (describe-function-1):
(describe-variable):
Call #'symbol-function explicitly with a 'defun or 'defvar
argument, depending on whether we're looking for a variable or a
function.
* cus-face.el (custom-declare-face):
Record information about the face in the load history; code taken
from GNU, pre-GPLv3 revision 1.45.
src/ChangeLog addition:
2008-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
* symbols.c (Fdefine_function):
* eval.c (define_function):
Record explicitly that we're defining a function in the load
history, in both these files.
diff -r f32c7f843961dee21a36b15b232b8ee66c009bb4 -r 69a1eda3da06721407d3085ed7aabd1112b22173 lisp/ChangeLog
--- a/lisp/ChangeLog Mon Dec 22 12:09:08 2008 +0000
+++ b/lisp/ChangeLog Mon Dec 22 14:07:48 2008 +0000
@@ -1,3 +1,17 @@ 2008-10-29 Stephen J. Turnbull <stephe
+2008-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * loadhist.el (symbol-file):
+ Add support for differentiating between variables and functions to
+ #'symbol-file.
+ * help.el (describe-function-1):
+ (describe-variable):
+ Call #'symbol-function explicitly with a 'defun or 'defvar
+ argument, depending on whether we're looking for a variable or a
+ function.
+ * cus-face.el (custom-declare-face):
+ Record information about the face in the load history; code taken
+ from GNU, pre-GPLv3 revision 1.45.
+
2008-10-29 Stephen J. Turnbull <stephen(a)xemacs.org>
* bytecomp.el (byte-compile-file): Protect encoding from latin-unity.
diff -r f32c7f843961dee21a36b15b232b8ee66c009bb4 -r 69a1eda3da06721407d3085ed7aabd1112b22173 lisp/cus-face.el
--- a/lisp/cus-face.el Mon Dec 22 12:09:08 2008 +0000
+++ b/lisp/cus-face.el Mon Dec 22 14:07:48 2008 +0000
@@ -50,6 +50,9 @@
frames (cdr frames))
(face-display-set face value frame '(custom)))
(init-face-from-resources face)))
+ ;; Don't record SPEC until we see it causes no errors.
+ (put face 'face-defface-spec spec)
+ (push (cons 'defface face) current-load-list)
(when (and doc (null (face-doc-string face)))
(set-face-doc-string face doc))
(custom-handle-all-keywords face args 'custom-face)
diff -r f32c7f843961dee21a36b15b232b8ee66c009bb4 -r 69a1eda3da06721407d3085ed7aabd1112b22173 lisp/help.el
--- a/lisp/help.el Mon Dec 22 12:09:08 2008 +0000
+++ b/lisp/help.el Mon Dec 22 14:07:48 2008 +0000
@@ -1425,7 +1425,7 @@ part of the documentation of internal su
nil)))
(princ "\n")
(or file-name
- (setq file-name (symbol-file function)))
+ (setq file-name (symbol-file function 'defun)))
(when file-name
(princ " -- loaded from \"")
(if (not (bufferp standard-output))
@@ -1651,7 +1651,7 @@ there is no variable around that point,
(princ (built-in-variable-doc variable))
(princ ".\n")
(require 'hyper-apropos)
- (let ((file-name (symbol-file variable))
+ (let ((file-name (symbol-file variable 'defvar))
opoint e)
(when file-name
(princ " -- loaded from \"")
diff -r f32c7f843961dee21a36b15b232b8ee66c009bb4 -r 69a1eda3da06721407d3085ed7aabd1112b22173 lisp/loadhist.el
--- a/lisp/loadhist.el Mon Dec 22 12:09:08 2008 +0000
+++ b/lisp/loadhist.el Mon Dec 22 14:07:48 2008 +0000
@@ -48,11 +48,12 @@ are acceptable.
are acceptable.
If TYPE is `defvar', then variable definitions are acceptable.
-#### For the moment the difference is not implemented for non-autoloaded
-Lisp symbols."
+`defface' specifies a face definition only, and for the moment, it won't
+return faces created with `make-face' or `copy-face', just those created
+with `defface' and `custom-declare-face'."
(interactive "SFind source file for symbol: ") ; XEmacs
(block look-up-symbol-file
- (let (built-in-file autoload-cons)
+ (let (built-in-file autoload-cons symbol-details)
(when (and
(eq 'autoload
(car-safe (setq autoload-cons
@@ -64,9 +65,25 @@ Lisp symbols."
(memq (fifth autoload-cons) '(nil macro)))))
(return-from look-up-symbol-file
(locate-library (second autoload-cons))))
- (dolist (entry load-history)
- (when (memq sym (cdr entry))
- (return-from look-up-symbol-file (car entry))))
+ (cond ((eq 'defvar type)
+ ;; Load history entries corresponding to variables are just
+ ;; symbols.
+ (dolist (entry load-history)
+ (when (memq sym (cdr entry))
+ (return-from look-up-symbol-file (car entry)))))
+ ((not (null type))
+ ;; Non-variables have the type stored as the car of the entry.
+ (dolist (entry load-history)
+ (when (and (setq symbol-details (rassq sym (cdr entry)))
+ (eq type (car symbol-details)))
+ (return-from look-up-symbol-file (car entry)))))
+ (t
+ ;; If TYPE hasn't been specified, we need to check both for
+ ;; variables and other symbols.
+ (dolist (entry load-history)
+ (when (or (memq sym (cdr entry))
+ (rassq sym (cdr entry)))
+ (return-from look-up-symbol-file (car entry))))))
(setq built-in-file (built-in-symbol-file sym type))
(if built-in-file (concat source-directory "/src/" built-in-file)))))
diff -r f32c7f843961dee21a36b15b232b8ee66c009bb4 -r 69a1eda3da06721407d3085ed7aabd1112b22173 src/ChangeLog
--- a/src/ChangeLog Mon Dec 22 12:09:08 2008 +0000
+++ b/src/ChangeLog Mon Dec 22 14:07:48 2008 +0000
@@ -1,3 +1,10 @@ 2008-12-22 Aidan Kehoe <kehoea@parhasa
+2008-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * symbols.c (Fdefine_function):
+ * eval.c (define_function):
+ Record explicitly that we're defining a function in the load
+ history, in both these files.
+
2008-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
* faces.c (Fbuilt_in_face_specifiers):
diff -r f32c7f843961dee21a36b15b232b8ee66c009bb4 -r 69a1eda3da06721407d3085ed7aabd1112b22173 src/eval.c
--- a/src/eval.c Mon Dec 22 12:09:08 2008 +0000
+++ b/src/eval.c Mon Dec 22 14:07:48 2008 +0000
@@ -1223,7 +1223,7 @@ define_function (Lisp_Object name, Lisp_
define_function (Lisp_Object name, Lisp_Object defn)
{
Ffset (name, defn);
- LOADHIST_ATTACH (name);
+ LOADHIST_ATTACH (Fcons (Qdefun, name));
return name;
}
diff -r f32c7f843961dee21a36b15b232b8ee66c009bb4 -r 69a1eda3da06721407d3085ed7aabd1112b22173 src/symbols.c
--- a/src/symbols.c Mon Dec 22 12:09:08 2008 +0000
+++ b/src/symbols.c Mon Dec 22 14:07:48 2008 +0000
@@ -718,7 +718,7 @@ Associates the function with the current
{
/* This function can GC */
Ffset (symbol, newdef);
- LOADHIST_ATTACH (symbol);
+ LOADHIST_ATTACH (Fcons (Qdefun, symbol));
return newdef;
}
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: #'built-in-face-specifiers; document that we're returning a copy.
15 years, 11 months
Aidan Kehoe
changeset: 4570:f32c7f843961dee21a36b15b232b8ee66c009bb4
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Mon Dec 22 12:09:08 2008 +0000
files: src/ChangeLog src/faces.c
description:
#'built-in-face-specifiers; document that we're returning a copy.
2008-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
* faces.c (Fbuilt_in_face_specifiers):
Document that we're returning a copy.
diff -r 4a7c4ccac2fe43b0e94d0273722f569258eae608 -r f32c7f843961dee21a36b15b232b8ee66c009bb4 src/ChangeLog
--- a/src/ChangeLog Mon Dec 22 12:05:47 2008 +0000
+++ b/src/ChangeLog Mon Dec 22 12:09:08 2008 +0000
@@ -1,3 +1,8 @@ 2008-12-21 Aidan Kehoe <kehoea@parhasa
+2008-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * faces.c (Fbuilt_in_face_specifiers):
+ Document that we're returning a copy.
+
2008-12-21 Aidan Kehoe <kehoea(a)parhasard.net>
* faces.c (Fbuilt_in_face_specifiers):
diff -r 4a7c4ccac2fe43b0e94d0273722f569258eae608 -r f32c7f843961dee21a36b15b232b8ee66c009bb4 src/faces.c
--- a/src/faces.c Mon Dec 22 12:05:47 2008 +0000
+++ b/src/faces.c Mon Dec 22 12:09:08 2008 +0000
@@ -703,6 +703,9 @@ Return the name of the given face.
DEFUN ("built-in-face-specifiers", Fbuilt_in_face_specifiers, 0, 0, 0, /*
Return a list of all built-in face specifier properties.
+
+This is a copy; there is no way to modify XEmacs' idea of the built-in face
+specifier properties from Lisp.
*/
())
{
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Return a list copy in #'built-in-face-specifiers, pre-empting modification.
15 years, 11 months
Aidan Kehoe
changeset: 4568:16906fefc8df0d642aec6fd43d78637af0054965
parent: 4566:b58af9a9765dec7ac331ed18350012172389688d
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Dec 21 17:23:06 2008 +0000
files: src/ChangeLog src/faces.c
description:
Return a list copy in #'built-in-face-specifiers, pre-empting modification.
2008-12-21 Aidan Kehoe <kehoea(a)parhasard.net>
* faces.c (Fbuilt_in_face_specifiers):
Don't simply warn the user not to modify
Vbuilt_in_face_specifiers, enforce this by returning a copy of the
list.
diff -r b58af9a9765dec7ac331ed18350012172389688d -r 16906fefc8df0d642aec6fd43d78637af0054965 src/ChangeLog
--- a/src/ChangeLog Sun Nov 02 03:59:54 2008 +0900
+++ b/src/ChangeLog Sun Dec 21 17:23:06 2008 +0000
@@ -1,3 +1,10 @@ 2008-11-02 Stephen J. Turnbull <stephe
+2008-12-21 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * faces.c (Fbuilt_in_face_specifiers):
+ Don't simply warn the user not to modify
+ Vbuilt_in_face_specifiers, enforce this by returning a copy of the
+ list.
+
2008-11-02 Stephen J. Turnbull <stephen(a)xemacs.org>
G++ 4.3 complains a lot about implicit conversions of string
diff -r b58af9a9765dec7ac331ed18350012172389688d -r 16906fefc8df0d642aec6fd43d78637af0054965 src/faces.c
--- a/src/faces.c Sun Nov 02 03:59:54 2008 +0900
+++ b/src/faces.c Sun Dec 21 17:23:06 2008 +0000
@@ -703,11 +703,10 @@ Return the name of the given face.
DEFUN ("built-in-face-specifiers", Fbuilt_in_face_specifiers, 0, 0, 0, /*
Return a list of all built-in face specifier properties.
-Don't modify this list!
*/
())
{
- return Vbuilt_in_face_specifiers;
+ return Fcopy_list(Vbuilt_in_face_specifiers);
}
/* These values are retrieved so often that we make a special
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Check absolute source file names against DOC with #'file-newer-than-file-p.
15 years, 11 months
Aidan Kehoe
Ar an triochadú lá de mí na Nollaig, scríobh Stephen J. Turnbull:
> I'm pretty sure that applying the following patch, then doing:
>
> mkdir what-would-jamie-do
> cd what-would-jamie-do
> ../configure
> make
>
> will make the symptoms evident. What to do about it is up to you, I'm
> in sympathy with using the relative path but it may not be easy.
> Obviously, breaking configure --srcdir isn't acceptable. I append the
> M-x report-xemacs-bug output for posterity's sake.
OK, fixed--the API of #'file-new-than-file-p is stupidly unintuitive, I
smell the work of a MacArthur genius. Thanks for the report!
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1230653399 0
# Node ID ab9e8f0fb295d0d0a41062759eff5d77be652c64
# Parent 44129f301385e892320cacced2696acdbdf6a1df
Check absolute source file names against DOC with #'file-newer-than-file-p.
2008-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* make-docfile.el:
Use absolute source file names when checking if DOC is out of
date, don't use relative paths that may not be related to the
current directory.
diff -r 44129f301385 -r ab9e8f0fb295 lisp/ChangeLog
--- a/lisp/ChangeLog Tue Dec 30 14:22:29 2008 +0000
+++ b/lisp/ChangeLog Tue Dec 30 16:09:59 2008 +0000
@@ -1,3 +1,10 @@
+2008-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * make-docfile.el:
+ Use absolute source file names when checking if DOC is out of
+ date, don't use relative paths that may not be related to the
+ current directory.
+
2008-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* frame.el (display-mouse-p):
diff -r 44129f301385 -r ab9e8f0fb295 lisp/make-docfile.el
--- a/lisp/make-docfile.el Tue Dec 30 14:22:29 2008 +0000
+++ b/lisp/make-docfile.el Tue Dec 30 16:09:59 2008 +0000
@@ -151,7 +151,7 @@
(load "setup-paths.el")
(load "raw-process.el")
-(let (preloaded-file-list arg0 arg package-preloaded-file-list)
+(let (preloaded-file-list arg0 arg package-preloaded-file-list absolute)
(load (expand-file-name "dumped-lisp.el" source-lisp))
(setq package-preloaded-file-list
@@ -168,7 +168,8 @@
(while preloaded-file-list
(setq arg0 (packages-add-suffix (car preloaded-file-list))
- arg (locate-library arg0))
+ arg (locate-library arg0)
+ absolute arg)
(if (null arg)
(progn
(message "Error: dumped file %s does not exist" arg0)
@@ -191,7 +192,8 @@
(if (null (member arg processed))
(progn
(if (and (null docfile-out-of-date)
- (file-newer-than-file-p arg docfile))
+ ;; We need to check the absolute path here:
+ (file-newer-than-file-p absolute docfile))
(setq docfile-out-of-date t))
(setq processed (cons arg processed)))))
(setq preloaded-file-list (cdr preloaded-file-list))))
--
¿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: Check absolute source file names against DOC with #'file-newer-than-file-p.
15 years, 11 months
Aidan Kehoe
changeset: 4547:ab9e8f0fb295d0d0a41062759eff5d77be652c64
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Dec 30 16:09:59 2008 +0000
files: lisp/ChangeLog lisp/make-docfile.el
description:
Check absolute source file names against DOC with #'file-newer-than-file-p.
2008-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* make-docfile.el:
Use absolute source file names when checking if DOC is out of
date, don't use relative paths that may not be related to the
current directory.
diff -r 44129f301385e892320cacced2696acdbdf6a1df -r ab9e8f0fb295d0d0a41062759eff5d77be652c64 lisp/ChangeLog
--- a/lisp/ChangeLog Tue Dec 30 14:22:29 2008 +0000
+++ b/lisp/ChangeLog Tue Dec 30 16:09:59 2008 +0000
@@ -1,3 +1,10 @@ 2008-12-30 Aidan Kehoe <kehoea@parhasa
+2008-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * make-docfile.el:
+ Use absolute source file names when checking if DOC is out of
+ date, don't use relative paths that may not be related to the
+ current directory.
+
2008-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* frame.el (display-mouse-p):
diff -r 44129f301385e892320cacced2696acdbdf6a1df -r ab9e8f0fb295d0d0a41062759eff5d77be652c64 lisp/make-docfile.el
--- a/lisp/make-docfile.el Tue Dec 30 14:22:29 2008 +0000
+++ b/lisp/make-docfile.el Tue Dec 30 16:09:59 2008 +0000
@@ -151,7 +151,7 @@
(load "setup-paths.el")
(load "raw-process.el")
-(let (preloaded-file-list arg0 arg package-preloaded-file-list)
+(let (preloaded-file-list arg0 arg package-preloaded-file-list absolute)
(load (expand-file-name "dumped-lisp.el" source-lisp))
(setq package-preloaded-file-list
@@ -168,7 +168,8 @@
(while preloaded-file-list
(setq arg0 (packages-add-suffix (car preloaded-file-list))
- arg (locate-library arg0))
+ arg (locate-library arg0)
+ absolute arg)
(if (null arg)
(progn
(message "Error: dumped file %s does not exist" arg0)
@@ -191,7 +192,8 @@
(if (null (member arg processed))
(progn
(if (and (null docfile-out-of-date)
- (file-newer-than-file-p arg docfile))
+ ;; We need to check the absolute path here:
+ (file-newer-than-file-p absolute docfile))
(setq docfile-out-of-date t))
(setq processed (cons arg processed)))))
(setq preloaded-file-list (cdr preloaded-file-list))))
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
[COMMIT] Make functions in frame.el more general.
15 years, 12 months
Aidan Kehoe
APPROVE COMMIT
NOTE; this patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1230646949 0
# Node ID 44129f301385e892320cacced2696acdbdf6a1df
# Parent 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1
Make functions in frame.el more general.
(This results in better behaviour on Carbon, notably.)
2008-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* frame.el (display-mouse-p):
(display-popup-menus-p):
(display-images-p):
(display-selections-p):
(display-visual-class):
Make all these functions more general, do not hard code device
type symbols where that is inappropriate.
diff -r 8775d3b54874 -r 44129f301385 lisp/ChangeLog
--- a/lisp/ChangeLog Mon Dec 29 23:36:00 2008 +0900
+++ b/lisp/ChangeLog Tue Dec 30 14:22:29 2008 +0000
@@ -1,3 +1,13 @@
+2008-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * frame.el (display-mouse-p):
+ (display-popup-menus-p):
+ (display-images-p):
+ (display-selections-p):
+ (display-visual-class):
+ Make all these functions more general, do not hard code device
+ type symbols where that is inappropriate.
+
2008-12-27 Aidan Kehoe <kehoea(a)parhasard.net>
* loadhist.el (symbol-file):
diff -r 8775d3b54874 -r 44129f301385 lisp/frame.el
--- a/lisp/frame.el Mon Dec 29 23:36:00 2008 +0900
+++ b/lisp/frame.el Tue Dec 30 14:22:29 2008 +0000
@@ -1179,21 +1179,29 @@
"Return non-nil if DISPLAY has a mouse available.
DISPLAY can be a frame, a device, a console, or nil (meaning the
selected frame)."
- (case (framep-on-display display)
- ;; We assume X, NeXTstep, and GTK *always* have a pointing device
- ((x ns gtk) t)
- (mswindows (> (declare-boundp mswindows-num-mouse-buttons) 0))
- (tty
+ (let (type)
+ (setq display (display-device display)
+ type (device-type display))
+ (cond
+ ((eq 'mswindows type)
+ (> (declare-boundp mswindows-num-mouse-buttons) 0))
+ ((device-on-window-system-p display)
+ ;; We assume X, NeXTstep, and GTK and the rest always have a pointing
+ ;; device.
+ t)
+ ((eq 'tty type)
(and-fboundp 'gpm-is-supported-p
- (gpm-is-supported-p (display-device display))))
- (t nil)))
+ (gpm-is-supported-p display)))
+ (t nil))))
(defun display-popup-menus-p (&optional display)
"Return non-nil if popup menus are supported on DISPLAY.
DISPLAY can be a frame, a device, a console, or nil (meaning the selected
frame). Support for popup menus requires that the mouse be available."
+ (setq display (display-device display))
(and
- (memq (framep-on-display display) '(x ns gtk mswindows))
+ (featurep 'menubar)
+ (device-on-window-system-p display)
(display-mouse-p display)))
(defun display-graphic-p (&optional display)
@@ -1203,13 +1211,17 @@
that use a window system such as X, and false for text-only terminals.
DISPLAY can be a frame, a device, a console, or nil (meaning the selected
frame)."
- (memq (framep-on-display display) '(x ns gtk mswindows)))
+ (device-on-window-system-p display))
(defun display-images-p (&optional display)
"Return non-nil if DISPLAY can display images.
DISPLAY can be a frame, a device, a console, or nil (meaning the selected
frame)."
- (display-graphic-p display))
+ (and (memq (image-instance-type (specifier-instance
+ (glyph-image xemacs-logo)
+ display))
+ '(color-pixmap mono-pixmap))
+ t))
(defalias 'display-multi-frame-p 'display-graphic-p)
(defalias 'display-multi-font-p 'display-graphic-p)
@@ -1221,7 +1233,11 @@
`clipboard'.
DISPLAY can be a frame, a device, a console, or nil (meaning the selected
frame)."
- (memq (framep-on-display display) '(x ns gtk mswindows)))
+ (or
+ (device-on-window-system-p display)
+ ;; GPM supports #'get-selection-foreign, but not #'own-selection.
+ (and-fboundp 'gpm-is-supported-p
+ (gpm-is-supported-p display))))
(defun display-screens (&optional display)
"Return the number of screens associated with DISPLAY."
@@ -1269,15 +1285,21 @@
"Returns the visual class of DISPLAY.
The value is one of the symbols `static-gray', `gray-scale',
`static-color', `pseudo-color', `true-color', or `direct-color'."
- (case (framep-on-display display)
- (x (declare-fboundp (x-display-visual-class (display-device display))))
- (gtk (declare-fboundp (gtk-display-visual-class (display-device display))))
- (mswindows (let ((planes (display-planes display)))
- (cond ((eq planes 1) 'static-gray)
- ((eq planes 4) 'static-color)
- ((> planes 8) 'true-color)
- (t 'pseudo-color))))
- (t 'static-gray)))
+ (let (type planes)
+ (setq display (display-device display)
+ type (device-type display))
+ (cond
+ ((eq 'x type)
+ (declare-fboundp (x-display-visual-class display)))
+ ((eq 'gtk type)
+ (declare-fboundp (gtk-display-visual-class display)))
+ ((device-on-window-system-p display)
+ (setq planes (display-planes display))
+ (cond ((eq planes 1) 'static-gray)
+ ((eq planes 4) 'static-color)
+ ((> planes 8) 'true-color)
+ (t 'pseudo-color)))
+ (t 'static-gray))))
;; XEmacs change: omit the Emacs 18 compatibility functions:
--
¿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: Make functions in frame.el more general.
15 years, 12 months
Aidan Kehoe
changeset: 4546:44129f301385e892320cacced2696acdbdf6a1df
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Tue Dec 30 14:22:29 2008 +0000
files: lisp/ChangeLog lisp/frame.el
description:
Make functions in frame.el more general.
(This results in better behaviour on Carbon, notably.)
2008-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
* frame.el (display-mouse-p):
(display-popup-menus-p):
(display-images-p):
(display-selections-p):
(display-visual-class):
Make all these functions more general, do not hard code device
type symbols where that is inappropriate.
diff -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 -r 44129f301385e892320cacced2696acdbdf6a1df lisp/ChangeLog
--- a/lisp/ChangeLog Mon Dec 29 23:36:00 2008 +0900
+++ b/lisp/ChangeLog Tue Dec 30 14:22:29 2008 +0000
@@ -1,3 +1,13 @@ 2008-12-27 Aidan Kehoe <kehoea@parhasa
+2008-12-30 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * frame.el (display-mouse-p):
+ (display-popup-menus-p):
+ (display-images-p):
+ (display-selections-p):
+ (display-visual-class):
+ Make all these functions more general, do not hard code device
+ type symbols where that is inappropriate.
+
2008-12-27 Aidan Kehoe <kehoea(a)parhasard.net>
* loadhist.el (symbol-file):
diff -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 -r 44129f301385e892320cacced2696acdbdf6a1df lisp/frame.el
--- a/lisp/frame.el Mon Dec 29 23:36:00 2008 +0900
+++ b/lisp/frame.el Tue Dec 30 14:22:29 2008 +0000
@@ -1179,21 +1179,29 @@ that is beyond the control of Emacs and
"Return non-nil if DISPLAY has a mouse available.
DISPLAY can be a frame, a device, a console, or nil (meaning the
selected frame)."
- (case (framep-on-display display)
- ;; We assume X, NeXTstep, and GTK *always* have a pointing device
- ((x ns gtk) t)
- (mswindows (> (declare-boundp mswindows-num-mouse-buttons) 0))
- (tty
+ (let (type)
+ (setq display (display-device display)
+ type (device-type display))
+ (cond
+ ((eq 'mswindows type)
+ (> (declare-boundp mswindows-num-mouse-buttons) 0))
+ ((device-on-window-system-p display)
+ ;; We assume X, NeXTstep, and GTK and the rest always have a pointing
+ ;; device.
+ t)
+ ((eq 'tty type)
(and-fboundp 'gpm-is-supported-p
- (gpm-is-supported-p (display-device display))))
- (t nil)))
+ (gpm-is-supported-p display)))
+ (t nil))))
(defun display-popup-menus-p (&optional display)
"Return non-nil if popup menus are supported on DISPLAY.
DISPLAY can be a frame, a device, a console, or nil (meaning the selected
frame). Support for popup menus requires that the mouse be available."
+ (setq display (display-device display))
(and
- (memq (framep-on-display display) '(x ns gtk mswindows))
+ (featurep 'menubar)
+ (device-on-window-system-p display)
(display-mouse-p display)))
(defun display-graphic-p (&optional display)
@@ -1203,13 +1211,17 @@ that use a window system such as X, and
that use a window system such as X, and false for text-only terminals.
DISPLAY can be a frame, a device, a console, or nil (meaning the selected
frame)."
- (memq (framep-on-display display) '(x ns gtk mswindows)))
+ (device-on-window-system-p display))
(defun display-images-p (&optional display)
"Return non-nil if DISPLAY can display images.
DISPLAY can be a frame, a device, a console, or nil (meaning the selected
frame)."
- (display-graphic-p display))
+ (and (memq (image-instance-type (specifier-instance
+ (glyph-image xemacs-logo)
+ display))
+ '(color-pixmap mono-pixmap))
+ t))
(defalias 'display-multi-frame-p 'display-graphic-p)
(defalias 'display-multi-font-p 'display-graphic-p)
@@ -1221,7 +1233,11 @@ via special system buffers called `selec
`clipboard'.
DISPLAY can be a frame, a device, a console, or nil (meaning the selected
frame)."
- (memq (framep-on-display display) '(x ns gtk mswindows)))
+ (or
+ (device-on-window-system-p display)
+ ;; GPM supports #'get-selection-foreign, but not #'own-selection.
+ (and-fboundp 'gpm-is-supported-p
+ (gpm-is-supported-p display))))
(defun display-screens (&optional display)
"Return the number of screens associated with DISPLAY."
@@ -1269,15 +1285,21 @@ the question is inapplicable to a certai
"Returns the visual class of DISPLAY.
The value is one of the symbols `static-gray', `gray-scale',
`static-color', `pseudo-color', `true-color', or `direct-color'."
- (case (framep-on-display display)
- (x (declare-fboundp (x-display-visual-class (display-device display))))
- (gtk (declare-fboundp (gtk-display-visual-class (display-device display))))
- (mswindows (let ((planes (display-planes display)))
- (cond ((eq planes 1) 'static-gray)
- ((eq planes 4) 'static-color)
- ((> planes 8) 'true-color)
- (t 'pseudo-color))))
- (t 'static-gray)))
+ (let (type planes)
+ (setq display (display-device display)
+ type (device-type display))
+ (cond
+ ((eq 'x type)
+ (declare-fboundp (x-display-visual-class display)))
+ ((eq 'gtk type)
+ (declare-fboundp (gtk-display-visual-class display)))
+ ((device-on-window-system-p display)
+ (setq planes (display-planes display))
+ (cond ((eq planes 1) 'static-gray)
+ ((eq planes 4) 'static-color)
+ ((> planes 8) 'true-color)
+ (t 'pseudo-color)))
+ (t 'static-gray))))
;; XEmacs change: omit the Emacs 18 compatibility functions:
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
Re: [Q] Fix some bugs in load-history construction, built-in symbol file names.
15 years, 12 months
Aidan Kehoe
Ar an triochadú lá de mí na Nollaig, scríobh Stephen J. Turnbull:
> QUERY
>
> Aidan Kehoe writes:
> >
> > I’m not super-happy with what this does, but for the moment it follows
> > GNU practice, which is something, I suppose.
>
> I'm very unhappy with what it does ;-) ... it broke the build.
Yay, feedback! :-)
> cd build-directory
> rm lib-src/DOC
> cd src
> make ../lib-src/DOC
>
> gives
>
> Loading
> /Users/steve/Software/XEmacs/alioth/sandbox/src/../lisp/make-docfile.el...
> Loading find-paths.el...
> Loading packages.el...
> Loading setup-paths.el...
> Loading raw-process.el...
> Requiring custom...
> Requiring widget...
> Loading process...
> Loading /Users/steve/Software/XEmacs/alioth/sandbox/lisp/dumped-lisp.el...
>
> and stops there, before getting to "Spawning make-docfile ..." Then
> the dump phase blows chunks because it can't find ../lib-src/DOC.
>
> Reverting the patch allows me to complete the build.
Can you do a M-x report-xemacs-bug ? I don’t see the problem locally, and
the configure options would be helpful in reproducing it.
--
¿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: Merge after pull.
15 years, 12 months
Stephen Turnbull
changeset: 4545:8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1
tag: tip
parent: 4544:dc578683fddde723911a5cc6ff7bf982a07e42fb
parent: 4541:0c410b5b387a7dc82a025a2fb386569a716ba59d
user: Stephen J. Turnbull <stephen(a)xemacs.org>
date: Mon Dec 29 23:36:00 2008 +0900
files:
description:
Merge after pull.
diff -r dc578683fddde723911a5cc6ff7bf982a07e42fb -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 lib-src/ChangeLog
--- a/lib-src/ChangeLog Mon Dec 29 21:49:01 2008 +0900
+++ b/lib-src/ChangeLog Mon Dec 29 23:36:00 2008 +0900
@@ -1,3 +1,13 @@ 2008-05-21 Aidan Kehoe <kehoea@parhasa
+2008-12-27 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * make-docfile.c (main): Allow more than one -d argument, followed
+ by a directory to change to.
+ (put_filename): Don't strip directory information; with previous
+ change, allows retrieval of Lisp function and variable origin
+ files from #'built-in-symbol-file relative to lisp-directory.
+ (scan_lisp_file): Don't add an extraneous newline after the file
+ name, put_filename has added the newline already.
+
2008-05-21 Aidan Kehoe <kehoea(a)parhasard.net>
* make-mswin-unicode.pl:
diff -r dc578683fddde723911a5cc6ff7bf982a07e42fb -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 lib-src/make-docfile.c
--- a/lib-src/make-docfile.c Mon Dec 29 21:49:01 2008 +0900
+++ b/lib-src/make-docfile.c Mon Dec 29 23:36:00 2008 +0900
@@ -233,6 +233,15 @@ main (int argc, char **argv)
err_count += scan_file (arg);
}
}
+ else if (argc > i + 1 && !strcmp (argv[i], "-d"))
+ {
+ /* XEmacs change; allow more than one chdir.
+ The idea is that the second chdir is to source-lisp, and that
+ any Lisp files not under there have the full path specified. */
+ i += 1;
+ chdir (argv[i]);
+ continue;
+ }
else
{
int j;
@@ -269,14 +278,16 @@ static void
static void
put_filename (const char *filename)
{
+ /* XEmacs change; don't strip directory information. */
+#if 0
const char *tmp;
- /* Why are we cutting this off? */
for (tmp = filename; *tmp; tmp++)
{
if (IS_DIRECTORY_SEP(*tmp))
filename = tmp + 1;
}
+#endif
/* <= because sizeof includes the nul byte at the end. Not quite right,
because it should include the length of the symbol + "\037[VF]" instead
@@ -1390,7 +1401,6 @@ scan_lisp_file (const char *filename, co
backslash-newline) have already been read. */
put_filename (filename); /* XEmacs addition */
- putc ('\n', outfile); /* XEmacs addition */
putc (037, outfile);
putc (type, outfile);
fprintf (outfile, "%s\n", buffer);
diff -r dc578683fddde723911a5cc6ff7bf982a07e42fb -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 lisp/ChangeLog
--- a/lisp/ChangeLog Mon Dec 29 21:49:01 2008 +0900
+++ b/lisp/ChangeLog Mon Dec 29 23:36:00 2008 +0900
@@ -1,3 +1,39 @@ 2008-12-22 Aidan Kehoe <kehoea@parhasa
+2008-12-27 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * loadhist.el (symbol-file):
+ Use #'defun*, not #'defun, to allow the checks for autoloaded
+ functions and variables to call #'return-from correctly. Use
+ #'return-from instead of #'return throughout the function.
+
+2008-12-27 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * loadup.el (load-history):
+ Add the contents of current-load-list to load-history before
+ clearing it. Move the variable declarations earlier in the file to
+ a format understood by make-docfile.c.
+ * custom.el (custom-declare-variable): Add the variable's symbol
+ to the current file's load history entry correctly, don't use a
+ cons. Eliminate a comment that we don't need to worry about, we
+ don't need to check the `initialized' C variable in Lisp.
+ * bytecomp.el (byte-compile-output-file-form):
+ Merge Andreas Schwab's pre-GPLv3 GNU change of 19970831 here;
+ treat #'custom-declare-variable correctly, generating the
+ docstrings in a format understood by make-docfile.c.
+ * loadhist.el (symbol-file): Correct behaviour for checking
+ autoloaded macros and functions when supplied with a TYPE
+ argument. Accept fully-qualified paths from
+ #'built-in-symbol-file; if a path is not fully-qualified, return
+ it relative to lisp-directory if the filename corresponds to a
+ Lisp file, and relative to (concat source-directory "/src/")
+ otherwise.
+ * make-docfile.el (preloaded-file-list):
+ Rationalise some let bindings a little. Use the "-d" argument to
+ make-docfile.c to supply Lisp paths relative to lisp-directory,
+ not absolutely. Add in loadup.el explicitly to the list of files
+ to be processed by make-docfile.c--it doesn't make sense to add it
+ to preloaded-file-list, since that is used for purposes of
+ byte-compilation too.
+
2008-12-22 Aidan Kehoe <kehoea(a)parhasard.net>
* loadhist.el (symbol-file):
diff -r dc578683fddde723911a5cc6ff7bf982a07e42fb -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 lisp/bytecomp.el
--- a/lisp/bytecomp.el Mon Dec 29 21:49:01 2008 +0900
+++ b/lisp/bytecomp.el Mon Dec 29 23:36:00 2008 +0900
@@ -1881,10 +1881,12 @@ With argument, insert value in current b
;; defalias calls are output directly by byte-compile-file-form-defmumble;
;; it does not pay to first build the defalias in defmumble and then parse
;; it here.
- (if (and (memq (car-safe form) '(defun defmacro defvar defconst autoload))
+ (if (and (memq (car-safe form) '(defun defmacro defvar defconst autoload
+ custom-declare-variable))
(stringp (nth 3 form)))
(byte-compile-output-docform nil nil '("\n(" 3 ")") form nil
- (eq (car form) 'autoload))
+ (memq (car form)
+ '(autoload custom-declare-variable)))
(let ((print-escape-newlines t)
(print-length nil)
(print-level nil)
diff -r dc578683fddde723911a5cc6ff7bf982a07e42fb -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 lisp/custom.el
--- a/lisp/custom.el Mon Dec 29 21:49:01 2008 +0900
+++ b/lisp/custom.el Mon Dec 29 23:36:00 2008 +0900
@@ -203,9 +203,7 @@ keyword in your own programs. "
;; Do the actual initialization.
(unless custom-dont-initialize
(funcall initialize symbol default)))
- ;; #### This is a rough equivalent of LOADHIST_ATTACH. However,
- ;; LOADHIST_ATTACH also checks for `initialized'.
- (push (cons 'defvar symbol) current-load-list)
+ (push symbol current-load-list)
(run-hooks 'custom-define-hook)
symbol)
diff -r dc578683fddde723911a5cc6ff7bf982a07e42fb -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 lisp/loadhist.el
--- a/lisp/loadhist.el Mon Dec 29 21:49:01 2008 +0900
+++ b/lisp/loadhist.el Mon Dec 29 23:36:00 2008 +0900
@@ -39,7 +39,9 @@
;; load-history is a list of entries that look like this:
;; ("outline" outline-regexp ... (require . wid-edit) ... (provide . outline) ...)
-(defun symbol-file (sym &optional type)
+;; XEmacs; this function is in subr.el in GNU, and does not deal with
+;; built-in symbols.
+(defun* symbol-file (sym &optional type)
"Return the input source from which SYM was loaded.
This is a file name, or nil if the source was a buffer with no associated file.
@@ -52,40 +54,44 @@ return faces created with `make-face' or
return faces created with `make-face' or `copy-face', just those created
with `defface' and `custom-declare-face'."
(interactive "SFind source file for symbol: ") ; XEmacs
- (block look-up-symbol-file
- (let (built-in-file autoload-cons symbol-details)
- (when (and
- (eq 'autoload
- (car-safe (setq autoload-cons
- (and (fboundp sym)
- (symbol-function sym)))))
- (or (and (or (null type) (eq 'defvar type))
- (eq (fifth autoload-cons) 'keymap))
- (and (or (null type) (eq 'defvar type))
- (memq (fifth autoload-cons) '(nil macro)))))
- (return-from look-up-symbol-file
- (locate-library (second autoload-cons))))
- (cond ((eq 'defvar type)
- ;; Load history entries corresponding to variables are just
- ;; symbols.
- (dolist (entry load-history)
- (when (memq sym (cdr entry))
- (return-from look-up-symbol-file (car entry)))))
- ((not (null type))
- ;; Non-variables have the type stored as the car of the entry.
- (dolist (entry load-history)
- (when (and (setq symbol-details (rassq sym (cdr entry)))
- (eq type (car symbol-details)))
- (return-from look-up-symbol-file (car entry)))))
- (t
- ;; If TYPE hasn't been specified, we need to check both for
- ;; variables and other symbols.
- (dolist (entry load-history)
- (when (or (memq sym (cdr entry))
- (rassq sym (cdr entry)))
- (return-from look-up-symbol-file (car entry))))))
- (setq built-in-file (built-in-symbol-file sym type))
- (if built-in-file (concat source-directory "/src/" built-in-file)))))
+ (let (built-in-file autoload-cons symbol-details)
+ (cond ((and (eq 'autoload
+ (car-safe
+ (setq autoload-cons
+ (and (fboundp sym) (symbol-function sym)))))
+ (or (and (or (null type) (eq 'defvar type))
+ (eq (fifth autoload-cons) 'keymap))
+ (and (or (null type) (eq 'defun type))
+ (memq (fifth autoload-cons) '(nil macro)))))
+ (return-from symbol-file (locate-library (second autoload-cons))))
+ ((eq 'defvar type)
+ ;; Load history entries corresponding to variables are just
+ ;; symbols.
+ (dolist (entry load-history)
+ (when (memq sym (cdr entry))
+ (return-from symbol-file (car entry)))))
+ ((not (null type))
+ ;; Non-variables have the type stored as the car of the entry.
+ (dolist (entry load-history)
+ (when (and (setq symbol-details (rassq sym (cdr entry)))
+ (eq type (car symbol-details)))
+ (return-from symbol-file (car entry)))))
+ (t
+ ;; If TYPE hasn't been specified, we need to check both for
+ ;; variables and other symbols.
+ (dolist (entry load-history)
+ (when (or (memq sym (cdr entry))
+ (rassq sym (cdr entry)))
+ (return-from symbol-file (car entry))))))
+ (when (setq built-in-file (built-in-symbol-file sym type))
+ (if (equal built-in-file (file-truename built-in-file))
+ ;; Probably a full path name:
+ built-in-file
+ ;; This is a bit heuristic, but shouldn't realistically be a
+ ;; problem:
+ (if (string-match "\.elc?$" built-in-file)
+ (concat lisp-directory built-in-file)
+ (concat source-directory "/src/" built-in-file))))))
(defun feature-symbols (feature)
"Return the file and list of symbols associated with a given FEATURE."
diff -r dc578683fddde723911a5cc6ff7bf982a07e42fb -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 lisp/loadup.el
--- a/lisp/loadup.el Mon Dec 29 21:49:01 2008 +0900
+++ b/lisp/loadup.el Mon Dec 29 23:36:00 2008 +0900
@@ -31,6 +31,12 @@
;; If you are wanting to add files to be dumped into your local version of
;; XEmacs, DO NOT add them here. Use site-init.el or site-load.el instead.
+;; ***Note the docstrings for the variables in this file. They follow the
+;; conventions described in lib-src/make-docfile.c, and any new variables or
+;; functions added to this file should follow those conventions too, since
+;; this file is always loaded uncompiled, and the byte-compiler never gets a
+;; chance to format the docstrings in the way make-docfile.c understands.
+
;; This is loaded into a bare XEmacs to make a dumpable one.
;;; Code:
@@ -47,27 +53,27 @@
(when (fboundp 'error)
(error "loadup.el already loaded!"))
-(defconst running-xemacs t
- "Non-nil when the current emacs is XEmacs.")
+(defconst running-xemacs t "\
+Non-nil when the current emacs is XEmacs.")
;; Can't make this constant for now because it causes an error in
;; update-elc.el.
-(defvar source-lisp (file-name-directory (expand-file-name
- (nth 2 command-line-args)))
- "Root of tree containing the Lisp source code for the current build.
+(defvar source-lisp (file-name-directory (expand-file-name (nth 2 command-line-args))) "\
+Root of tree containing the Lisp source code for the current build.
Differs from `lisp-directory' if this XEmacs has been installed. ")
-(defconst build-directory (expand-file-name ".." invocation-directory)
- "Root of tree containing object files and executables produced by build.
+(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
recommended for developers.")
-(defconst source-directory (expand-file-name ".." source-lisp)
- "Root of tree containing source code for the current build.
+(defconst source-directory (expand-file-name ".." source-lisp) "\
+Root of tree containing source code for the current build.
Used during loadup and for documenting source of symbols defined in C.")
-(defvar preloaded-file-list nil
- "List of files preloaded into the XEmacs binary image.")
+(defvar preloaded-file-list nil "\
+List of Lisp files preloaded into the XEmacs binary image,
+with the exception of `loadup.el'.")
;(start-profiling)
@@ -206,7 +212,15 @@ Used during loadup and for documenting s
;; See also "site-load" above.
(when (stringp site-start-file)
(load "site-init" t))
-(setq current-load-list nil)
+;; Add information from this file to the load history:
+(setq load-history (cons (nreverse current-load-list) load-history)
+ ;; Clear current-load-list; this (and adding information to
+ ;; load-history) is normally done in lread.c after reading the
+ ;; entirety of a file, something which never happens for loadup.el.
+ current-load-list nil)
+;; Make the path to this file look a little nicer:
+(setcar (car load-history) (file-truename (caar load-history)))
+
(garbage-collect)
;;; At this point, we're ready to resume undo recording for scratch.
diff -r dc578683fddde723911a5cc6ff7bf982a07e42fb -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 lisp/make-docfile.el
--- a/lisp/make-docfile.el Mon Dec 29 21:49:01 2008 +0900
+++ b/lisp/make-docfile.el Mon Dec 29 23:36:00 2008 +0900
@@ -151,36 +151,50 @@
(load "setup-paths.el")
(load "raw-process.el")
-(let (preloaded-file-list)
+(let (preloaded-file-list arg0 arg package-preloaded-file-list)
(load (expand-file-name "dumped-lisp.el" source-lisp))
- (let ((package-preloaded-file-list
- (packages-collect-package-dumped-lisps late-package-load-path)))
-
- (setq preloaded-file-list
- (append package-preloaded-file-list
- preloaded-file-list
- packages-hardcoded-lisp)))
+ (setq package-preloaded-file-list
+ (packages-collect-package-dumped-lisps late-package-load-path)
+ preloaded-file-list
+ (append package-preloaded-file-list
+ preloaded-file-list
+ packages-hardcoded-lisp)
+
+ processed (cons "-d" processed)
+ processed (cons source-lisp processed)
+ ;; Include loadup.el, which is never in preloaded-file-list:
+ processed (cons "loadup.el" processed))
(while preloaded-file-list
- (let ((arg0 (packages-add-suffix (car preloaded-file-list)))
- arg)
- (setq arg (locate-library arg0))
- (if (null arg)
- (progn
+ (setq arg0 (packages-add-suffix (car preloaded-file-list))
+ arg (locate-library arg0))
+ (if (null arg)
+ (progn
(message "Error: dumped file %s does not exist" arg0)
;; Uncomment in case of difficulties
- ;;(message "late-package-hierarchies: %S" late-package-hierarchies)
- ;;(message "guessed-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name #'paths-emacs-root-p))
- ;;(message "guessed-data-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name #'paths-emacs-data-root-p))
- )
- (if (null (member arg processed))
- (progn
- (if (and (null docfile-out-of-date)
- (file-newer-than-file-p arg docfile))
- (setq docfile-out-of-date t))
- (setq processed (cons arg processed)))))
- (setq preloaded-file-list (cdr preloaded-file-list)))))
+ ;(message "late-package-hierarchies: %S"
+ ; late-package-hierarchies)
+ ;(message "guessed-roots: %S" (paths-find-emacs-roots
+ ; invocation-directory
+ ; invocation-name
+ ; #'paths-emacs-root-p))
+ ;(message "guessed-data-roots: %S" (paths-find-emacs-roots
+ ; invocation-directory
+ ; invocation-name
+ ; #'paths-emacs-data-root-p))
+ )
+ (when (equal arg (expand-file-name arg0 source-lisp))
+ ;; Use relative paths where possible, since this makes file lookup
+ ;; in an installed XEmacs easier:
+ (setq arg arg0))
+ (if (null (member arg processed))
+ (progn
+ (if (and (null docfile-out-of-date)
+ (file-newer-than-file-p arg docfile))
+ (setq docfile-out-of-date t))
+ (setq processed (cons arg processed)))))
+ (setq preloaded-file-list (cdr preloaded-file-list))))
;; Finally process the list of site-loaded files.
(if site-file-list
diff -r dc578683fddde723911a5cc6ff7bf982a07e42fb -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 src/ChangeLog
--- a/src/ChangeLog Mon Dec 29 21:49:01 2008 +0900
+++ b/src/ChangeLog Mon Dec 29 23:36:00 2008 +0900
@@ -1,3 +1,13 @@ 2008-12-27 Vin Shelton <acs(a)xemacs.org
+2008-12-27 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * doc.c (Fbuilt_in_symbol_file):
+ Return a subr's filename immediately if we've found it. Check for
+ compiled function and compiled macro docstrings in DOC too, and
+ return them if they exist.
+ The branch of the if statement focused on functions may have
+ executed, but we may still want to check variable bindings; an
+ else clause isn't appropriate.
+
2008-12-27 Vin Shelton <acs(a)xemacs.org>
* syswindows.h: Don't define wide character interfaces for Cygwin
diff -r dc578683fddde723911a5cc6ff7bf982a07e42fb -r 8775d3b5487437a87fa8c75338b7c3fc6cb7a2e1 src/doc.c
--- a/src/doc.c Mon Dec 29 21:49:01 2008 +0900
+++ b/src/doc.c Mon Dec 29 23:36:00 2008 +0900
@@ -531,11 +531,33 @@ If TYPE is `defvar', then variable defin
return Qnil;
}
else
- filename = get_object_file_name
- (make_int (- (EMACS_INT) XSUBR (fun)->doc));
- }
- }
- else if (EQ(Fboundp(symbol), Qt) && (EQ(type, Qnil) || EQ(type, Qdefvar)))
+ {
+ filename = get_object_file_name
+ (make_int (- (EMACS_INT) XSUBR (fun)->doc));
+ return filename;
+ }
+ }
+
+ if (COMPILED_FUNCTIONP (fun) || (CONSP(fun) &&
+ (EQ (Qmacro, Fcar_safe (fun)))
+ && (fun = Fcdr_safe (fun),
+ COMPILED_FUNCTIONP (fun))))
+ {
+ Lisp_Object tem;
+ Lisp_Compiled_Function *f = XCOMPILED_FUNCTION (fun);
+
+ if (! (f->flags.documentationp))
+ return Qnil;
+ tem = compiled_function_documentation (f);
+ if (NATNUMP (tem) || CONSP (tem))
+ {
+ filename = get_object_file_name (tem);
+ return filename;
+ }
+ }
+ }
+
+ if (EQ(Fboundp(symbol), Qt) && (EQ(type, Qnil) || EQ(type, Qdefvar)))
{
Lisp_Object doc_offset = Fget (symbol, Qvariable_documentation, Qnil);
@@ -551,9 +573,11 @@ If TYPE is `defvar', then variable defin
{
filename = get_object_file_name(doc_offset);
}
- }
- }
- return filename;
+ return filename;
+ }
+ }
+
+ return Qnil;
}
DEFUN ("documentation", Fdocumentation, 1, 2, 0, /*
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches