Mercurial > hg > xemacs-beta
changeset 253:157b30c96d03 r20-5b25
Import from CVS: tag r20-5b25
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:20:27 +0200 |
parents | afb15df44434 |
children | e92abcaa252b |
files | CHANGES-beta ChangeLog INSTALL README etc/BETA lisp/ChangeLog lisp/about.el lisp/bytecomp-runtime.el lisp/dumped-lisp.el lisp/isearch-mode.el lisp/packages.el lisp/simple.el lisp/site-load.el lisp/x-init.el lisp/x-win-sun.el lisp/x-win-xfree86.el man/ChangeLog man/internals/internals.texi src/ChangeLog src/device-x.c src/emacsfns.h src/event-Xt.c src/extents.c src/menubar-msw.c src/menubar.h src/process.c src/redisplay-msw.c src/s/freebsd.h src/s/sco5.h src/unexelfsgi.c version.sh |
diffstat | 31 files changed, 502 insertions(+), 351 deletions(-) [+] |
line wrap: on
line diff
--- a/CHANGES-beta Mon Aug 13 10:20:01 2007 +0200 +++ b/CHANGES-beta Mon Aug 13 10:20:27 2007 +0200 @@ -1,4 +1,10 @@ -*- indented-text -*- +to 20.5 beta25 "Kamori" +-- Dead key fixes courtesy of Martin Buchholz +-- Make count-* functions work sensibly courtesy of Hrvoje Niksic +-- SGI unexec fixes courtesy of Olivier Galibert +-- Miscellaneous bug fixes + to 20.5 beta24 "Kaghani" -- source commentary censored -- Miscellaneous MS Windows patches from Kirill Katsnelson
--- a/ChangeLog Mon Aug 13 10:20:01 2007 +0200 +++ b/ChangeLog Mon Aug 13 10:20:27 2007 +0200 @@ -1,5 +1,16 @@ +1998-02-14 SL Baur <steve@altair.xemacs.org> + + * XEmacs-20.5-beta25 is released. + +1998-02-13 SL Baur <steve@altair.xemacs.org> + + * INSTALL: Update for Cygwin and Microsoft Windows. + + * README: Update for Microsoft Windows. + 1998-02-09 SL Baur <steve@altair.xemacs.org> + * XEmacs 20.4-pre1 is released. * XEmacs 20.5-beta24 is released. Wed Jan 28 13:41:22 1998 Andy Piper <andyp@parallax.co.uk>
--- a/INSTALL Mon Aug 13 10:20:01 2007 +0200 +++ b/INSTALL Mon Aug 13 10:20:27 2007 +0200 @@ -18,7 +18,8 @@ of the Free Software Foundation are approved by the Foundation. -BUILDING AND INSTALLATION: +BUILDING AND INSTALLATION (Unix and Cygwin, see the file nt/README +for instructions on building under Microsoft Windows): 1) Make sure your system has enough swapping space allocated to handle a program whose pure code is 900k bytes and whose data area is at
--- a/README Mon Aug 13 10:20:01 2007 +0200 +++ b/README Mon Aug 13 10:20:27 2007 +0200 @@ -1,15 +1,21 @@ This directory tree holds version 20.5 of XEmacs, the extensible, -customizable, self-documenting real-time display editor. +customizable, self-documenting real-time display editor. This version +of XEmacs also runs on various Microsoft Windows platforms including +MS Windows '95 and MS Windows NT and Cygwin. See the file `etc/NEWS' for information on new features and other user-visible changes since the last version of XEmacs. -The file INSTALL in this directory says how to bring up XEmacs on -Unix, once you have loaded the entire subtree of this directory. +The file `INSTALL' in this directory says how to bring up XEmacs on +Unix and Cygwin, once you have loaded the entire subtree of this +directory. -The file PROBLEMS contains information on many common problems that +The file `PROBLEMS' contains information on many common problems that occur in building, installing and running XEmacs. +See the file `nt/README' for instructions on building XEmacs for +Microsoft Windows. + Reports of bugs in XEmacs should be posted to the newsgroup comp.emacs.xemacs or sent to the mailing list xemacs@xemacs.org. See the "Bugs" section of the XEmacs manual for more information on how to
--- a/etc/BETA Mon Aug 13 10:20:01 2007 +0200 +++ b/etc/BETA Mon Aug 13 10:20:27 2007 +0200 @@ -284,7 +284,6 @@ drwxr-xr-x 2 beta-f beta-f 1024 Oct 10 00:43 binary-packages drwxr-xr-x 2 beta-f beta-f 512 Oct 10 00:44 package-sources -drwxr-xr-x 2 beta-f beta-f 512 Oct 9 23:08 single-file-packages drwxr-xr-x 2 beta-f beta-f 512 Oct 10 00:44 utils ** Support Utilities (utils) @@ -296,14 +295,6 @@ the script to reflect the local configuration and run it in the top level directory of a Quassia Gnus source tree to install an update to Quassia Gnus. -** Source Installable Packages (package-sources) -================================================ - -This directory contains tarballs of Lisp packages that contain full support -for installing as an XEmacs package. To install them, one should untar -them to someplace convenient (like /var/tmp), and issue the appropriate make -command to install. - ** Binary package installation (binary-packages) ================================================ @@ -314,16 +305,6 @@ in this directory, run the command `M-x package-admin-add-binary-package' and fill in appropriate values to the prompts. -** Single file package installation -=================================== - -Prerequisite: XEmacs 20.5-b1. - -These are single file, self-contained lisp packages that don't need a -separate directory. To install something from this directory, run -the command `M-x package-admin-add-single-file-package' and fill in the -prompts. - ** Manual procedures for package management =========================================== @@ -346,3 +327,53 @@ xemacs-20.5 -vanilla -batch -f batch-byte-compile \ lisp-utils/auto-autoloads.el lisp-utils/custom-laod.el + +** Building XEmacs and XEmacs packages from scratch +=================================================== + +To build everything completely from scratch (not a high priority as a +design goal), the following procedure should work. (I don't recommend +building this way). + +*** Phase 1 -- Get a minimal XEmacs binary with mule to build the package + lisp with. + +**** Grab a mule-base tarball and install it into a newly created package + directory. + +**** Configure XEmacs with mule and a package-path including the + directory created above. + +**** Do a `make dist' to build an XEmacs binary. + +*** Phase 2 -- Build and install the package lisp. + +**** Modify XEmacs.rules for local paths and the XEmacs binary created in + Phase 1. + +**** Do a make from the top level package lisp source directory.[1] + +***** There are two build glitches at this time. You must `make + auto-autoloads.el' manually in comm/tm before starting if you have + done a `make distclean'. This should be unnecessary after a fresh + cvs checkout. + +***** You must go back and rebuild the strokes package after the main + build is complete. + +**** Do `make bindist's on all the packages you wish to install and + remove the byproduct .tar.gz's. + +*** Phase 3 -- Redump XEmacs with the packages that require dump time + support (like egg-its, VM, etc.) and install it. + +**** Reconfigure without Mule if you don't wish a Mule-ish XEmacs, and + rebuild XEmacs. + +- or - + +**** rm lib-src/DOC src/xemacs; make + +**** Install or run in-place. + +Note that this is in essence what `make all-elc' has always done.
--- a/lisp/ChangeLog Mon Aug 13 10:20:01 2007 +0200 +++ b/lisp/ChangeLog Mon Aug 13 10:20:27 2007 +0200 @@ -1,3 +1,63 @@ +1998-02-14 Martin Buchholz <martin@xemacs.org> + + * x11/x-win-xfree86.el (x-win-init-xfree86): + * x11/x-win-sun.el (x-win-init-sun): + * x11/x-init.el (x-initialize-compose): + * prim/simple.el: + (backward-or-forward-kill-sexp): + (backward-or-forward-kill-sentence): + (backward-or-forward-kill-word): + (backward-or-forward-delete-char): + * prim/isearch-mode.el (isearch-help-or-delete-char): + Use x-keysym-on-keyboard-sans-modifiers-p instead of + x-keysym-on-keyboard-p to detect backspace. + Use symbols instead of strings (now deprecated) with x-keysym-*-p. + Clean up symbols used with dead keys, checking Linux and solaris + keysyms. + Simplify x-win-*.el using above methods. + Change documentation for x-keysym-*-p functions. + +1998-02-14 SL Baur <steve@altair.xemacs.org> + + * about.el (about-hackers): Restore entries for Michael Sperber and + Vinnie Shelton. + From Vinnie Shelton <acs@acm.org> + +1998-02-14 Hrvoje Niksic <hniksic@srce.hr> + + * simple.el (count-words-region): Ditto. + +1998-02-12 Hrvoje Niksic <hniksic@srce.hr> + + * simple.el (count-words-buffer): Document. Don't print anything + if non-interactive. + +1998-02-12 SL Baur <steve@altair.xemacs.org> + + * packages.el (packages-hardcoded-lisp): easymenu.el is in + multiple files in InfoDock. + +1998-02-11 SL Baur <steve@altair.xemacs.org> + + * packages.el (packages-hardcoded-lisp): id-vers.elc is loaded + from version.el in InfoDock. + + * dumped-lisp.el (preloaded-file-list): Don't treat InfoDock + specially. + +1998-02-09 Karl M. Hegbloom <karlheg@bittersweet.inetarena.com> + + * bytecomp-runtime.el (proclaim-inline): Single quotes around + variable name in docstring. + +1998-02-10 Andreas Jaeger <aj@arthur.rhein-neckar.de> + + * menubar.h: Include "gui.h". + +1998-02-10 SL Baur <steve@altair.xemacs.org> + + * site-load.el: Fix documentation. + 1998-02-09 SL Baur <steve@altair.xemacs.org> * package-get-base.el (package-get-base): Updated.
--- a/lisp/about.el Mon Aug 13 10:20:01 2007 +0200 +++ b/lisp/about.el Mon Aug 13 10:20:27 2007 +0200 @@ -1109,6 +1109,16 @@ he's found in 10 years. (That'd be XEmacs, Gnus and bbdb, of course.) He can be found at `druidmuck.egbt.org 4201' at various hours of the day.\n") + (about-show-linked-info 'sperber "\ +Mike ported EFS to XEmacs 20 and integrated EFS into XEmacs. He's +also responsible for the ports of facemenu.el and enriched.el. When +Mike isn't busy putting together patches for free software he has just +installed or changing his hairstyle, he does research in modern +programming languages and their implementation, and hopes that one day +XEmacs will speak Scheme.\n") + (about-show-linked-info 'vin "\ +Vin helps maintain the older, more mature (read: moldy) versions of +XEmacs. Vin has maintained the official XEmacs patch pages.\n") (about-show-linked-info 'thiessel "\ On May 1, 1996 he started working at University of Kaiserslautern in the field of computer aided analog circuit design. His
--- a/lisp/bytecomp-runtime.el Mon Aug 13 10:20:01 2007 +0200 +++ b/lisp/bytecomp-runtime.el Mon Aug 13 10:20:27 2007 +0200 @@ -50,7 +50,7 @@ ;; FSF comments the next two out, but I see no reason to do so. --ben (defmacro proclaim-inline (&rest fns) "Cause the named functions to be open-coded when called from compiled code. -They will only be compiled open-coded when byte-optimize is true." +They will only be compiled open-coded when `byte-optimize' is true." (cons 'eval-and-compile (apply 'nconc
--- a/lisp/dumped-lisp.el Mon Aug 13 10:20:01 2007 +0200 +++ b/lisp/dumped-lisp.el Mon Aug 13 10:20:27 2007 +0200 @@ -5,8 +5,7 @@ "subr" ; load the most basic Lisp functions "replace" ; match-string used in version.el. ; Ignore compiled-by-mistake version.elc - #-infodock "version.el" ; XEmacs - #+infodock "id-version.el" ; InfoDock + "version.el" "cl" "cl-extra" "cl-seq"
--- a/lisp/isearch-mode.el Mon Aug 13 10:20:01 2007 +0200 +++ b/lisp/isearch-mode.el Mon Aug 13 10:20:27 2007 +0200 @@ -869,7 +869,7 @@ (if (and delete-key-deletes-forward (case (device-type) ('tty (eq tty-erase-char ?\C-h)) - ('x (not (x-keysym-on-keyboard-p "BackSpace"))))) + ('x (not (x-keysym-on-keyboard-sans-modifiers-p 'backspace))))) (isearch-delete-char) (isearch-mode-help)))
--- a/lisp/packages.el Mon Aug 13 10:20:01 2007 +0200 +++ b/lisp/packages.el Mon Aug 13 10:20:27 2007 +0200 @@ -95,7 +95,8 @@ (defvar packages-hardcoded-lisp '( - ;; "startup" + #+infodock "id-vers" + #+infodock "easymenu-id-xemacs" ) "Lisp packages that are always dumped with XEmacs")
--- a/lisp/simple.el Mon Aug 13 10:20:01 2007 +0200 +++ b/lisp/simple.el Mon Aug 13 10:20:27 2007 +0200 @@ -398,6 +398,12 @@ :type 'function :group 'editing-basics) +(eval-when-compile + (defmacro delete-forward-p () + '(and delete-key-deletes-forward + (or (eq 'tty (device-type)) + (x-keysym-on-keyboard-sans-modifiers-p 'backspace))))) + (defun backward-or-forward-delete-char (arg) "Delete either one character backwards or one character forwards. Controlled by the state of `delete-key-deletes-forward' and whether the @@ -405,9 +411,7 @@ BackSpace keysym, the delete key should always delete one character backwards." (interactive "*p") - (if (and delete-key-deletes-forward - (or (eq 'tty (device-type)) - (x-keysym-on-keyboard-p "BackSpace"))) + (if (delete-forward-p) (delete-char arg) (funcall backward-delete-function arg))) @@ -418,9 +422,7 @@ BackSpace keysym, the delete key should always delete one character backwards." (interactive "*p") - (if (and delete-key-deletes-forward - (or (eq 'tty (device-type)) - (x-keysym-on-keyboard-p "BackSpace"))) + (if (delete-forward-p) (kill-word arg) (backward-kill-word arg))) @@ -431,9 +433,7 @@ BackSpace keysym, the delete key should always delete one character backwards." (interactive "*P") - (if (and delete-key-deletes-forward - (or (eq 'tty (device-type)) - (x-keysym-on-keyboard-p "BackSpace"))) + (if (delete-forward-p) (kill-sentence arg) (backward-kill-sentence (prefix-numeric-value arg)))) @@ -444,9 +444,7 @@ BackSpace keysym, the delete key should always delete one character backwards." (interactive "*p") - (if (and delete-key-deletes-forward - (or (eq 'tty (device-type)) - (x-keysym-on-keyboard-p "BackSpace"))) + (if (delete-forward-p) (kill-sexp arg) (backward-kill-sexp arg))) @@ -567,25 +565,32 @@ (eval-buffer (current-buffer) printflag)) ;; XEmacs -(defun count-words-buffer (b) - (interactive "b") - (save-excursion - (let ((buf (or b (current-buffer)))) - (set-buffer buf) - (message "Buffer has %d words" - (count-words-region (point-min) (point-max)))))) +(defun count-words-buffer (buffer) + "Print the number of words in BUFFER. +If called noninteractively, the value is returned rather than printed. +BUFFER defaults to the current buffer." + (interactive "bBuffer: ") + (let ((words (count-words-region (point-min) (point-max) buffer))) + (when (interactive-p) + (message "Buffer has %d words" words)) + words)) ;; XEmacs -(defun count-words-region (start end) +(defun count-words-region (start end &optional buffer) + "Print the number of words in region between START and END in BUFFER. +If called noninteractively, the value is returned rather than printed. +BUFFER defaults to the current buffer." (interactive "r") (save-excursion - (let ((n 0)) + (set-buffer (or buffer (current-buffer))) + (let ((words 0)) (goto-char start) (while (< (point) end) - (if (forward-word 1) - (setq n (1+ n)))) - (message "Region has %d words" n) - n))) + (when (forward-word 1) + (incf words))) + (when (interactive-p) + (message "Region has %d words" words)) + words))) (defun count-lines-region (start end) "Print number of lines and characters in the region." @@ -595,14 +600,12 @@ (count-lines start end) (- end start))) ;; XEmacs -(defun count-lines-buffer (b) - "Print number of lines and characters in the specified buffer." - (interactive "_b") +(defun count-lines-buffer (buffer) + "Print number of lines and characters in BUFFER." + (interactive "_bBuffer: ") (save-excursion - (let ((buf (or b (current-buffer))) - cnt) - (set-buffer buf) - (setq cnt (count-lines (point-min) (point-max))) + (set-buffer (or buffer (current-buffer))) + (let ((cnt (count-lines (point-min) (point-max)))) (message "Buffer has %d lines, %d characters" cnt (- (point-max) (point-min))) cnt))) @@ -621,7 +624,7 @@ (goto-char opoint) (beginning-of-line) (if (/= start 1) - (message "line %d (narrowed line %d)" + (message "Line %d (narrowed line %d)" (1+ (count-lines 1 (point))) (1+ (count-lines start (point)))) (message "Line %d" (1+ (count-lines 1 (point)))))))))
--- a/lisp/site-load.el Mon Aug 13 10:20:01 2007 +0200 +++ b/lisp/site-load.el Mon Aug 13 10:20:27 2007 +0200 @@ -14,16 +14,16 @@ ;; The file `site-packages' if it exists should look something like: ;; (setq site-load-packages '( -;; "../lisp/modes/cc-mode" -;; "../lisp/utils/redo" -;; "../lisp/packages/scroll-in-place" +;; "../lisp/modes/cc-mode.elc" +;; "../lisp/utils/redo.elc" +;; "../lisp/packages/scroll-in-place.elc" ;; ) ;; ) ;; The first line and the last line must be exact. Each of the packages ;; listed must be double quoted, have either an absolute path, or a relative ;; to the build src directory path *and* be bytecompiled prior to the attempt -;; to dump. +;; to dump. They also must explicitly have the .elc extension. ;; Because this is a trial implementation and the file is shared with ;; make-docfiles, syntax is strict and unforgiving. So sue me. It
--- a/lisp/x-init.el Mon Aug 13 10:20:01 2007 +0200 +++ b/lisp/x-init.el Mon Aug 13 10:20:27 2007 +0200 @@ -97,7 +97,7 @@ (eval-when-compile (defmacro x-define-dead-key (key map) - `(when (x-keysym-on-keyboard-p ,(symbol-name key)) + `(when (x-keysym-on-keyboard-p ',key) (define-key function-key-map [,key] ',map)))) (defun x-initialize-compose () @@ -110,7 +110,7 @@ (autoload 'compose-circumflex-map "x-compose" nil t 'keymap) (autoload 'compose-tilde-map "x-compose" nil t 'keymap) - (when (x-keysym-on-keyboard-p "Multi_key") + (when (x-keysym-on-keyboard-p 'multi-key) (define-key function-key-map [multi-key] 'compose-map)) ;; The dead keys might really be called just about anything, depending @@ -181,6 +181,13 @@ (x-define-dead-key hpmute_asciicircum compose-circumflex-map) (x-define-dead-key hpmute_asciitilde compose-tilde-map) + ;; Empirically discovered on Linux XFree86 MetroX: + (x-define-dead-key usldead_acute compose-acute-map) + (x-define-dead-key usldead_grave compose-grave-map) + (x-define-dead-key usldead_diaeresis compose-diaeresis-map) + (x-define-dead-key usldead_asciicircum compose-circumflex-map) + (x-define-dead-key usldead_asciitilde compose-tilde-map) + ;; HP according to OpenWindows 3: (x-define-dead-key hpXK_mute_acute compose-acute-map) (x-define-dead-key hpXK_mute_grave compose-grave-map) @@ -202,14 +209,6 @@ (x-define-dead-key dead-diaeresis compose-diaeresis-map) (x-define-dead-key dead-circum compose-circumflex-map) (x-define-dead-key dead-tilde compose-tilde-map) - - ;; and AIX uses underscore, sigh.... - (x-define-dead-key dead_acute compose-acute-map) - (x-define-dead-key dead_grave compose-grave-map) - (x-define-dead-key dead_cedilla compose-cedilla-map) - (x-define-dead-key dead_diaeresis compose-diaeresis-map) - (x-define-dead-key dead_circum compose-circumflex-map) - (x-define-dead-key dead_tilde compose-tilde-map) ) (defun x-initialize-keyboard ()
--- a/lisp/x-win-sun.el Mon Aug 13 10:20:01 2007 +0200 +++ b/lisp/x-win-sun.el Mon Aug 13 10:20:27 2007 +0200 @@ -1,7 +1,7 @@ ;;; x-win-sun.el --- runtime initialization for Sun X servers and keyboards ;; Copyright (C) 1993, 1994 Free Software Foundation, Inc. -;; Authors: jwz@netscape.com, wing@666.com, mrb@eng.sun.com +;; Authors: jwz, ben, martin ;; Keywords: terminals ;; This file is part of XEmacs. @@ -66,121 +66,121 @@ (defun x-win-init-sun () -(defun x-remap-keysyms-using-function-key-map (from-key to-key) - (dolist (prefix '(() (shift) (control) (meta) (alt) - (shift control) (shift alt) (shift meta) - (control alt) (control meta) (alt meta) - (shift control alt) (shift control meta) - (shift alt meta) (control alt meta) - (shift control alt meta))) - (define-key function-key-map - (append prefix (list from-key)) - (vector (append prefix (list to-key)))))) + (defun x-remap-keysyms-using-function-key-map (from-key to-key) + (dolist (prefix '(() (shift) (control) (meta) (alt) + (shift control) (shift alt) (shift meta) + (control alt) (control meta) (alt meta) + (shift control alt) (shift control meta) + (shift alt meta) (control alt meta) + (shift control alt meta))) + (define-key function-key-map + (append prefix (list from-key)) + (vector (append prefix (list to-key)))))) - ;; help is ok - ;; num_lock is ok - ;; up is ok - ;; left is ok - ;; right is ok - ;; kp-add is ok - ;; down is ok - ;; insert is ok - ;; delete is ok - ;; kp-enter is ok -;; Sun Function keys -(loop for (x-name from-key to-key) in - `(("F21" f21 pause) - ("F22" f22 print) - ("F23" f23 scroll_lock) + ;; help is ok + ;; num_lock is ok + ;; up is ok + ;; left is ok + ;; right is ok + ;; kp-add is ok + ;; down is ok + ;; insert is ok + ;; delete is ok + ;; kp-enter is ok + ;; Sun Function keys + (loop for (from-key to-key) in + `((f21 pause) + (f22 print) + (f23 scroll_lock) - ;; X11 R6 mappings - ("SunProps" SunProps props) - ("SunFront" SunFront front) - ("SunOpen" SunOpen open) - ("SunFind" SunFind find) - ("Cancel" cancel stop) - ("Undo" Undo undo) - ("SunCopy" SunCopy copy) - ("SunPaste" SunPaste paste) - ("SunCut" SunCut cut) + ;; X11 R6 mappings + (SunProps props) + (SunFront front) + (SunOpen open) + (SunFind find) + (cancel stop) + (Undo undo) + (SunCopy copy) + (SunPaste paste) + (SunCut cut) - ("F13" f13 props) - ("F14" f14 undo) - ("F15" f15 front) - ("F16" f16 copy) - ("F17" f17 open) - ("F18" f18 paste) - ("F19" f19 find) - ("F20" f20 cut) + (f13 props) + (f14 undo) + (f15 front) + (f16 copy) + (f17 open) + (f18 paste) + (f19 find) + (f20 cut) - ("F25" f25 kp-divide) - ("F26" f26 kp-multiply) - ("F31" f31 kp-5) + (f25 kp-divide) + (f26 kp-multiply) + (f31 kp-5) - ;; Map f33 and r13 to end or kp-end - ,@(cond - ((not (x-keysym-on-keyboard-sans-modifiers-p "End")) - '(("F33" f33 end) - ("R13" r13 end))) - ((not (x-keysym-on-keyboard-sans-modifiers-p "KP_End")) - '(("F33" f33 kp-end) - ("R13" r13 kp-end)))) + ;; Map f33 and r13 to end or kp-end + ,@(cond + ((not (x-keysym-on-keyboard-sans-modifiers-p 'end)) + '((f33 end) + (r13 end))) + ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-end)) + '((f33 kp-end) + (r13 kp-end)))) - ,@(if (x-keysym-on-keyboard-sans-modifiers-p "F36") - '(("F36" f36 stop) - ("F37" f37 again))) + ,@(when (x-keysym-on-keyboard-sans-modifiers-p 'f36) + '((f36 stop) + (f37 again))) - ;; Type 4 keyboards have a real kp-subtract and a f24 labelled `=' - ;; Type 5 keyboards have no key labelled `=' and a f24 labelled `-' - ,@(when (x-keysym-on-keyboard-sans-modifiers-p "F24") - `(("F24" f24 ,(if (x-keysym-on-keyboard-sans-modifiers-p "KP_Subtract") - 'kp-equal - 'kp-subtract)))) + ;; Type 4 keyboards have a real kp-subtract and a f24 labelled `=' + ;; Type 5 keyboards have no key labelled `=' and a f24 labelled `-' + ,@(when (x-keysym-on-keyboard-sans-modifiers-p 'f24) + `((f24 ,(if (x-keysym-on-keyboard-sans-modifiers-p 'kp-subtract) + 'kp-equal + 'kp-subtract)))) - ;; Map f27 to home or kp-home, as appropriate - ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p "Home")) - '(("F27" f27 home))) - ((not (x-keysym-on-keyboard-sans-modifiers-p "KP_Home")) - '(("F27" f27 kp-home)))) + ;; Map f27 to home or kp-home, as appropriate + ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'home)) + '((f27 home))) + ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-home)) + '((f27 kp-home)))) - ;; Map f29 to prior or kp-prior, as appropriate - ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p "Prior")) - '(("F29" f29 prior))) - ((not (x-keysym-on-keyboard-sans-modifiers-p "KP_Prior")) - '(("F29" f29 kp-prior)))) + ;; Map f29 to prior or kp-prior, as appropriate + ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'prior)) + '((f29 prior))) + ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-prior)) + '((f29 kp-prior)))) - ;; Map f35 to next or kp-next, as appropriate - ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p "Next")) - '(("F35" f35 next))) - ((not (x-keysym-on-keyboard-sans-modifiers-p "KP_Next")) - '(("F35" f35 kp-next)))) + ;; Map f35 to next or kp-next, as appropriate + ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'next)) + '((f35 next))) + ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-next)) + '((f35 kp-next)))) - ,@(cond ((x-keysym-on-keyboard-sans-modifiers-p "apRead") ; SunOS 4.1.1 - '(("apRead" apRead f11) ("apEdit" apEdit f12))) - ((x-keysym-on-keyboard-sans-modifiers-p "SunF36") ; SunOS 5 - '(("SunF36" SunF36 f11) - ("SunF37" SunF37 f12) - ("F11" f11 stop) - ("F12" f12 again)))) - ) - do (when (x-keysym-on-keyboard-sans-modifiers-p x-name) - (x-remap-keysyms-using-function-key-map from-key to-key))) + ,@(cond ((x-keysym-on-keyboard-sans-modifiers-p 'apRead) ; SunOS 4.1.1 + '((apRead f11) (apEdit f12))) + ((x-keysym-on-keyboard-sans-modifiers-p 'SunF36) ; SunOS 5 + '((SunF36 f11) + (SunF37 f12) + (f11 stop) + (f12 again)))) + ) + do (when (x-keysym-on-keyboard-sans-modifiers-p from-key) + (x-remap-keysyms-using-function-key-map from-key to-key))) -(unintern 'x-remap-keysyms-using-function-key-map) + (unintern 'x-remap-keysyms-using-function-key-map) ;; for each element in the left column of the above table, alias it ;; to the thing in the right column. Then do the same for many, but ;; not all, modifier combinations. ;; ;; (Well, we omit hyper and super. #### Handle this some other way!) -; (while mapping -; (let ((mods '(() (shift) (control) (meta) (alt)))) -; (while mods -; (let ((k1 (vector (append (car mods) (list (car (car mapping)))))) -; (k2 (vector (append (car mods) (list (cdr (car mapping))))))) -; (define-key global-map k1 k2)) -; (setq mods (cdr mods)))) -; (setq mapping (cdr mapping)))) + ;; (while mapping + ;; (let ((mods '(() (shift) (control) (meta) (alt)))) + ;; (while mods + ;; (let ((k1 (vector (append (car mods) (list (car (car mapping)))))) + ;; (k2 (vector (append (car mods) (list (cdr (car mapping))))))) + ;; (define-key global-map k1 k2)) + ;; (setq mods (cdr mods)))) + ;; (setq mapping (cdr mapping)))) ;;; I've extended keyboard-translate-table to work over keysyms. ;;; [FSF Emacs has something called `system-key-alist' that is @@ -188,71 +188,71 @@ ;;; it's brain-dead in the typically FSF way, and associates *numbers* ;;; (who knows where the hell they come from?) with symbols.] --ben -;;; And I've made it into a function which is NOT called by default --mrb +;;; And I've made it into a function which is NOT called by default --martin -(defun sun-x11-keyboard-translate () - "Remap Sun's X11 keyboard. + (defun sun-x11-keyboard-translate () + "Remap Sun's X11 keyboard. Keys with names like `f35' are remapped, at a low level, to more mnemonic ones,like `kp-3'." - (interactive) + (interactive) - (keyboard-translate - 'f11 'stop ; the type4 keyboard Sun/MIT name - 'f36 'stop ; the type5 keyboard Sun name - 'cancel 'stop ; R6 binding - 'f12 'again ; the type4 keyboard Sun/MIT name - 'f37 'again ; the type5 keyboard Sun name - 'f13 'props ; - 'SunProps 'props ; R6 binding - 'f14 'undo ; - 'f15 'front ; - 'SunFront 'front ; R6 binding - 'f16 'copy ; - 'SunCopy 'copy ; R6 binding - 'f17 'open ; - 'SunOpen 'open ; R6 binding - 'f18 'paste ; - 'SunPaste 'paste ; R6 binding - 'f19 'find ; - 'f20 'cut ; - 'SunCut 'cut ; R6 binding - ;; help is ok - 'f21 'pause - 'f22 'prsc - 'f23 'scroll - ;; num_lock is ok - ;;'f24 'kp-equal) ; type4 only! - 'f25 'kp-divide ; - 'f26 'kp-multiply ; - 'f24 'kp-subtract ; type5 only! - 'f27 'kp-7 ; - ;; up is ok - 'f29 'kp-9 - ;; left is ok - 'f31 'kp-5 - ;; right is ok - ;; kp-add is ok - 'f33 'kp-1 ; the Sun name - 'r13 'end ; the MIT name - ;; down is ok - 'f35 'kp-3 - ;; insert is ok - ;; delete is ok - ;; kp-enter is ok - 'SunF36 'f11 ; Type 5 keyboards - 'SunF37 'f12 ; Used to be Stop & Again - )) + (keyboard-translate + 'f11 'stop ; the type4 keyboard Sun/MIT name + 'f36 'stop ; the type5 keyboard Sun name + 'cancel 'stop ; R6 binding + 'f12 'again ; the type4 keyboard Sun/MIT name + 'f37 'again ; the type5 keyboard Sun name + 'f13 'props ; + 'SunProps 'props ; R6 binding + 'f14 'undo ; + 'f15 'front ; + 'SunFront 'front ; R6 binding + 'f16 'copy ; + 'SunCopy 'copy ; R6 binding + 'f17 'open ; + 'SunOpen 'open ; R6 binding + 'f18 'paste ; + 'SunPaste 'paste ; R6 binding + 'f19 'find ; + 'f20 'cut ; + 'SunCut 'cut ; R6 binding + ;; help is ok + 'f21 'pause + 'f22 'prsc + 'f23 'scroll + ;; num_lock is ok + ;;'f24 'kp-equal) ; type4 only! + 'f25 'kp-divide ; + 'f26 'kp-multiply ; + 'f24 'kp-subtract ; type5 only! + 'f27 'kp-7 ; + ;; up is ok + 'f29 'kp-9 + ;; left is ok + 'f31 'kp-5 + ;; right is ok + ;; kp-add is ok + 'f33 'kp-1 ; the Sun name + 'r13 'end ; the MIT name + ;; down is ok + 'f35 'kp-3 + ;; insert is ok + ;; delete is ok + ;; kp-enter is ok + 'SunF36 'f11 ; Type 5 keyboards + 'SunF37 'f12 ; Used to be Stop & Again + )) - + ;;; OpenWindows-like "find" processing. ;;; As far as I know, the `find' key is a Sunism, so we do that binding ;;; here. This is the only Sun-specific keybinding. (The functions ;;; themselves are in x-win.el in case someone wants to use them when ;;; not running on a Sun display.) -(define-key global-map 'find 'ow-find) -(define-key global-map '(shift find) 'ow-find-backward) + (define-key global-map 'find 'ow-find) + (define-key global-map '(shift find) 'ow-find-backward) -) + ) ;;; x-win-sun.el ends here
--- a/lisp/x-win-xfree86.el Mon Aug 13 10:20:01 2007 +0200 +++ b/lisp/x-win-xfree86.el Mon Aug 13 10:20:27 2007 +0200 @@ -34,60 +34,31 @@ ;;; #### Counter-bleck!! We shouldn't override a user binding for F13. ;;; So we use function-key-map for now. ;;; When we've implemented a fallback-style equivalent of -;;; keyboard-translate-table, we'll use that instead. (mrb) +;;; keyboard-translate-table, we'll use that instead. (martin) ;; For no obvious reason, shift-F1 is called F13, although Meta-F1 and ;; Control-F1 have normal names. (defun x-win-init-xfree86 () - -(loop for (x-key key sane-key) in - '(("F13" f13 f1) - ("F14" f14 f2) - ("F15" f15 f3) - ("F16" f16 f4) - ("F17" f17 f5) - ("F18" f18 f6) - ("F19" f19 f7) - ("F20" f20 f8) - ("F21" f21 f9) - ("F22" f22 f10) - ("F23" f23 f11) - ("F24" f24 f12)) - do - (when (and (x-keysym-on-keyboard-p x-key) - (not (x-keysym-on-keyboard-sans-modifiers-p x-key))) - ;; define also the control, meta, and meta-control versions. - (loop for mods in '(() (control) (meta) (meta control)) do - (define-key function-key-map `[(,@mods ,key)] `[(shift ,@mods ,sane-key)]) - ))) - -;; (let ((mapping '((f13 . (shift f1)) -;; (f14 . (shift f2)) -;; (f15 . (shift f3)) -;; (f16 . (shift f4)) -;; (f17 . (shift f5)) -;; (f18 . (shift f6)) -;; (f19 . (shift f7)) -;; (f20 . (shift f8)) -;; (f21 . (shift f9)) -;; (f22 . (shift f10)) -;; (f23 . (shift f11)) -;; (f24 . (shift f12))))) -;; -;; ;; now define them and also the control, meta, and meta-control versions. -;; (while mapping -;; (let* ((foo (caar mapping)) -;; (bar (cdar mapping)) -;; (foo (if (listp foo) foo (list foo))) -;; (bar (if (listp bar) bar (list bar)))) -;; (let ((mods '(() (control) (meta) (meta control)))) -;; (while mods -;; (let ((k1 (vector (append (car mods) foo))) -;; (k2 (vector (append (car mods) bar)))) -;; (define-key global-map k1 k2)) -;; (setq mods (cdr mods)))) -;; (setq mapping (cdr mapping))))) -) + (loop for (key sane-key) in + '((f13 f1) + (f14 f2) + (f15 f3) + (f16 f4) + (f17 f5) + (f18 f6) + (f19 f7) + (f20 f8) + (f21 f9) + (f22 f10) + (f23 f11) + (f24 f12)) + do + (when (and (x-keysym-on-keyboard-p key) + (not (x-keysym-on-keyboard-sans-modifiers-p key))) + ;; define also the control, meta, and meta-control versions. + (loop for mods in '(() (control) (meta) (meta control)) do + (define-key function-key-map `[(,@mods ,key)] `[(shift ,@mods ,sane-key)]) + )))) ;;; x-win-xfree86.el ends here
--- a/man/ChangeLog Mon Aug 13 10:20:01 2007 +0200 +++ b/man/ChangeLog Mon Aug 13 10:20:27 2007 +0200 @@ -1,3 +1,7 @@ +1998-02-10 Olivier Galibert <galibert@pobox.com> + + * internals/internals.texi: Remove all mocklisp references. + 1997-12-17 SL Baur <steve@altair.xemacs.org> * Makefile (SUBDIR): skk and gnats are packaged.
--- a/man/internals/internals.texi Mon Aug 13 10:20:01 2007 +0200 +++ b/man/internals/internals.texi Mon Aug 13 10:20:27 2007 +0200 @@ -3268,18 +3268,6 @@ -@example - 7000 mocklisp.c -@end example - -This function provides some emulation of MockLisp, a version of Lisp -provided in Gosling Emacs (aka Unipress Emacs), from which some old -versions of GNU Emacs were derived. You have to explicitly enable this -code with a configure option and shouldn't normally, because it changes -the semantics of XEmacs Lisp in ways that are not desirable for normal -Lisp programs. - - @node Modules for Interfacing with the Operating System @section Modules for Interfacing with the Operating System @@ -5033,9 +5021,8 @@ @code{Feval()} evaluates the form (a Lisp object) that is passed to it. Note that evaluation is only non-trivial for two types of objects: -symbols and conses. Under normal circumstances (i.e. not mocklisp) a -symbol is evaluated simply by calling symbol-value on it and returning -the value. +symbols and conses. A symbol is evaluated simply by calling +symbol-value on it and returning the value. Evaluating a cons means calling a function. First, @code{eval} checks to see if garbage-collection is necessary, and calls @@ -5058,7 +5045,7 @@ retrieved and the process repeated). The function should then consist of either a @code{Lisp_Subr} (built-in function), a @code{Lisp_Compiled_Function} object, or a cons whose car is the symbol -@code{autoload}, @code{macro}, @code{lambda}, or @code{mocklisp}. +@code{autoload}, @code{macro} or @code{lambda}. If the function is a @code{Lisp_Subr}, the lisp object points to a @code{struct Lisp_Subr} (created by @code{DEFUN()}), which contains a @@ -5074,8 +5061,7 @@ @code{apply_lambda()} is called. If the function is a macro, [..... fill in] is done. If the function is an autoload, @code{do_autoload()} is called to load the definition and then eval -starts over [explain this more]. If the function is a mocklisp, -@code{ml_apply()} is called. +starts over [explain this more]. When @code{Feval} exits, the evaluation depth is reduced by one, the debugger is called if appropriate, and the current backtrace structure
--- a/src/ChangeLog Mon Aug 13 10:20:01 2007 +0200 +++ b/src/ChangeLog Mon Aug 13 10:20:27 2007 +0200 @@ -1,5 +1,49 @@ +1998-02-14 SL Baur <steve@altair.xemacs.org> + + * s/sco5.h: Define LIB_GCC as -lgcc for gcc 2.8 and egcs. + Suggested by Robert Lipe <robertl@dgii.com> + +1998-02-14 Martin Buchholz <martin@xemacs.org> + + * event-Xt.c (x_reset_key_mapping): + * device-x.c: + (x-keysym-on-keyboard-p): + (x-keysym-on-keyboard-sans-modifiers-p): + Use x-keysym-on-keyboard-sans-modifiers-p instead of + x-keysym-on-keyboard-p to detect backspace. + Use symbols instead of strings (now deprecated) with x-keysym-*-p. + Clean up symbols used with dead keys, checking Linux and solaris + keysyms. + Simplify x-win-*.el using above methods. + Change documentation for x-keysym-*-p functions. + +1998-02-13 SL Baur <steve@altair.xemacs.org> + + * unexelfsgi.c: Various changes. + From Olivier Galibert <galibert@pobox.com> + + * s/freebsd.h: Avoid redefining BSD. + From Kazuyuki IENAGA <ienaga@jsys.co.jp> + + * extents.c (extent_fragment_update): Break up a line to avoid a + Digital UNIX 3.2g C compiler bug. + From Tonny Madsen <tma@nettest.dk> + + * process.c (create_process): Restore save_environ hackery. + +1998-02-10 SL Baur <steve@altair.xemacs.org> + + * emacsfns.h: Remove mocklisp declarations. + + * redisplay-msw.c (mswindows_update_dc): Enable evil kludge for + cygwin. + From Andy Piper <andyp@parallax.co.uk> + 1998-02-09 SL Baur <steve@altair.xemacs.org> + * menubar-msw.c (vars_of_menubar_mswindows): Fix patch failure. + Suggested by: kny@tekla.fi + * data.c (Fold_eq): PC-ize. * chartab.c: PC-ize.
--- a/src/device-x.c Mon Aug 13 10:20:01 2007 +0200 +++ b/src/device-x.c Mon Aug 13 10:20:27 2007 +0200 @@ -107,6 +107,7 @@ /************************************************************************/ /* JH 97/11/25 removed the static declaration because I need it during setup in event-Xt... */ +struct device * get_device_from_display_1 (Display *dpy); struct device * get_device_from_display_1 (Display *dpy) { @@ -593,7 +594,7 @@ x_event_name (int event_type) { if (event_type < 0) return 0; - if (event_type >= (sizeof (events) / sizeof (char *))) return 0; + if (event_type >= countof (events)) return 0; return events [event_type]; } @@ -1387,13 +1388,16 @@ on the keyboard of DEVICE without any modifier keys generates KEYSYM. Valid keysyms are listed in the files /usr/include/X11/keysymdef.h and in /usr/lib/X11/XKeysymDB, or whatever the equivalents are on your system. +The keysym name can be provided in two forms: +- if keysym is a string, it must be the name as known to X windows. +- if keysym is a symbol, it must be the name as known to XEmacs. +The two names differ in capitalization and underscoring. */ (keysym, device)) { struct device *d = decode_device (device); if (!DEVICE_X_P (d)) signal_simple_error ("Not an X device", device); - CHECK_STRING (keysym); return (EQ (Qsans_modifiers, Fgethash (keysym, DEVICE_X_KEYSYM_MAP_HASHTABLE (d), Qnil)) ? @@ -1407,14 +1411,16 @@ on the keyboard of DEVICE keys generates KEYSYM. Valid keysyms are listed in the files /usr/include/X11/keysymdef.h and in /usr/lib/X11/XKeysymDB, or whatever the equivalents are on your system. +The keysym name can be provided in two forms: +- if keysym is a string, it must be the name as known to X windows. +- if keysym is a symbol, it must be the name as known to XEmacs. +The two names differ in capitalization and underscoring. */ (keysym, device)) { struct device *d = decode_device (device); - if (!DEVICE_X_P (d)) signal_simple_error ("Not an X device", device); - CHECK_STRING (keysym); return (NILP (Fgethash (keysym, DEVICE_X_KEYSYM_MAP_HASHTABLE (d), Qnil)) ? Qnil : Qt);
--- a/src/emacsfns.h Mon Aug 13 10:20:01 2007 +0200 +++ b/src/emacsfns.h Mon Aug 13 10:20:27 2007 +0200 @@ -1501,11 +1501,6 @@ void clear_message (void); -/* Defined in mocklisp.c */ -extern Lisp_Object Vmocklisp_arguments, Qmocklisp, Qmocklisp_arguments; -Lisp_Object ml_apply (Lisp_Object function, Lisp_Object args); - - /* Defined in mule-*.c */ Lisp_Object Ffind_charset (Lisp_Object charset); Lisp_Object Fget_coding_system (Lisp_Object coding_system);
--- a/src/event-Xt.c Mon Aug 13 10:20:01 2007 +0200 +++ b/src/event-Xt.c Mon Aug 13 10:20:27 2007 +0200 @@ -115,6 +115,7 @@ 0 }; +static Lisp_Object x_keysym_to_emacs_keysym (KeySym keysym, int simple_p); void emacs_Xt_mapping_action (Widget w, XEvent *event); void debug_process_finalization (struct Lisp_Process *p); void emacs_Xt_event_handler (Widget wid, XtPointer closure, XEvent *event, @@ -193,8 +194,12 @@ XGetKeyboardMapping (display, xd->x_keysym_map_min_code, key_code_count, &xd->x_keysym_map_keysyms_per_code); - xd->x_keysym_map_hashtable = hashtable = - make_lisp_hashtable (128, HASHTABLE_NONWEAK, HASHTABLE_EQUAL); + hashtable = xd->x_keysym_map_hashtable; + if (HASHTABLEP (hashtable)) + Fclrhash (hashtable); + else + xd->x_keysym_map_hashtable = hashtable = + make_lisp_hashtable (128, HASHTABLE_NONWEAK, HASHTABLE_EQUAL); for (keysym = xd->x_keysym_map, keysyms_per_code = xd->x_keysym_map_keysyms_per_code, @@ -203,25 +208,32 @@ keysym += keysyms_per_code) { int j; - char *keysym_name; if (keysym[0] == NoSymbol) continue; - if ((keysym_name = XKeysymToString (keysym[0])) != NULL) - Fputhash (build_string (keysym_name), Qsans_modifiers, hashtable); + { + char *name = XKeysymToString (keysym[0]); + Lisp_Object sym = x_keysym_to_emacs_keysym (keysym[0], 0); + if (name) + { + Fputhash (build_string (name), Qsans_modifiers, hashtable); + Fputhash (sym, Qsans_modifiers, hashtable); + } + } for (j = 1; j < keysyms_per_code; j++) { - if (keysym[j] == keysym[0] || - keysym[j] == NoSymbol) - continue; - - if ((keysym_name = XKeysymToString (keysym[j])) != NULL) + if (keysym[j] != keysym[0] && + keysym[j] != NoSymbol) { - Lisp_Object name = build_string (keysym_name); - if (NILP (Fgethash (name, hashtable, Qnil))) - Fputhash (name, Qt, hashtable); + char *name = XKeysymToString (keysym[j]); + Lisp_Object sym = x_keysym_to_emacs_keysym (keysym[j], 0); + if (name && NILP (Fgethash (sym, hashtable, Qnil))) + { + Fputhash (build_string (name), Qt, hashtable); + Fputhash (sym, Qt, hashtable); + } } } }
--- a/src/extents.c Mon Aug 13 10:20:01 2007 +0200 +++ b/src/extents.c Mon Aug 13 10:20:27 2007 +0200 @@ -2871,12 +2871,17 @@ Dynarr_add (ef->extents, e); if (e == lhe) { + Lisp_Object f; /* memset isn't really necessary; we only deref `priority' and `face' */ memset (&dummy_lhe_extent, 0, sizeof (dummy_lhe_extent)); set_extent_priority (&dummy_lhe_extent, mouse_highlight_priority); - extent_face (&dummy_lhe_extent) = extent_mouse_face (lhe); + /* Need to break up thefollowing expression, due to an */ + /* error in the Digital UNIX 3.2g C compiler (Digital */ + /* UNIX Compiler Driver 3.11). */ + f = extent_mouse_face (lhe); + extent_face (&dummy_lhe_extent) = f; Dynarr_add (ef->extents, &dummy_lhe_extent); } /* since we are looping anyway, we might as well do this here */
--- a/src/menubar-msw.c Mon Aug 13 10:20:01 2007 +0200 +++ b/src/menubar-msw.c Mon Aug 13 10:20:27 2007 +0200 @@ -807,3 +807,5 @@ staticpro (¤t_menudesc); staticpro (¤t_hashtable); + Fprovide (intern ("mswindows-menubars")); +}
--- a/src/menubar.h Mon Aug 13 10:20:01 2007 +0200 +++ b/src/menubar.h Mon Aug 13 10:20:27 2007 +0200 @@ -26,7 +26,7 @@ #define _XEMACS_MENUBAR_H_ #ifdef HAVE_MENUBARS - +#include "gui.h" void update_frame_menubars (struct frame *f); void free_frame_menubars (struct frame *f); Lisp_Object menu_parse_submenu_keywords (Lisp_Object desc,
--- a/src/process.c Mon Aug 13 10:20:01 2007 +0200 +++ b/src/process.c Mon Aug 13 10:20:27 2007 +0200 @@ -868,9 +868,11 @@ p->exit_code = 0; { +#if !defined(__CYGWIN32__) /* child_setup must clobber environ on systems with true vfork. Protect it from permanent change. */ - /* char **save_environ = environ;*/ + char **save_environ = environ; +#endif #ifdef EMACS_BTL /* when performance monitoring is on, turn it off before the vfork(), @@ -1024,7 +1026,9 @@ cadillac_start_logging (); /* #### rename me */ #endif - /* environ = save_environ;*/ +#if !defined(__CYGWIN32__) + environ = save_environ; +#endif } if (pid < 0)
--- a/src/redisplay-msw.c Mon Aug 13 10:20:01 2007 +0200 +++ b/src/redisplay-msw.c Mon Aug 13 10:20:27 2007 +0200 @@ -217,8 +217,9 @@ if (!NILP (font)) SelectObject(hdc, FONT_INSTANCE_MSWINDOWS_HFONT (XFONT_INSTANCE (font))); -#ifdef DEBUG_XEMACS - /* evil kludge! - #### do we need this? */ +#if defined(DEBUG_XEMACS) || defined(__CYGWIN32__) + /* evil kludge! - #### do we need this? - cygwin does for some + reason --andyp */ if (!NILP (fg) && !COLOR_INSTANCEP (fg)) { /* this break under mule */
--- a/src/s/freebsd.h Mon Aug 13 10:20:01 2007 +0200 +++ b/src/s/freebsd.h Mon Aug 13 10:20:27 2007 +0200 @@ -33,15 +33,19 @@ #define LIBS_SYSTEM "-lutil" #endif +#ifndef NOT_C_CODE +#ifdef BSD /* fixing BSD define */ +#undef BSD +#endif +#include <sys/param.h> /* Kludge to work around setlocale(LC_ALL,...) not working after 01/1997 */ #if __FreeBSD_version >= 199701 #ifdef HAVE_X_WINDOWS -#ifndef NOT_C_CODE #include <X11/Xlocale.h> #define setlocale(locale_category, locale_spec) setlocale(LC_CTYPE, locale_spec) +#endif /* HAVE X */ +#endif /* FreeBSD >= 199701 */ #endif /* C code */ -#endif -#endif #define LIBS_TERMCAP "-ltermcap" @@ -83,20 +87,6 @@ #define TABDLY OXTABS #define TAB3 OXTABS -/* this silences a few compilation warnings */ -#undef BSD -#if __FreeBSD__ == 1 -#define BSD 199103 -#elif __FreeBSD__ == 2 -#if __FreeBSD_version < 199701 -# define BSD 199306 -#else -# define BSD 199506 -#endif -#elif __FreeBSD__ == 3 -#define BSD 199506 -#endif - /* Needed to avoid hanging when child process writes an error message and exits -- enami tsugutomo <enami@ba2.so-net.or.jp>. */ #define vfork fork
--- a/src/s/sco5.h Mon Aug 13 10:20:01 2007 +0200 +++ b/src/s/sco5.h Mon Aug 13 10:20:27 2007 +0200 @@ -134,6 +134,14 @@ #ifdef _SCO_ELF #undef COFF /* coz we're NOT */ #define UNEXEC "unexelf.o" +#if defined (__GNUC_MINOR__) +#if ((__GNUC__ == 2) && (__GNUC_MINOR__ > 7)) || ((__GNUC__ > 2)) +#define LIB_GCC "-lgcc" +#else #define LIB_GCC "-lgcc-elf" #endif +#else /* __GNUC_MINOR__ is undefined */ +#define LIB_GCC "-lgcc-elf" +#endif +#endif
--- a/src/unexelfsgi.c Mon Aug 13 10:20:01 2007 +0200 +++ b/src/unexelfsgi.c Mon Aug 13 10:20:27 2007 +0200 @@ -498,7 +498,7 @@ #include <sym.h> /* for HDRR declaration */ #include <sys/mman.h> #include <config.h> -#include "sysdep.h" +#include "lisp.h" /* in 64bits mode, use 64bits elf */ #ifdef _ABI64 @@ -520,12 +520,6 @@ #endif -#ifndef emacs -#define fatal(a, b, c) fprintf(stderr, a, b, c), exit(1) -#else -extern void fatal(char *, ...); -#endif - /* Get the address of a particular section or program header entry, * accounting for the size of the entries. */ @@ -605,7 +599,7 @@ * .data section, and inserting an empty .bss immediately afterwards. * */ -void +int unexec (new_name, old_name, data_start, bss_start, entry_address) char *new_name, *old_name; uintptr_t data_start, bss_start, entry_address; @@ -1011,4 +1005,6 @@ stat_buf.st_mode |= 0111 & ~n; if (chmod (new_name, stat_buf.st_mode) == -1) fatal ("Can't chmod (%s): errno %d\n", new_name, errno); + + return 0; }