carbon2-commit: Wrap field descriptions, descr-text.el; name created buffer more uniquely.
16 years, 5 months
Aidan Kehoe
changeset: 4510:74caf140505b589959374ba69b7e5cfd5a38aadf
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sat Jul 19 15:19:59 2008 +0200
files: lisp/ChangeLog lisp/descr-text.el
description:
Wrap field descriptions, descr-text.el; name created buffer more uniquely.
2008-07-19 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (describe-property-list): Move the (require
'hyper-apropos) call to top level, this isn't the only function
that uses the relevant face.
(describe-char): Wrap the Unihan field descriptions if they are
longer than the windows width minus 50.
Rename the created buffer to reflect the character's position as
well as its value.
diff -r 4cb7c59b5201ae584dfe081c131e5f20de3eab7e -r 74caf140505b589959374ba69b7e5cfd5a38aadf lisp/ChangeLog
--- a/lisp/ChangeLog Thu Jul 17 22:50:22 2008 +0200
+++ b/lisp/ChangeLog Sat Jul 19 15:19:59 2008 +0200
@@ -1,3 +1,13 @@ 2008-07-07 Aidan Kehoe <kehoea@parhasa
+2008-07-19 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * descr-text.el (describe-property-list): Move the (require
+ 'hyper-apropos) call to top level, this isn't the only function
+ that uses the relevant face.
+ (describe-char): Wrap the Unihan field descriptions if they are
+ longer than the windows width minus 50.
+ Rename the created buffer to reflect the character's position as
+ well as its value.
+
2008-07-07 Aidan Kehoe <kehoea(a)parhasard.net>
Patch to make it up to the device-specific code whether
diff -r 4cb7c59b5201ae584dfe081c131e5f20de3eab7e -r 74caf140505b589959374ba69b7e5cfd5a38aadf lisp/descr-text.el
--- a/lisp/descr-text.el Thu Jul 17 22:50:22 2008 +0200
+++ b/lisp/descr-text.el Sat Jul 19 15:19:59 2008 +0200
@@ -31,6 +31,8 @@
;;; Code:
(eval-when-compile (require 'wid-edit))
+
+(require 'hyper-apropos)
;;; Describe-Text Utilities.
@@ -82,7 +84,6 @@ into help buttons that call `describe-te
into help buttons that call `describe-text-category' or
`describe-face' when pushed."
;; Sort the properties by the size of their value.
- (require 'hyper-apropos)
(dolist (elt (sort (let (ret)
(while properties
(push (list (pop properties) (pop properties)) ret))
@@ -1029,7 +1030,8 @@ as well as widgets, buttons, overlays, a
(describe-text-properties pos tmp-buf)
(with-current-buffer tmp-buf (buffer-string)))
(kill-buffer tmp-buf))))
- item-list max-width unicode unicode-formatted unicode-error)
+ item-list max-width unicode unicode-formatted unicode-error
+ unicodedata (max-unicode-description-width (- (window-width) 50)))
(setq unicode-error
@@ -1185,13 +1187,29 @@ as well as widgets, buttons, overlays, a
`(insert-gui-button
(make-gui-button
,(symbol-name face)))))))
- ,@(let ((unicodedata (and unicode
- (describe-char-unicode-data unicode))))
+ ,@(progn
+ (setq unicodedata (and unicode
+ (describe-char-unicode-data unicode)))
(if unicodedata
(cons (list "Unicode data" " ") unicodedata)))))
(setq max-width (apply #'max (mapcar #'(lambda (x)
(if (cadr x) (length (car x)) 0))
item-list)))
+ (when (and unicodedata (> max-width max-unicode-description-width))
+ (setq max-width max-unicode-description-width)
+ (with-temp-buffer
+ (let ((fill-column max-unicode-description-width)
+ (indent-tabs-mode nil))
+ (dolist (unidata-line unicodedata)
+ (when (cadr unidata-line)
+ (setf (car unidata-line)
+ (progn (insert (car unidata-line))
+ (goto-char (point-min))
+ (fill-paragraph 'right)
+ (delete-region (1- (point-max))
+ (point-max))
+ (buffer-string)))
+ (delete-region (point-min) (point-max)))))))
; (help-setup-xref nil (interactive-p))
(with-displaying-help-buffer
(lambda ()
@@ -1274,7 +1292,7 @@ as well as widgets, buttons, overlays, a
; (setq help-xref-stack-item (list 'help-insert-string (buffer-string)))
(toggle-read-only 1)
(print-help-return-message)))
- (format "Describe %c" (char-after pos)))))
+ (format "Describe %c <%d>" (char-after pos) pos))))
(defalias 'describe-char-after 'describe-char)
(make-obsolete 'describe-char-after 'describe-char "22.1")
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Revert to the documented behaviour with window-system and noninteractive runs.
16 years, 5 months
Aidan Kehoe
changeset: 4509:4cb7c59b5201ae584dfe081c131e5f20de3eab7e
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Thu Jul 17 22:50:22 2008 +0200
files: src/ChangeLog src/redisplay.c
description:
Revert to the documented behaviour with window-system and noninteractive runs.
2008-07-17 Aidan Kehoe <kehoea(a)parhasard.net>
* redisplay.c (init_redisplay):
Don't set window-system to 'stream if running noninteractively,
revert to the documented behaviour.
diff -r ec442dc06fe1bc671fbe0ed0a928b294cdd45aba -r 4cb7c59b5201ae584dfe081c131e5f20de3eab7e src/ChangeLog
--- a/src/ChangeLog Thu Jul 10 23:37:52 2008 +0200
+++ b/src/ChangeLog Thu Jul 17 22:50:22 2008 +0200
@@ -1,3 +1,9 @@ 2008-07-07 Aidan Kehoe <kehoea@parhasa
+2008-07-17 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * redisplay.c (init_redisplay):
+ Don't set window-system to 'stream if running noninteractively,
+ revert to the documented behaviour.
+
2008-07-07 Aidan Kehoe <kehoea(a)parhasard.net>
Patch to make it up to the device-specific code whether
diff -r ec442dc06fe1bc671fbe0ed0a928b294cdd45aba -r 4cb7c59b5201ae584dfe081c131e5f20de3eab7e src/redisplay.c
--- a/src/redisplay.c Thu Jul 10 23:37:52 2008 +0200
+++ b/src/redisplay.c Thu Jul 17 22:50:22 2008 +0200
@@ -9753,7 +9753,6 @@ init_redisplay (void)
if (noninteractive)
{
- Vwindow_system = Qstream;
Vinitial_device_type = Qstream;
return;
}
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Don't determine whether to call general device-type code at startup,
16 years, 5 months
Aidan Kehoe
changeset: 4507:e34711681f304b66702247a4537da0537ab14e3e
parent: 4505:86283c809984f21bfb6f3fd971d2774b61e03f0a
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Wed Jul 09 20:46:22 2008 +0200
files: lisp/ChangeLog lisp/coding.el lisp/gtk-init.el lisp/msw-init.el lisp/mule/mule-x-init.el lisp/startup.el lisp/tty-init.el lisp/x-compose.el lisp/x-init.el lisp/x-win-sun.el lisp/x-win-xfree86.el src/ChangeLog src/device-gtk.c src/device-msw.c src/device-tty.c src/device-x.c src/emacs.c src/frame-tty.c src/redisplay.c
description:
Don't determine whether to call general device-type code at startup,
rather decide in the device-specific code itself.
lisp/ChangeLog addition:
2008-07-07 Aidan Kehoe <kehoea(a)parhasard.net>
Patch to make it up to the device-specific code whether
various Lisp functions should be called during device creation,
not relying on the startup code to decide this. Also, rename
initial-window-system to initial-device-type (which makes more
sense in this scheme), always set it.
* startup.el (command-line):
Use initial-device-type, not initial-window-system; just call
#'make-device, leave the special behaviour to be done the first
time a console type is initialised to be decided on by the
respective console code.
* x-init.el (x-app-defaults-directory): Declare that it should be
bound.
(x-define-dead-key): Have the macro take a DEVICE argument.
(x-initialize-compose): Have the function take a DEVICE argument,
and use it when checking if various keysyms are available on the
keyboard.
(x-initialize-keyboard): Have the function take a DEVICE argument,
allowing device-specific keyboard initialisation.
(make-device-early-x-entry-point-called-p): New.
(make-device-late-x-entry-point-called-p): New. Rename
pre-x-win-initted, x-win-initted.
(make-device-early-x-entry-point): Rename init-pre-x-win, take the
call to make-x-device out (it should be called from the
device-creation code, not vice-versa).
(make-device-late-x-entry-point): Rename init-post-x-win, have it
take a DEVICE argument, use that DEVICE argument when working out
what device-specific things need doing. Don't use
create-console-hook in core code.
* x-win-xfree86.el (x-win-init-xfree86): Take a DEVICE argument;
use it.
* x-win-sun.el (x-win-init-sun): Take a DEVICE argument; use it.
* mule/mule-x-init.el: Remove #'init-mule-x-win, an empty
function.
* tty-init.el (make-device-early-tty-entry-point-called-p): New.
Rename pre-tty-win-initted.
(make-device-early-tty-entry-point): New.
Rename init-pre-tty-win.
(make-frame-after-init-entry-point): New.
Rename init-post-tty-win to better reflect when it's called.
* gtk-init.el (gtk-early-lisp-options-file): New.
Move this path to a documented variable.
(gtk-command-switch-alist): Wrap the docstring to fewer than 79
columns.
(make-device-early-gtk-entry-point-called-p): New.
(make-device-late-gtk-entry-point-called-p): New.
Renamed gtk-pre-win-initted, gtk-post-win-initted to these.
(make-device-early-gtk-entry-point): New.
(make-device-late-gtk-entry-point): New.
Renamed init-pre-gtk-win, init-post-gtk-win to these.
Have make-device-late-gtk-entry-point take a device argument, and use
it; have make-device-early-gtk-entry-point load the GTK-specific
startup code, instead of doing that in C.
(init-gtk-win): Deleted, functionality moved to the GTK device
creation code.
(gtk-define-dead-key): Have it take a DEVICE argument; use this
argument.
(gtk-initialize-compose): Ditto.
* coding.el (set-terminal-coding-system):
Correct the docstring; the function isn't broken.
src/ChangeLog addition:
2008-07-07 Aidan Kehoe <kehoea(a)parhasard.net>
Patch to make it up to the device-specific code whether
various Lisp functions should be called during device creation,
not relying on the startup code to decide this. Also, rename
initial-window-system to initial-device-type (which makes more
sense in this scheme), always set it.
* redisplay.c (Vinitial_device_type): New.
(Vinitial_window_system): Removed.
Rename initial-window-system to initial-device type, making it
a stream if we're noninteractive. Update its docstring.
* device-x.c (Qmake_device_early_x_entry_point,
Qmake_device_late_x_entry_point): New.
Rename Qinit_pre_x_win, Qinit_post_x_win.
(x_init_device): Call #'make-device-early-x-entry-point earlier,
now we rely on it to find the application class and the
app-defaults directory.
(x_finish_init_device): Call #'make-device-late-x-entry-point with
the created device.
(Vx_app_defaults_directory): Always make this available, to
simplify code in x-init.el.
* device-tty.c (Qmake_device_early_tty_entry_point): New.
Rename Qinit_pre_tty_win, rename Qinit_post_tty_win and move to
frame-tty.c as Qmake_frame_after_init_entry_point.
(tty_init_device): Call #'make-device-early-tty-entry-point before
doing anything.
* frame-tty.c (Qmake_frame_after_init_entry_point): New.
* frame-tty.c (tty_after_init_frame): Have it call the
better-named #'make-frame-after-init-entry-point function
instead of #'init-post-tty-win (since it's called after frame, not
device, creation).
* device-msw.c (Qmake_device_early_mswindows_entry_point,
Qmake_device_late_mswindows_entry_point): New.
Rename Qinit_pre_mswindows_win, Qinit_post_mswindows_win.
(mswindows_init_device): Call
#'make-device-early-mswindows-entry-point here, instead of having
its predecessor call us.
(mswindows_finish_init_device): Call
#'make-device-early-mswindows-entry-point, for symmetry with the
other device types (though it's an empty function).
* device-gtk.c (Qmake_device_early_gtk_entry_point,
Qmake_device_late_gtk_entry_point): New.
Rename Qinit_pre_gtk_win, Qinit_post_gtk_win.
(gtk_init_device): Call #'make-device-early-gtk-entry-point; don't
load ~/.xemacs/gtk-options.el ourselves, leave that to lisp.
(gtk_finish_init_device): Call #'make-device-late-gtk-entry-point
with the created device as an argument.
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e lisp/ChangeLog
--- a/lisp/ChangeLog Sun Jul 06 19:46:19 2008 +0300
+++ b/lisp/ChangeLog Wed Jul 09 20:46:22 2008 +0200
@@ -1,3 +1,70 @@ 2008-06-29 Aidan Kehoe <kehoea@parhasa
+2008-07-07 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ Patch to make it up to the device-specific code whether
+ various Lisp functions should be called during device creation,
+ not relying on the startup code to decide this. Also, rename
+ initial-window-system to initial-device-type (which makes more
+ sense in this scheme), always set it.
+
+ * startup.el (command-line):
+ Use initial-device-type, not initial-window-system; just call
+ #'make-device, leave the special behaviour to be done the first
+ time a console type is initialised to be decided on by the
+ respective console code.
+
+ * x-init.el (x-app-defaults-directory): Declare that it should be
+ bound.
+ (x-define-dead-key): Have the macro take a DEVICE argument.
+ (x-initialize-compose): Have the function take a DEVICE argument,
+ and use it when checking if various keysyms are available on the
+ keyboard.
+ (x-initialize-keyboard): Have the function take a DEVICE argument,
+ allowing device-specific keyboard initialisation.
+ (make-device-early-x-entry-point-called-p): New.
+ (make-device-late-x-entry-point-called-p): New. Rename
+ pre-x-win-initted, x-win-initted.
+ (make-device-early-x-entry-point): Rename init-pre-x-win, take the
+ call to make-x-device out (it should be called from the
+ device-creation code, not vice-versa).
+ (make-device-late-x-entry-point): Rename init-post-x-win, have it
+ take a DEVICE argument, use that DEVICE argument when working out
+ what device-specific things need doing. Don't use
+ create-console-hook in core code.
+ * x-win-xfree86.el (x-win-init-xfree86): Take a DEVICE argument;
+ use it.
+ * x-win-sun.el (x-win-init-sun): Take a DEVICE argument; use it.
+ * mule/mule-x-init.el: Remove #'init-mule-x-win, an empty
+ function.
+
+ * tty-init.el (make-device-early-tty-entry-point-called-p): New.
+ Rename pre-tty-win-initted.
+ (make-device-early-tty-entry-point): New.
+ Rename init-pre-tty-win.
+ (make-frame-after-init-entry-point): New.
+ Rename init-post-tty-win to better reflect when it's called.
+
+ * gtk-init.el (gtk-early-lisp-options-file): New.
+ Move this path to a documented variable.
+ (gtk-command-switch-alist): Wrap the docstring to fewer than 79
+ columns.
+ (make-device-early-gtk-entry-point-called-p): New.
+ (make-device-late-gtk-entry-point-called-p): New.
+ Renamed gtk-pre-win-initted, gtk-post-win-initted to these.
+ (make-device-early-gtk-entry-point): New.
+ (make-device-late-gtk-entry-point): New.
+ Renamed init-pre-gtk-win, init-post-gtk-win to these.
+ Have make-device-late-gtk-entry-point take a device argument, and use
+ it; have make-device-early-gtk-entry-point load the GTK-specific
+ startup code, instead of doing that in C.
+ (init-gtk-win): Deleted, functionality moved to the GTK device
+ creation code.
+ (gtk-define-dead-key): Have it take a DEVICE argument; use this
+ argument.
+ (gtk-initialize-compose): Ditto.
+
+ * coding.el (set-terminal-coding-system):
+ Correct the docstring; the function isn't broken.
+
2008-06-29 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (describe-char-unicode-data):
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e lisp/coding.el
--- a/lisp/coding.el Sun Jul 06 19:46:19 2008 +0300
+++ b/lisp/coding.el Wed Jul 09 20:46:22 2008 +0200
@@ -108,7 +108,7 @@ or a function symbol which, when called,
terminal-coding-system)
(defun set-terminal-coding-system (coding-system)
- "Set the coding system used for TTY display output. Currently broken."
+ "Set the coding system used for TTY display output."
(interactive "zterminal-coding-system: ")
(get-coding-system coding-system) ; correctness check
(setq terminal-coding-system coding-system)
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e lisp/gtk-init.el
--- a/lisp/gtk-init.el Sun Jul 06 19:46:19 2008 +0300
+++ b/lisp/gtk-init.el Wed Jul 09 20:46:22 2008 +0200
@@ -24,15 +24,19 @@
;; Boston, MA 02111-1307, USA.
(globally-declare-boundp
- '(gtk-initial-argv-list
- gtk-initial-geometry))
+ '(gtk-initial-argv-list gtk-initial-geometry))
(globally-declare-fboundp
'(gtk-keysym-on-keyboard-p))
-(defvar gtk-win-initted nil)
-(defvar gtk-pre-win-initted nil)
-(defvar gtk-post-win-initted nil)
+(defvar gtk-early-lisp-options-file "~/.xemacs/gtk-options.el"
+ "Path where GTK-specific early options should be stored.
+
+This allows the user to set initial geometry without using GNOME and session
+management, and, since it is read before GTK is initialized, it avoids
+window flicker on resizing.
+
+It is normally not useful to change without recompiling XEmacs.")
(defvar gtk-command-switch-alist
'(
@@ -66,26 +70,50 @@
("--sm-disable" . t)
)
- "An assoc list of command line arguments that should in gtk-initial-argv-list.
-This is necessary because GTK and GNOME consider it a fatal error if they receive
-unknown command line arguments (perfectly reasonable). But this means that if
-the user specifies a file name on the command line they will be unable to start.
-So we filter the command line and allow only items in this list in.
-
-The CDR of the assoc list is whether it accepts an argument. All options are in
-GNU long form though.")
-
-(defun init-pre-gtk-win ()
- "Initialize Gtk GUI at startup (pre). Don't call this."
- (when (not gtk-pre-win-initted)
- (setq initial-frame-plist (if initial-frame-unmapped-p
- '(initially-unmapped t)
- nil)
- gtk-pre-win-initted t)))
+ "An assoc list of command line args that should be in gtk-initial-argv-list.
+This is necessary because GTK and GNOME consider it a fatal error if they
+receive unknown command line arguments (perfectly reasonable). But this
+means that if the user specifies a file name on the command line they will
+be unable to start. So we filter the command line and allow only items in
+this list in.
+
+The CDR of the assoc list is whether it accepts an argument. For the
+moment, all options are in GNU long form.")
+
+(defvar make-device-early-gtk-entry-point-called-p nil
+ "Whether `make-device-early-gtk-entry-point' has been called, at least once.
+
+Much of the GTK-specific Lisp init code should only be called the first time
+a GTK device is created; this variable allows for that.")
+
+(defvar make-device-late-gtk-entry-point-called-p nil
+ "Whether `make-device-late-gtk-entry-point' has been called, at least once.
+
+Much of the GTK-specific Lisp init code should only be called the first time
+a GTK device is created; this variable allows for that.")
+
+(defun make-device-early-gtk-entry-point ()
+ "Entry point to set up the Lisp environment before GTK device creation."
+ (unless make-device-early-gtk-entry-point-called-p
+ (setq initial-frame-plist
+ (and initial-frame-unmapped-p '(initially-unmapped t))
+ gtk-initial-argv-list
+ (cons (car command-line-args) (gtk-filter-arguments))
+ gtk-initial-geometry
+ (nth 1 (member "-geometry" command-line-args-left))
+ make-device-early-gtk-entry-point-called-p t)
+ (unless vanilla-inhibiting
+ (load gtk-early-lisp-options-file t t t))))
(defun gtk-init-handle-geometry (arg)
"Set up initial geometry info for GTK devices."
(setq gtk-initial-geometry (pop command-line-args-left)))
+
+(defun make-device-late-gtk-entry-point (device)
+ "Entry-Point to do any Lisp-level GTK device-specific initialization."
+ (gtk-initialize-compose device)
+ (unless make-device-late-gtk-entry-point-called-p
+ (setq make-device-late-gtk-entry-point-called-p t)))
(defun gtk-filter-arguments ()
(let ((accepted nil)
@@ -121,29 +149,15 @@ GNU long form though.")
(setq command-line-args-left (nreverse rejected))
(nreverse accepted)))
-(defun init-gtk-win ()
- "Initialize Gtk GUI at startup. Don't call this."
- (unless gtk-win-initted
- (init-pre-gtk-win)
- (setq gtk-initial-argv-list (cons (car command-line-args) (gtk-filter-arguments))
- gtk-initial-geometry (nth 1 (member "-geometry" command-line-args-left)))
- (make-gtk-device)
- (init-post-gtk-win)
- (setq gtk-win-initted t)))
-
-(defun init-post-gtk-win ()
- (unless gtk-post-win-initted
- (setq gtk-post-win-initted t)))
-
(push '("-geometry" . gtk-init-handle-geometry) command-switch-alist)
;;; Stuff to get compose keys working on GTK
(eval-when-compile
- (defmacro gtk-define-dead-key (key map)
- `(when (gtk-keysym-on-keyboard-p ',key)
+ (defmacro gtk-define-dead-key (key map device)
+ `(when (gtk-keysym-on-keyboard-p ',key device)
(define-key function-key-map [,key] ',map))))
-(defun gtk-initialize-compose ()
+(defun gtk-initialize-compose (device)
"Enable compose processing"
(autoload 'compose-map "gtk-compose" nil t 'keymap)
(autoload 'compose-acute-map "gtk-compose" nil t 'keymap)
@@ -153,7 +167,7 @@ GNU long form though.")
(autoload 'compose-circumflex-map "gtk-compose" nil t 'keymap)
(autoload 'compose-tilde-map "gtk-compose" nil t 'keymap)
- (when (gtk-keysym-on-keyboard-p 'multi-key)
+ (when (gtk-keysym-on-keyboard-p 'multi-key device)
(define-key function-key-map [multi-key] 'compose-map))
;; The dead keys might really be called just about anything, depending
@@ -172,93 +186,85 @@ GNU long form though.")
;; mixed up view of what these keys should be called.
;; Canonical names:
- (gtk-define-dead-key acute compose-acute-map)
- (gtk-define-dead-key grave compose-grave-map)
- (gtk-define-dead-key cedilla compose-cedilla-map)
- (gtk-define-dead-key diaeresis compose-diaeresis-map)
- (gtk-define-dead-key circumflex compose-circumflex-map)
- (gtk-define-dead-key tilde compose-tilde-map)
- (gtk-define-dead-key degree compose-ring-map)
+ (gtk-define-dead-key acute compose-acute-map device)
+ (gtk-define-dead-key grave compose-grave-map device)
+ (gtk-define-dead-key cedilla compose-cedilla-map device)
+ (gtk-define-dead-key diaeresis compose-diaeresis-map device)
+ (gtk-define-dead-key circumflex compose-circumflex-map device)
+ (gtk-define-dead-key tilde compose-tilde-map device)
+ (gtk-define-dead-key degree compose-ring-map device)
;; Sun according to MIT:
- (gtk-define-dead-key SunFA_Acute compose-acute-map)
- (gtk-define-dead-key SunFA_Grave compose-grave-map)
- (gtk-define-dead-key SunFA_Cedilla compose-cedilla-map)
- (gtk-define-dead-key SunFA_Diaeresis compose-diaeresis-map)
- (gtk-define-dead-key SunFA_Circum compose-circumflex-map)
- (gtk-define-dead-key SunFA_Tilde compose-tilde-map)
+ (gtk-define-dead-key SunFA_Acute compose-acute-map device)
+ (gtk-define-dead-key SunFA_Grave compose-grave-map device)
+ (gtk-define-dead-key SunFA_Cedilla compose-cedilla-map device)
+ (gtk-define-dead-key SunFA_Diaeresis compose-diaeresis-map device)
+ (gtk-define-dead-key SunFA_Circum compose-circumflex-map device)
+ (gtk-define-dead-key SunFA_Tilde compose-tilde-map device)
;; Sun according to OpenWindows 2:
- (gtk-define-dead-key Dead_Grave compose-grave-map)
- (gtk-define-dead-key Dead_Circum compose-circumflex-map)
- (gtk-define-dead-key Dead_Tilde compose-tilde-map)
+ (gtk-define-dead-key Dead_Grave compose-grave-map device)
+ (gtk-define-dead-key Dead_Circum compose-circumflex-map device)
+ (gtk-define-dead-key Dead_Tilde compose-tilde-map device)
;; Sun according to OpenWindows 3:
- (gtk-define-dead-key SunXK_FA_Acute compose-acute-map)
- (gtk-define-dead-key SunXK_FA_Grave compose-grave-map)
- (gtk-define-dead-key SunXK_FA_Cedilla compose-cedilla-map)
- (gtk-define-dead-key SunXK_FA_Diaeresis compose-diaeresis-map)
- (gtk-define-dead-key SunXK_FA_Circum compose-circumflex-map)
- (gtk-define-dead-key SunXK_FA_Tilde compose-tilde-map)
+ (gtk-define-dead-key SunXK_FA_Acute compose-acute-map device)
+ (gtk-define-dead-key SunXK_FA_Grave compose-grave-map device)
+ (gtk-define-dead-key SunXK_FA_Cedilla compose-cedilla-map device)
+ (gtk-define-dead-key SunXK_FA_Diaeresis compose-diaeresis-map device)
+ (gtk-define-dead-key SunXK_FA_Circum compose-circumflex-map device)
+ (gtk-define-dead-key SunXK_FA_Tilde compose-tilde-map device)
;; DEC according to MIT:
- (gtk-define-dead-key Dacute_accent compose-acute-map)
- (gtk-define-dead-key Dgrave_accent compose-grave-map)
- (gtk-define-dead-key Dcedilla_accent compose-cedilla-map)
- (gtk-define-dead-key Dcircumflex_accent compose-circumflex-map)
- (gtk-define-dead-key Dtilde compose-tilde-map)
- (gtk-define-dead-key Dring_accent compose-ring-map)
+ (gtk-define-dead-key Dacute_accent compose-acute-map device)
+ (gtk-define-dead-key Dgrave_accent compose-grave-map device)
+ (gtk-define-dead-key Dcedilla_accent compose-cedilla-map device)
+ (gtk-define-dead-key Dcircumflex_accent compose-circumflex-map device)
+ (gtk-define-dead-key Dtilde compose-tilde-map device)
+ (gtk-define-dead-key Dring_accent compose-ring-map device)
;; DEC according to OpenWindows 3:
- (gtk-define-dead-key DXK_acute_accent compose-acute-map)
- (gtk-define-dead-key DXK_grave_accent compose-grave-map)
- (gtk-define-dead-key DXK_cedilla_accent compose-cedilla-map)
- (gtk-define-dead-key DXK_circumflex_accent compose-circumflex-map)
- (gtk-define-dead-key DXK_tilde compose-tilde-map)
- (gtk-define-dead-key DXK_ring_accent compose-ring-map)
+ (gtk-define-dead-key DXK_acute_accent compose-acute-map device)
+ (gtk-define-dead-key DXK_grave_accent compose-grave-map device)
+ (gtk-define-dead-key DXK_cedilla_accent compose-cedilla-map device)
+ (gtk-define-dead-key DXK_circumflex_accent compose-circumflex-map device)
+ (gtk-define-dead-key DXK_tilde compose-tilde-map device)
+ (gtk-define-dead-key DXK_ring_accent compose-ring-map device)
;; HP according to MIT:
- (gtk-define-dead-key hpmute_acute compose-acute-map)
- (gtk-define-dead-key hpmute_grave compose-grave-map)
- (gtk-define-dead-key hpmute_diaeresis compose-diaeresis-map)
- (gtk-define-dead-key hpmute_asciicircum compose-circumflex-map)
- (gtk-define-dead-key hpmute_asciitilde compose-tilde-map)
+ (gtk-define-dead-key hpmute_acute compose-acute-map device)
+ (gtk-define-dead-key hpmute_grave compose-grave-map device)
+ (gtk-define-dead-key hpmute_diaeresis compose-diaeresis-map device)
+ (gtk-define-dead-key hpmute_asciicircum compose-circumflex-map device)
+ (gtk-define-dead-key hpmute_asciitilde compose-tilde-map device)
;; Empirically discovered on Linux XFree86 MetroX:
- (gtk-define-dead-key usldead_acute compose-acute-map)
- (gtk-define-dead-key usldead_grave compose-grave-map)
- (gtk-define-dead-key usldead_diaeresis compose-diaeresis-map)
- (gtk-define-dead-key usldead_asciicircum compose-circumflex-map)
- (gtk-define-dead-key usldead_asciitilde compose-tilde-map)
+ (gtk-define-dead-key usldead_acute compose-acute-map device)
+ (gtk-define-dead-key usldead_grave compose-grave-map device)
+ (gtk-define-dead-key usldead_diaeresis compose-diaeresis-map device)
+ (gtk-define-dead-key usldead_asciicircum compose-circumflex-map device)
+ (gtk-define-dead-key usldead_asciitilde compose-tilde-map device)
;; HP according to OpenWindows 3:
- (gtk-define-dead-key hpXK_mute_acute compose-acute-map)
- (gtk-define-dead-key hpXK_mute_grave compose-grave-map)
- (gtk-define-dead-key hpXK_mute_diaeresis compose-diaeresis-map)
- (gtk-define-dead-key hpXK_mute_asciicircum compose-circumflex-map)
- (gtk-define-dead-key hpXK_mute_asciitilde compose-tilde-map)
+ (gtk-define-dead-key hpXK_mute_acute compose-acute-map device)
+ (gtk-define-dead-key hpXK_mute_grave compose-grave-map device)
+ (gtk-define-dead-key hpXK_mute_diaeresis compose-diaeresis-map device)
+ (gtk-define-dead-key hpXK_mute_asciicircum compose-circumflex-map device)
+ (gtk-define-dead-key hpXK_mute_asciitilde compose-tilde-map device)
;; HP according to HP-UX 8.0:
- (gtk-define-dead-key XK_mute_acute compose-acute-map)
- (gtk-define-dead-key XK_mute_grave compose-grave-map)
- (gtk-define-dead-key XK_mute_diaeresis compose-diaeresis-map)
- (gtk-define-dead-key XK_mute_asciicircum compose-circumflex-map)
- (gtk-define-dead-key XK_mute_asciitilde compose-tilde-map)
+ (gtk-define-dead-key XK_mute_acute compose-acute-map device)
+ (gtk-define-dead-key XK_mute_grave compose-grave-map device)
+ (gtk-define-dead-key XK_mute_diaeresis compose-diaeresis-map device)
+ (gtk-define-dead-key XK_mute_asciicircum compose-circumflex-map device)
+ (gtk-define-dead-key XK_mute_asciitilde compose-tilde-map device)
;; Xfree86 seems to use lower case and a hyphen
- (gtk-define-dead-key dead-acute compose-acute-map)
- (gtk-define-dead-key dead-grave compose-grave-map)
- (gtk-define-dead-key dead-cedilla compose-cedilla-map)
- (gtk-define-dead-key dead-diaeresis compose-diaeresis-map)
- (gtk-define-dead-key dead-circum compose-circumflex-map)
- (gtk-define-dead-key dead-circumflex compose-circumflex-map)
- (gtk-define-dead-key dead-tilde compose-tilde-map)
- )
-
-(when (featurep 'gtk)
- (add-hook
- 'create-console-hook
- (lambda (console)
- (letf (((selected-console) console))
- (when (eq 'gtk (console-type console))
- (gtk-initialize-compose))))))
+ (gtk-define-dead-key dead-acute compose-acute-map device)
+ (gtk-define-dead-key dead-grave compose-grave-map device)
+ (gtk-define-dead-key dead-cedilla compose-cedilla-map device)
+ (gtk-define-dead-key dead-diaeresis compose-diaeresis-map device)
+ (gtk-define-dead-key dead-circum compose-circumflex-map device)
+ (gtk-define-dead-key dead-circumflex compose-circumflex-map device)
+ (gtk-define-dead-key dead-tilde compose-tilde-map device))
+
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e lisp/msw-init.el
--- a/lisp/msw-init.el Sun Jul 06 19:46:19 2008 +0300
+++ b/lisp/msw-init.el Wed Jul 09 20:46:22 2008 +0200
@@ -23,26 +23,15 @@
;; Free Software Foundation, 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
-(defvar mswindows-win-initted nil)
-(defvar mswindows-pre-win-initted nil)
-(defvar mswindows-post-win-initted nil)
+(defvar make-device-early-mswindows-entry-point-called-p nil
+ "Whether `make-device-early-mswindows-entry-point' has been called")
-(defun init-pre-mswindows-win ()
- "Initialize mswindows GUI at startup (pre). Don't call this."
- (unless mswindows-pre-win-initted
- (setq mswindows-pre-win-initted t)))
+(defvar make-device-late-mswindows-entry-point-called-p nil
+ "Whether `make-device-late-mswindows-entry-point' has been called")
-(defun init-mswindows-win ()
- "Initialize mswindows GUI at startup. Don't call this."
- (unless mswindows-win-initted
- (init-pre-mswindows-win)
- (make-mswindows-device)
- (init-post-mswindows-win (selected-console))
- (setq mswindows-win-initted t)))
-
-(defun init-post-mswindows-win (console)
- "Initialize mswindows GUI at startup (post). Don't call this."
- (unless mswindows-post-win-initted
+(defun make-device-early-mswindows-entry-point ()
+ "Lisp code called before an `mswindows' device is created."
+ (unless make-device-early-mswindows-entry-point-called-p
;; Old-style mswindows bindings. The new-style mswindows bindings
;; (namely Ctrl-X, Ctrl-C and Ctrl-V) are already spoken for by XEmacs.
(global-set-key '(shift delete) 'kill-primary-selection)
@@ -50,6 +39,10 @@
(global-set-key '(control insert) 'copy-primary-selection)
(global-set-key '(meta f4) 'save-buffers-kill-emacs)
+ (setq make-device-early-mswindows-entry-point-called-p t)))
- (setq mswindows-post-win-initted t)))
+(defun make-device-late-mswindows-entry-point (device)
+ "Lisp code called after an `mswindows' device is created."
+ (unless make-device-late-mswindows-entry-point-called-p
+ (setq make-device-late-mswindows-entry-point-called-p t)))
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e lisp/mule/mule-x-init.el
--- a/lisp/mule/mule-x-init.el Sun Jul 06 19:46:19 2008 +0300
+++ b/lisp/mule/mule-x-init.el Wed Jul 09 20:46:22 2008 +0200
@@ -28,6 +28,7 @@
;;; Work around what is arguably a Sun CDE bug.
+;; #### This is unused, apparently.
(defun x-use-halfwidth-roman-font (fullwidth-charset roman-registry)
"Maybe set charset registry of the 'ascii charset to ROMAN-REGISTRY.
@@ -60,9 +61,3 @@ achieved by using a national variant rom
(error (set-charset-registries 'ascii original-registries)))))))
;;;;
-
-(defvar mule-x-win-initted nil)
-
-(defun init-mule-x-win ()
- "Initialize X Windows for MULE at startup. Don't call this."
- )
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e lisp/startup.el
--- a/lisp/startup.el Sun Jul 06 19:46:19 2008 +0300
+++ b/lisp/startup.el Wed Jul 09 20:46:22 2008 +0200
@@ -726,13 +726,9 @@ If this is nil, no message will be displ
(require 'id-x-toolbar)
(init-toolbar)))
- ;; Run the window system's init function. tty is considered to be
- ;; a type of window system for this purpose. This creates the
- ;; initial (non stdio) device.
- (when (and initial-window-system (not noninteractive))
- (funcall (intern (concat "init-"
- (symbol-name initial-window-system)
- "-win"))))
+ ;; Create the initial device (which may be the already-created stdio
+ ;; device, if we're noninteractive).
+ (make-device initial-device-type nil nil)
;; When not in batch mode, this creates the first visible frame,
;; and deletes the stdio device.
@@ -1457,7 +1453,7 @@ returned value. It can be `t' (omit all
If SET-GLOBAL-PACKAGE-PATHS is non-nil, initialize the global package path
variables referring to the particular types of packages
-(`early-package-hierarchies', `early-package-load-path',
+\(`early-package-hierarchies', `early-package-load-path',
`late-package-hierarchies', `late-package-load-path',
`last-package-hierarchies', `last-package-load-path')."
(let (earlyp latep lastp earlyp-lp latep-lp lastp-lp)
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e lisp/tty-init.el
--- a/lisp/tty-init.el Sun Jul 06 19:46:19 2008 +0300
+++ b/lisp/tty-init.el Wed Jul 09 20:46:22 2008 +0200
@@ -31,13 +31,13 @@
;;; Code:
-(defvar pre-tty-win-initted nil)
+(defvar make-device-early-tty-entry-point-called-p nil
+ "Whether `make-device-early-tty-entry-point' has been called, at least once.")
-;; called both from init-tty-win and from the C code.
-(defun init-pre-tty-win ()
- "Initialize TTY at startup (pre). Don't call this."
+(defun make-device-early-tty-entry-point ()
+ "Entry point to set up the Lisp environment for TTY device creation."
(with-fboundp 'register-tty-color
- (unless pre-tty-win-initted
+ (unless make-device-early-tty-entry-point-called-p
(register-tty-color "black" "\e[30m" "\e[40m")
(register-tty-color "red" "\e[31m" "\e[41m")
(register-tty-color "green" "\e[32m" "\e[42m")
@@ -59,16 +59,17 @@
(setq pre-tty-win-initted t))))
-;; called both from init-tty-win and from the C code.
-;; we have to do this for every created TTY console.
-(defun init-post-tty-win (console)
- "Initialize TTY at console creation time (post). Don't call this."
+;; We have to do this for every created TTY console, after the first frame
+;; has been created.
+(defun make-frame-after-init-entry-point (console)
+ "Entry point for Lisp called after first frame creation on a TTY device."
;; load the appropriate term-type-specific Lisp file.
;; we don't do this at startup here so that the user can
;; override term-file-prefix. (startup.el does it after
;; loading the init file.)
- (if (featurep 'mule)
- (declare-fboundp (init-mule-tty-win)))
+ (when (and (find-coding-system 'euc-jp)
+ (string-match "^kterm" (getenv "TERM")))
+ (set-console-tty-coding-system console 'euc-jp))
(when init-file-loaded
;; temporarily select the console so that the changes
;; to function-key-map are made for the right console.
@@ -78,16 +79,6 @@
(select-console console)
(load-terminal-library))
(select-console foobar)))))
-
-(defvar tty-win-initted nil)
-
-(defun init-tty-win ()
- "Initialize TTY at startup. Don't call this."
- (unless tty-win-initted
- (init-pre-tty-win)
- (make-tty-device nil nil)
- (init-post-tty-win (selected-console))
- (setq tty-win-initted t)))
(defun make-frame-on-tty (tty &optional props)
"Create a frame on the TTY connection named TTY.
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e lisp/x-compose.el
--- a/lisp/x-compose.el Sun Jul 06 19:46:19 2008 +0300
+++ b/lisp/x-compose.el Wed Jul 09 20:46:22 2008 +0200
@@ -102,7 +102,8 @@
;; Giacomo Boffi's problem of
;; 20050324103919.8D22E4901(a)boffi95.stru.polimi.it is caused by Xlib doing
-;; the compose processing. To turn that off, I'm not certain what's
+;; the compose processing. To turn that off, I'm not certain what's
+;; possible, beyond making C the current locale.
;;; Code:
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e lisp/x-init.el
--- a/lisp/x-init.el Sun Jul 06 19:46:19 2008 +0300
+++ b/lisp/x-init.el Wed Jul 09 20:46:22 2008 +0200
@@ -37,7 +37,7 @@
x-server-vendor x-init-specifier-from-resources init-mule-x-win))
(globally-declare-boundp
- '(x-initial-argv-list))
+ '(x-initial-argv-list x-app-defaults-directory))
;; If you want to change this variable, this is the place you must do it.
;; Do not set it to a string containing periods. X doesn't like that.
@@ -86,12 +86,12 @@
;; Sun have done to the default keymap for the Sun keyboards.
(eval-when-compile
- (defmacro x-define-dead-key (key map)
- `(when (x-keysym-on-keyboard-p ',key)
+ (defmacro x-define-dead-key (key map device)
+ `(when (x-keysym-on-keyboard-p ',key device)
(define-key function-key-map [,key] ',map))))
-(defun x-initialize-compose ()
- "Enable compose key and dead key processing."
+(defun x-initialize-compose (device)
+ "Enable compose key and dead key processing on DEVICE."
(autoload 'compose-map "x-compose" nil t 'keymap)
(autoload 'compose-acute-map "x-compose" nil t 'keymap)
(autoload 'compose-grave-map "x-compose" nil t 'keymap)
@@ -100,7 +100,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 device)
(define-key function-key-map [multi-key] 'compose-map))
;; The dead keys might really be called just about anything, depending
@@ -119,98 +119,98 @@
;; mixed up view of what these keys should be called.
;; Canonical names:
- (x-define-dead-key acute compose-acute-map)
- (x-define-dead-key grave compose-grave-map)
- (x-define-dead-key cedilla compose-cedilla-map)
- (x-define-dead-key diaeresis compose-diaeresis-map)
- (x-define-dead-key circumflex compose-circumflex-map)
- (x-define-dead-key tilde compose-tilde-map)
- (x-define-dead-key degree compose-ring-map)
+ (x-define-dead-key acute compose-acute-map device)
+ (x-define-dead-key grave compose-grave-map device)
+ (x-define-dead-key cedilla compose-cedilla-map device)
+ (x-define-dead-key diaeresis compose-diaeresis-map device)
+ (x-define-dead-key circumflex compose-circumflex-map device)
+ (x-define-dead-key tilde compose-tilde-map device)
+ (x-define-dead-key degree compose-ring-map device)
;; Sun according to MIT:
- (x-define-dead-key SunFA_Acute compose-acute-map)
- (x-define-dead-key SunFA_Grave compose-grave-map)
- (x-define-dead-key SunFA_Cedilla compose-cedilla-map)
- (x-define-dead-key SunFA_Diaeresis compose-diaeresis-map)
- (x-define-dead-key SunFA_Circum compose-circumflex-map)
- (x-define-dead-key SunFA_Tilde compose-tilde-map)
+ (x-define-dead-key SunFA_Acute compose-acute-map device)
+ (x-define-dead-key SunFA_Grave compose-grave-map device)
+ (x-define-dead-key SunFA_Cedilla compose-cedilla-map device)
+ (x-define-dead-key SunFA_Diaeresis compose-diaeresis-map device)
+ (x-define-dead-key SunFA_Circum compose-circumflex-map device)
+ (x-define-dead-key SunFA_Tilde compose-tilde-map device)
;; Sun according to OpenWindows 2:
- (x-define-dead-key Dead_Grave compose-grave-map)
- (x-define-dead-key Dead_Circum compose-circumflex-map)
- (x-define-dead-key Dead_Tilde compose-tilde-map)
+ (x-define-dead-key Dead_Grave compose-grave-map device)
+ (x-define-dead-key Dead_Circum compose-circumflex-map device)
+ (x-define-dead-key Dead_Tilde compose-tilde-map device)
;; Sun according to OpenWindows 3:
- (x-define-dead-key SunXK_FA_Acute compose-acute-map)
- (x-define-dead-key SunXK_FA_Grave compose-grave-map)
- (x-define-dead-key SunXK_FA_Cedilla compose-cedilla-map)
- (x-define-dead-key SunXK_FA_Diaeresis compose-diaeresis-map)
- (x-define-dead-key SunXK_FA_Circum compose-circumflex-map)
- (x-define-dead-key SunXK_FA_Tilde compose-tilde-map)
+ (x-define-dead-key SunXK_FA_Acute compose-acute-map device)
+ (x-define-dead-key SunXK_FA_Grave compose-grave-map device)
+ (x-define-dead-key SunXK_FA_Cedilla compose-cedilla-map device)
+ (x-define-dead-key SunXK_FA_Diaeresis compose-diaeresis-map device)
+ (x-define-dead-key SunXK_FA_Circum compose-circumflex-map device)
+ (x-define-dead-key SunXK_FA_Tilde compose-tilde-map device)
;; DEC according to MIT:
- (x-define-dead-key Dacute_accent compose-acute-map)
- (x-define-dead-key Dgrave_accent compose-grave-map)
- (x-define-dead-key Dcedilla_accent compose-cedilla-map)
- (x-define-dead-key Dcircumflex_accent compose-circumflex-map)
- (x-define-dead-key Dtilde compose-tilde-map)
- (x-define-dead-key Dring_accent compose-ring-map)
+ (x-define-dead-key Dacute_accent compose-acute-map device)
+ (x-define-dead-key Dgrave_accent compose-grave-map device)
+ (x-define-dead-key Dcedilla_accent compose-cedilla-map device)
+ (x-define-dead-key Dcircumflex_accent compose-circumflex-map device)
+ (x-define-dead-key Dtilde compose-tilde-map device)
+ (x-define-dead-key Dring_accent compose-ring-map device)
;; DEC according to OpenWindows 3:
- (x-define-dead-key DXK_acute_accent compose-acute-map)
- (x-define-dead-key DXK_grave_accent compose-grave-map)
- (x-define-dead-key DXK_cedilla_accent compose-cedilla-map)
- (x-define-dead-key DXK_circumflex_accent compose-circumflex-map)
- (x-define-dead-key DXK_tilde compose-tilde-map)
- (x-define-dead-key DXK_ring_accent compose-ring-map)
+ (x-define-dead-key DXK_acute_accent compose-acute-map device)
+ (x-define-dead-key DXK_grave_accent compose-grave-map device)
+ (x-define-dead-key DXK_cedilla_accent compose-cedilla-map device)
+ (x-define-dead-key DXK_circumflex_accent compose-circumflex-map device)
+ (x-define-dead-key DXK_tilde compose-tilde-map device)
+ (x-define-dead-key DXK_ring_accent compose-ring-map device)
;; HP according to MIT:
- (x-define-dead-key hpmute_acute compose-acute-map)
- (x-define-dead-key hpmute_grave compose-grave-map)
- (x-define-dead-key hpmute_diaeresis compose-diaeresis-map)
- (x-define-dead-key hpmute_asciicircum compose-circumflex-map)
- (x-define-dead-key hpmute_asciitilde compose-tilde-map)
+ (x-define-dead-key hpmute_acute compose-acute-map device)
+ (x-define-dead-key hpmute_grave compose-grave-map device)
+ (x-define-dead-key hpmute_diaeresis compose-diaeresis-map device)
+ (x-define-dead-key hpmute_asciicircum compose-circumflex-map device)
+ (x-define-dead-key hpmute_asciitilde compose-tilde-map device)
;; 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)
+ (x-define-dead-key usldead_acute compose-acute-map device)
+ (x-define-dead-key usldead_grave compose-grave-map device)
+ (x-define-dead-key usldead_diaeresis compose-diaeresis-map device)
+ (x-define-dead-key usldead_asciicircum compose-circumflex-map device)
+ (x-define-dead-key usldead_asciitilde compose-tilde-map device)
;; 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)
- (x-define-dead-key hpXK_mute_diaeresis compose-diaeresis-map)
- (x-define-dead-key hpXK_mute_asciicircum compose-circumflex-map)
- (x-define-dead-key hpXK_mute_asciitilde compose-tilde-map)
+ (x-define-dead-key hpXK_mute_acute compose-acute-map device)
+ (x-define-dead-key hpXK_mute_grave compose-grave-map device)
+ (x-define-dead-key hpXK_mute_diaeresis compose-diaeresis-map device)
+ (x-define-dead-key hpXK_mute_asciicircum compose-circumflex-map device)
+ (x-define-dead-key hpXK_mute_asciitilde compose-tilde-map device)
;; HP according to HP-UX 8.0:
- (x-define-dead-key XK_mute_acute compose-acute-map)
- (x-define-dead-key XK_mute_grave compose-grave-map)
- (x-define-dead-key XK_mute_diaeresis compose-diaeresis-map)
- (x-define-dead-key XK_mute_asciicircum compose-circumflex-map)
- (x-define-dead-key XK_mute_asciitilde compose-tilde-map)
+ (x-define-dead-key XK_mute_acute compose-acute-map device)
+ (x-define-dead-key XK_mute_grave compose-grave-map device)
+ (x-define-dead-key XK_mute_diaeresis compose-diaeresis-map device)
+ (x-define-dead-key XK_mute_asciicircum compose-circumflex-map device)
+ (x-define-dead-key XK_mute_asciitilde compose-tilde-map device)
;; [[ XFree86 seems to use lower case and a hyphen ]] Not true; they use
;; lower case and an underscore. XEmacs converts the underscore to a
;; hyphen in x_keysym_to_emacs_keysym because the keysym is in the
;; "Keyboard" character set, which is just totally fucking random,
;; considering it doesn't happen for any other character sets.
- (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-circumflex compose-circumflex-map)
- (x-define-dead-key dead-tilde compose-tilde-map)
+ (x-define-dead-key dead-acute compose-acute-map device)
+ (x-define-dead-key dead-grave compose-grave-map device)
+ (x-define-dead-key dead-cedilla compose-cedilla-map device)
+ (x-define-dead-key dead-diaeresis compose-diaeresis-map device)
+ (x-define-dead-key dead-circum compose-circumflex-map device)
+ (x-define-dead-key dead-circumflex compose-circumflex-map device)
+ (x-define-dead-key dead-tilde compose-tilde-map device)
)
(eval-when-compile
(load "x-win-sun" nil t)
(load "x-win-xfree86" nil t))
-(defun x-initialize-keyboard ()
+(defun x-initialize-keyboard (device)
"Perform X-Server-specific initializations. Don't call this."
;; This is some heuristic junk that tries to guess whether this is
;; a Sun keyboard.
@@ -224,17 +224,17 @@
;; Note that we cannot use most vendor-provided proprietary keyboard
;; APIs to identify the keyboard - those only work on the console.
;; xkeycaps has the same problem when running `remotely'.
- (let ((vendor (x-server-vendor)))
+ (let ((vendor (x-server-vendor device)))
(cond ((or (string-match "Sun Microsystems" vendor)
;; MIT losingly fails to tell us what hardware the X server
;; is managing, so assume all MIT displays are Suns... HA HA!
(string-equal "MIT X Consortium" vendor)
(string-equal "X Consortium" vendor))
;; Ok, we think this could be a Sun keyboard. Run the Sun code.
- (x-win-init-sun))
+ (x-win-init-sun device))
((string-match #r"XFree86\|Cygwin/X\|The X\.Org Foundation" vendor)
;; Those XFree86 people do some weird keysym stuff, too.
- (x-win-init-xfree86)))))
+ (x-win-init-xfree86 device)))))
;; Moved from x-toolbar.el, since InfoDock doesn't dump x-toolbar.el.
(defun x-init-toolbar-from-resources (locale)
@@ -252,69 +252,48 @@
(x-init-specifier-from-resources
specifier 'natnum locale (cons resname (upcase-initials resname)))))
-(defvar pre-x-win-initted nil)
-
-(defun init-pre-x-win ()
- "Initialize X Windows at startup (pre). Don't call this."
- (when (not pre-x-win-initted)
- (setq initial-frame-plist (if initial-frame-unmapped-p
- '(initially-unmapped t)
- nil))
- (setq pre-x-win-initted t)))
-
-(defvar x-win-initted nil)
-
-(defun init-x-win ()
- "Initialize X Windows at startup. Don't call this."
- (when (not x-win-initted)
- (defvar x-app-defaults-directory)
- (init-pre-x-win)
- (if (featurep 'mule) (init-mule-x-win))
-
- ;; Open the X display when this file is loaded
- ;; (Note that the first frame is created later.)
- (setq x-initial-argv-list (cons (car command-line-args)
- command-line-args-left))
- ;; Locate the app-defaults directory
- (when (and (boundp 'x-app-defaults-directory)
- (null x-app-defaults-directory))
- (setq x-app-defaults-directory
- (locate-data-directory "app-defaults")))
- (make-x-device nil)
+(defvar make-device-early-x-entry-point-called-p nil
+ "Whether `make-device-early-x-entry-point' has been called, at least once.
+
+Much of the X11-specific Lisp init code should only be called the first time
+an X11 device is created; this variable allows for that.")
+
+(defvar make-device-late-x-entry-point-called-p nil
+ "Whether `make-device-late-x-entry-point' has been called, at least once.
+
+Much of the X11-specific Lisp init code should only be called the first time
+an X11 device is created; this variable allows for that.")
+
+(defun make-device-early-x-entry-point ()
+ "Entry point to set up the Lisp environment for X device creation."
+ (unless make-device-early-x-entry-point-called-p
+ (setq initial-frame-plist
+ (and initial-frame-unmapped-p '(initially-unmapped t))
+ ;; Save the argv value.
+ x-initial-argv-list
+ (cons (car command-line-args) command-line-args-left)
+ ;; Locate the app-defaults directory
+ x-app-defaults-directory
+ (or x-app-defaults-directory (locate-data-directory "app-defaults"))
+ make-device-early-x-entry-point-called-p t)))
+
+(defun make-device-late-x-entry-point (device)
+ "Entry point to do any Lisp-level X device-specific initialization."
+ ;; General code, called on every X device created:
+ (x-initialize-keyboard device)
+ (x-initialize-compose device)
+ ;; And the following code is to be called once, the first time an X11
+ ;; device is created:
+ (unless make-device-late-x-entry-point-called-p
(setq command-line-args-left (cdr x-initial-argv-list))
- (setq x-win-initted t)))
-
-(defvar post-x-win-initted nil)
-
-(defun init-post-x-win ()
- "Initialize X Windows at startup (post). Don't call this."
- (when (not post-x-win-initted)
- ;(if (featurep 'mule) (init-mule-x-win))
;; Motif-ish bindings
- ;; The following two were generally unliked.
- ;;(define-key global-map '(shift delete) 'kill-primary-selection)
- ;;(define-key global-map '(control delete) 'delete-primary-selection)
(define-key global-map '(shift insert) 'yank-clipboard-selection)
(define-key global-map '(control insert) 'copy-primary-selection)
;; These are Sun-isms.
(define-key global-map 'copy 'copy-primary-selection)
(define-key global-map 'paste 'yank-clipboard-selection)
(define-key global-map 'cut 'kill-primary-selection)
-
- ;;(define-key global-map '(shift menu) 'x-goto-menubar) ;NYI
-
- (setq post-x-win-initted t)))
-
-;;; Keyboard initialization needs to be done differently for each X
-;;; console, so use create-console-hook.
-(when (featurep 'x)
- (add-hook
- 'create-console-hook
- (lambda (console)
- (letf (((selected-console) console))
- (when (eq 'x (console-type console))
- (x-initialize-keyboard)
- (x-initialize-compose))))))
+ (setq make-device-late-x-entry-point-called-p t)))
(defun make-frame-on-display (display &optional props)
"Create a frame on the X display named DISPLAY.
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e lisp/x-win-sun.el
--- a/lisp/x-win-sun.el Sun Jul 06 19:46:19 2008 +0300
+++ b/lisp/x-win-sun.el Wed Jul 09 20:46:22 2008 +0200
@@ -68,7 +68,7 @@
'(x-keysym-on-keyboard-sans-modifiers-p))
;;;###autoload
-(defun x-win-init-sun ()
+(defun x-win-init-sun (device)
;; help is ok
;; num_lock is ok
@@ -112,51 +112,51 @@
;; Map f33 and r13 to end or kp-end
,@(cond
- ((not (x-keysym-on-keyboard-sans-modifiers-p 'end))
+ ((not (x-keysym-on-keyboard-sans-modifiers-p 'end device))
'((f33 end)
(r13 end)))
- ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-end))
+ ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-end device))
'((f33 kp-end)
(r13 kp-end))))
- ,@(when (x-keysym-on-keyboard-sans-modifiers-p 'f36)
+ ,@(when (x-keysym-on-keyboard-sans-modifiers-p 'f36 device)
'((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 ,(if (x-keysym-on-keyboard-sans-modifiers-p 'kp-subtract)
+ ,@(when (x-keysym-on-keyboard-sans-modifiers-p 'f24 device)
+ `((f24 ,(if (x-keysym-on-keyboard-sans-modifiers-p 'kp-subtract device)
'kp-equal
'kp-subtract))))
;; Map f27 to home or kp-home, as appropriate
- ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'home))
+ ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'home device))
'((f27 home)))
- ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-home))
+ ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-home device))
'((f27 kp-home))))
;; Map f29 to prior or kp-prior, as appropriate
- ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'prior))
+ ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'prior device))
'((f29 prior)))
- ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-prior))
+ ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-prior device))
'((f29 kp-prior))))
;; Map f35 to next or kp-next, as appropriate
- ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'next))
+ ,@(cond ((not (x-keysym-on-keyboard-sans-modifiers-p 'next device))
'((f35 next)))
- ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-next))
+ ((not (x-keysym-on-keyboard-sans-modifiers-p 'kp-next device))
'((f35 kp-next))))
- ,@(cond ((x-keysym-on-keyboard-sans-modifiers-p 'apRead) ; SunOS 4.1.1
+ ,@(cond ((x-keysym-on-keyboard-sans-modifiers-p 'apRead device) ; SunOS 4.1.1
'((apRead f11) (apEdit f12)))
- ((x-keysym-on-keyboard-sans-modifiers-p 'SunF36) ; SunOS 5
+ ((x-keysym-on-keyboard-sans-modifiers-p 'SunF36 device) ; SunOS 5
'((SunF36 f11)
(SunF37 f12)
(f11 stop)
(f12 again))))
)
- do (when (x-keysym-on-keyboard-sans-modifiers-p from-key)
+ do (when (x-keysym-on-keyboard-sans-modifiers-p from-key device)
(dolist (prefix '(() (shift) (control) (meta) (alt)
(shift control) (shift alt) (shift meta)
(control alt) (control meta) (alt meta)
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e lisp/x-win-xfree86.el
--- a/lisp/x-win-xfree86.el Sun Jul 06 19:46:19 2008 +0300
+++ b/lisp/x-win-xfree86.el Wed Jul 09 20:46:22 2008 +0200
@@ -45,7 +45,7 @@
'(x-keysym-on-keyboard-p x-keysym-on-keyboard-sans-modifiers-p))
;;;###autoload
-(defun x-win-init-xfree86 ()
+(defun x-win-init-xfree86 (device)
;; We know this keyboard is an XFree86 keyboard. As such, we can predict
;; what key scan codes will correspond to the keys on US keyboard layout,
@@ -91,8 +91,8 @@
(f23 f11)
(f24 f12))
do
- (when (and (x-keysym-on-keyboard-p key)
- (not (x-keysym-on-keyboard-sans-modifiers-p key)))
+ (when (and (x-keysym-on-keyboard-p key device)
+ (not (x-keysym-on-keyboard-sans-modifiers-p key device)))
;; 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)])
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e src/ChangeLog
--- a/src/ChangeLog Sun Jul 06 19:46:19 2008 +0300
+++ b/src/ChangeLog Wed Jul 09 20:46:22 2008 +0200
@@ -1,3 +1,56 @@ 2008-05-27 Aidan Kehoe <kehoea@parhasa
+2008-07-07 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ Patch to make it up to the device-specific code whether
+ various Lisp functions should be called during device creation,
+ not relying on the startup code to decide this. Also, rename
+ initial-window-system to initial-device-type (which makes more
+ sense in this scheme), always set it.
+
+ * redisplay.c (Vinitial_device_type): New.
+ (Vinitial_window_system): Removed.
+ Rename initial-window-system to initial-device type, making it
+ a stream if we're noninteractive. Update its docstring.
+
+ * device-x.c (Qmake_device_early_x_entry_point,
+ Qmake_device_late_x_entry_point): New.
+ Rename Qinit_pre_x_win, Qinit_post_x_win.
+ (x_init_device): Call #'make-device-early-x-entry-point earlier,
+ now we rely on it to find the application class and the
+ app-defaults directory.
+ (x_finish_init_device): Call #'make-device-late-x-entry-point with
+ the created device.
+ (Vx_app_defaults_directory): Always make this available, to
+ simplify code in x-init.el.
+
+ * device-tty.c (Qmake_device_early_tty_entry_point): New.
+ Rename Qinit_pre_tty_win, rename Qinit_post_tty_win and move to
+ frame-tty.c as Qmake_frame_after_init_entry_point.
+ (tty_init_device): Call #'make-device-early-tty-entry-point before
+ doing anything.
+ * frame-tty.c (Qmake_frame_after_init_entry_point): New.
+ * frame-tty.c (tty_after_init_frame): Have it call the
+ better-named #'make-frame-after-init-entry-point function
+ instead of #'init-post-tty-win (since it's called after frame, not
+ device, creation).
+
+ * device-msw.c (Qmake_device_early_mswindows_entry_point,
+ Qmake_device_late_mswindows_entry_point): New.
+ Rename Qinit_pre_mswindows_win, Qinit_post_mswindows_win.
+ (mswindows_init_device): Call
+ #'make-device-early-mswindows-entry-point here, instead of having
+ its predecessor call us.
+ (mswindows_finish_init_device): Call
+ #'make-device-early-mswindows-entry-point, for symmetry with the
+ other device types (though it's an empty function).
+
+ * device-gtk.c (Qmake_device_early_gtk_entry_point,
+ Qmake_device_late_gtk_entry_point): New.
+ Rename Qinit_pre_gtk_win, Qinit_post_gtk_win.
+ (gtk_init_device): Call #'make-device-early-gtk-entry-point; don't
+ load ~/.xemacs/gtk-options.el ourselves, leave that to lisp.
+ (gtk_finish_init_device): Call #'make-device-late-gtk-entry-point
+ with the created device as an argument.
+
2008-05-27 Aidan Kehoe <kehoea(a)parhasard.net>
* editfns.c (Ftranslate_region):
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e src/device-gtk.c
--- a/src/device-gtk.c Sun Jul 06 19:46:19 2008 +0300
+++ b/src/device-gtk.c Wed Jul 09 20:46:22 2008 +0200
@@ -56,8 +56,8 @@ Boston, MA 02111-1307, USA. */
#include <bonobo.h>
#endif
-/* Qdisplay in general.c */
-Lisp_Object Qinit_pre_gtk_win, Qinit_post_gtk_win;
+Lisp_Object Qmake_device_early_gtk_entry_point,
+ Qmake_device_late_gtk_entry_point;
/* The application class of Emacs. */
Lisp_Object Vgtk_emacs_application_class;
@@ -220,6 +220,9 @@ gtk_init_device (struct device *d, Lisp_
GdkVisual *visual = NULL;
GdkColormap *cmap = NULL;
+ /* Run the early elisp side of the GTK device initialization. */
+ call0 (Qmake_device_early_gtk_entry_point);
+
/* gtk_init() and even gtk_check_init() are so brain dead that
getting an empty argv array causes them to abort. */
if (NILP (Vgtk_initial_argv_list))
@@ -266,13 +269,6 @@ gtk_init_device (struct device *d, Lisp_
#ifdef __FreeBSD__
gdk_set_use_xshm (FALSE);
#endif
-
- /* We attempt to load this file so that the user can set
- ** gtk-initial-geometry and not need GNOME & session management to
- ** set their default frame size. It also avoids the flicker
- ** associated with setting the frame size in your .emacs file.
- */
- call4 (Qload, build_string ("~/.xemacs/gtk-options.el"), Qt, Qt, Qt);
#ifdef HAVE_GDK_IMLIB_INIT
/* Some themes in Gtk are so lame (most notably the Pixmap theme)
@@ -336,15 +332,12 @@ gtk_init_device (struct device *d, Lisp_
DEVICE_GTK_GRAY_PIXMAP (d) = NULL;
gtk_init_device_class (d);
-
- /* Run the elisp side of the X device initialization. */
- call0 (Qinit_pre_gtk_win);
-}
-
-static void
-gtk_finish_init_device (struct device *UNUSED (d), Lisp_Object UNUSED (props))
-{
- call0 (Qinit_post_gtk_win);
+}
+
+static void
+gtk_finish_init_device (struct device *d, Lisp_Object UNUSED (props))
+{
+ call1 (Qmake_device_late_gtk_entry_point, wrap_device(d));
}
static void
@@ -709,8 +702,8 @@ syms_of_device_gtk (void)
DEFSUBR (Fgtk_ungrab_keyboard);
DEFSUBR (Fgtk_init);
- DEFSYMBOL (Qinit_pre_gtk_win);
- DEFSYMBOL (Qinit_post_gtk_win);
+ DEFSYMBOL (Qmake_device_early_gtk_entry_point);
+ DEFSYMBOL (Qmake_device_late_gtk_entry_point);
}
void
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e src/device-msw.c
--- a/src/device-msw.c Sun Jul 06 19:46:19 2008 +0300
+++ b/src/device-msw.c Wed Jul 09 20:46:22 2008 +0200
@@ -60,7 +60,8 @@ HSZ mswindows_dde_item_open;
HSZ mswindows_dde_item_open;
#endif
-Lisp_Object Qinit_pre_mswindows_win, Qinit_post_mswindows_win;
+Lisp_Object Qmake_device_early_mswindows_entry_point,
+ Qmake_device_late_mswindows_entry_point;
Lisp_Object Qdevmodep;
static Lisp_Object Q_allow_selection;
@@ -156,6 +157,8 @@ mswindows_init_device (struct device *d,
{
HDC hdc;
WNDCLASSEXW wc;
+
+ call0 (Qmake_device_early_mswindows_entry_point);
DEVICE_CLASS (d) = Qcolor;
DEVICE_INFD (d) = DEVICE_OUTFD (d) = -1;
@@ -273,13 +276,14 @@ init_mswindows_dde_very_early (void)
}
static void
-mswindows_finish_init_device (struct device *UNUSED (d),
+mswindows_finish_init_device (struct device *d,
Lisp_Object UNUSED (props))
{
#ifdef HAVE_DRAGNDROP
/* Tell pending clients we are ready. */
mswindows_dde_enable = 1;
#endif
+ call1 (Qmake_device_late_mswindows_entry_point, wrap_device(d));
}
static void
@@ -1393,8 +1397,8 @@ syms_of_device_mswindows (void)
DEFKEYWORD (Q_selected_page_button);
DEFSYMBOL (Qselected_page_button);
- DEFSYMBOL (Qinit_pre_mswindows_win);
- DEFSYMBOL (Qinit_post_mswindows_win);
+ DEFSYMBOL (Qmake_device_early_mswindows_entry_point);
+ DEFSYMBOL ( Qmake_device_late_mswindows_entry_point);
}
void
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e src/device-tty.c
--- a/src/device-tty.c Sun Jul 06 19:46:19 2008 +0300
+++ b/src/device-tty.c Wed Jul 09 20:46:22 2008 +0200
@@ -41,7 +41,7 @@ Boston, MA 02111-1307, USA. */
#include "sysfile.h"
#include "syssignal.h" /* for SIGWINCH */
-Lisp_Object Qinit_pre_tty_win, Qinit_post_tty_win;
+Lisp_Object Qmake_device_early_tty_entry_point;
#ifdef NEW_GC
@@ -72,6 +72,10 @@ tty_init_device (struct device *d, Lisp_
struct console *con = XCONSOLE (DEVICE_CONSOLE (d));
Lisp_Object terminal_type = CONSOLE_TTY_DATA (con)->terminal_type;
+ /* Run part of the elisp side of the TTY device initialization.
+ The post-init is run in the tty_finish_init_device() method. */
+ call0 (Qmake_device_early_tty_entry_point);
+
DEVICE_INFD (d) = CONSOLE_TTY_DATA (con)->infd;
DEVICE_OUTFD (d) = CONSOLE_TTY_DATA (con)->outfd;
@@ -107,10 +111,6 @@ tty_init_device (struct device *d, Lisp_
}
init_one_device (d);
-
- /* Run part of the elisp side of the TTY device initialization.
- The post-init is run in the tty_after_init_frame() method. */
- call0 (Qinit_pre_tty_win);
}
#ifndef NEW_GC
@@ -211,8 +211,7 @@ syms_of_device_tty (void)
INIT_LRECORD_IMPLEMENTATION (tty_device);
#endif /* NEW_GC */
- DEFSYMBOL (Qinit_pre_tty_win);
- DEFSYMBOL (Qinit_post_tty_win);
+ DEFSYMBOL (Qmake_device_early_tty_entry_point);
}
void
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e src/device-x.c
--- a/src/device-x.c Sun Jul 06 19:46:19 2008 +0300
+++ b/src/device-x.c Wed Jul 09 20:46:22 2008 +0200
@@ -65,14 +65,14 @@ Boston, MA 02111-1307, USA. */
#include "offix.h"
#endif
+Lisp_Object Vx_app_defaults_directory;
#ifdef MULE
-Lisp_Object Vx_app_defaults_directory;
Lisp_Object Qget_coding_system_from_locale;
#endif
/* Qdisplay in general.c */
Lisp_Object Qx_error;
-Lisp_Object Qinit_pre_x_win, Qinit_post_x_win;
+Lisp_Object Qmake_device_early_x_entry_point, Qmake_device_late_x_entry_point;
/* The application class of Emacs. */
Lisp_Object Vx_emacs_application_class;
@@ -541,6 +541,10 @@ x_init_device (struct device *d, Lisp_Ob
int screen;
/* */
int best_visual_found = 0;
+
+ /* Run the elisp side of the X device initialization, allowing it to set
+ x-emacs-application-class and x-app-defaults-directory. */
+ call0 (Qmake_device_early_x_entry_point);
#if defined(HAVE_SHLIB) && defined(LWLIB_USES_ATHENA) && !defined(HAVE_ATHENA_3D)
/*
@@ -921,15 +925,12 @@ x_init_device (struct device *d, Lisp_Ob
Xatoms_of_select_x (d);
Xatoms_of_objects_x (d);
x_init_device_class (d);
-
- /* Run the elisp side of the X device initialization. */
- call0 (Qinit_pre_x_win);
}
static void
-x_finish_init_device (struct device *UNUSED (d), Lisp_Object UNUSED (props))
-{
- call0 (Qinit_post_x_win);
+x_finish_init_device (struct device *d, Lisp_Object UNUSED (props))
+{
+ call1 (Qmake_device_late_x_entry_point, wrap_device (d));
}
static void
@@ -2133,8 +2134,8 @@ syms_of_device_x (void)
DEFSUBR (Fx_set_font_path);
DEFSYMBOL (Qx_error);
- DEFSYMBOL (Qinit_pre_x_win);
- DEFSYMBOL (Qinit_post_x_win);
+ DEFSYMBOL (Qmake_device_early_x_entry_point);
+ DEFSYMBOL (Qmake_device_late_x_entry_point);
#ifdef MULE
DEFSYMBOL (Qget_coding_system_from_locale);
@@ -2207,13 +2208,11 @@ just reside in C.
*/ );
Vx_initial_argv_list = Qnil;
-#ifdef MULE
DEFVAR_LISP ("x-app-defaults-directory", &Vx_app_defaults_directory /*
Used by the Lisp code to communicate to the low level X initialization
where the localized init files are.
*/ );
Vx_app_defaults_directory = Qnil;
-#endif
Fprovide (Qx);
}
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e src/emacs.c
--- a/src/emacs.c Sun Jul 06 19:46:19 2008 +0300
+++ b/src/emacs.c Wed Jul 09 20:46:22 2008 +0200
@@ -3008,13 +3008,14 @@ Do not call this. It will reinitialize
Do not call this. It will reinitialize your XEmacs. You'll be sorry.
*/
/* If this function is called from startup.el, it will be possible to run
- temacs as an editor using `temacs -batch -l loadup.el run-temacs', instead
- of having to dump an emacs and then run that (when debugging emacs itself,
- this can be much faster)). [Actually, the speed difference isn't that
- much as long as your filesystem is local, and you don't end up with
- a dumped version in case you want to rerun it. This function is most
- useful when used as part of the `make all-elc' command. --ben]
- This will "restart" emacs with the specified command-line arguments.
+ temacs as an editor using `temacs -batch -l ../lisp/loadup.el
+ run-temacs', instead of having to dump an emacs and then run that (when
+ debugging emacs itself, this can be much faster)). [Actually, the speed
+ difference isn't that much as long as your filesystem is local, and you
+ don't end up with a dumped version in case you want to rerun it. This
+ function is most useful when used as part of the `make all-elc'
+ command. --ben] This will "restart" emacs with the specified command-line
+ arguments.
Martin thinks this function is most useful when using debugging
tools like Purify or tcov that get confused by XEmacs' dumping. */
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e src/frame-tty.c
--- a/src/frame-tty.c Sun Jul 06 19:46:19 2008 +0300
+++ b/src/frame-tty.c Wed Jul 09 20:46:22 2008 +0200
@@ -37,7 +37,7 @@ Boston, MA 02111-1307, USA. */
/* Default properties to use when creating frames. */
Lisp_Object Vdefault_tty_frame_plist;
-Lisp_Object Qframe_number;
+Lisp_Object Qframe_number, Qmake_frame_after_init_entry_point;
static void tty_raise_frame (struct frame *);
@@ -83,7 +83,7 @@ tty_after_init_frame (struct frame *f, i
int first_on_console)
{
if (first_on_console)
- call1 (Qinit_post_tty_win, FRAME_CONSOLE (f));
+ call1 (Qmake_frame_after_init_entry_point, FRAME_CONSOLE (f));
}
/* Change from withdrawn state to mapped state. */
@@ -235,6 +235,7 @@ syms_of_frame_tty (void)
syms_of_frame_tty (void)
{
DEFSYMBOL (Qframe_number);
+ DEFSYMBOL (Qmake_frame_after_init_entry_point);
}
void
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r e34711681f304b66702247a4537da0537ab14e3e src/redisplay.c
--- a/src/redisplay.c Sun Jul 06 19:46:19 2008 +0300
+++ b/src/redisplay.c Wed Jul 09 20:46:22 2008 +0200
@@ -476,7 +476,7 @@ Lisp_Object Vwindow_system; /* #### this
(`x', `gtk', `mswindows', and `tty' are
supported -- yes, TTYs are window systems
for this purpose. */
-Lisp_Object Vinitial_window_system;
+Lisp_Object Vinitial_device_type;
Lisp_Object Vglobal_mode_string;
@@ -9748,9 +9748,15 @@ init_redisplay (void)
internal_cache = Dynarr_new (line_start_cache);
}
- /* window system is nil when in -batch mode */
- if (!initialized || noninteractive)
+ if (!initialized)
return;
+
+ if (noninteractive)
+ {
+ Vwindow_system = Qstream;
+ Vinitial_device_type = Qstream;
+ return;
+ }
/* If the user wants to use a window system, we shouldn't bother
initializing the terminal. This is especially important when the
@@ -9765,7 +9771,7 @@ init_redisplay (void)
{
/* Some stuff checks this way early. */
Vwindow_system = Qx;
- Vinitial_window_system = Qx;
+ Vinitial_device_type = Qx;
return;
}
#endif /* HAVE_X_WINDOWS */
@@ -9774,7 +9780,7 @@ init_redisplay (void)
if (!strcmp (display_use, "gtk"))
{
Vwindow_system = Qgtk;
- Vinitial_window_system = Qgtk;
+ Vinitial_device_type = Qgtk;
return;
}
#endif
@@ -9784,7 +9790,7 @@ init_redisplay (void)
{
/* Some stuff checks this way early. */
Vwindow_system = Qmswindows;
- Vinitial_window_system = Qmswindows;
+ Vinitial_device_type = Qmswindows;
return;
}
#endif /* HAVE_MS_WINDOWS */
@@ -9804,7 +9810,7 @@ init_redisplay (void)
exit (1);
}
- Vinitial_window_system = Qtty;
+ Vinitial_device_type = Qtty;
return;
#else /* not HAVE_TTY */
/* No DISPLAY specified, and no TTY support. */
@@ -9948,11 +9954,13 @@ instead.
*/ );
Vwindow_system = Qnil;
- /* #### Temporary shit until window-system is eliminated. */
- DEFVAR_CONST_LISP ("initial-window-system", &Vinitial_window_system /*
-DON'T TOUCH
+ DEFVAR_CONST_LISP ("initial-device-type", &Vinitial_device_type /*
+The type of the first XEmacs device to be created.
+
+This is constant; it's used by the command line handling code to communicate
+to Lisp what type the initial device to be created should be.
*/ );
- Vinitial_window_system = Qnil;
+ Vinitial_device_type = Qnil;
DEFVAR_BOOL ("cursor-in-echo-area", &cursor_in_echo_area /*
Non-nil means put cursor in minibuffer, at end of any message there.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Don't try to get text width for the null font instance, mswindows
16 years, 5 months
Aidan Kehoe
changeset: 4506:dbf79a1732bafb35ad5b7e86e8e535e95ec074ca
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Thu Jul 10 17:05:59 2008 +0200
files: src/ChangeLog src/redisplay-msw.c
description:
Don't try to get text width for the null font instance, mswindows
2008-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
* redisplay-msw.c (mswindows_text_width_single_run):
Explicitly check for the null font instance, and return zero if
so. Avoids the crash documented in
http://mid.gmane.org/18473.32468.712317.149457@parhasard.net .
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r dbf79a1732bafb35ad5b7e86e8e535e95ec074ca src/ChangeLog
--- a/src/ChangeLog Sun Jul 06 19:46:19 2008 +0300
+++ b/src/ChangeLog Thu Jul 10 17:05:59 2008 +0200
@@ -1,3 +1,10 @@ 2008-05-27 Aidan Kehoe <kehoea@parhasa
+2008-07-10 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * redisplay-msw.c (mswindows_text_width_single_run):
+ Explicitly check for the null font instance, and return zero if
+ so. Avoids the crash documented in
+ http://mid.gmane.org/18473.32468.712317.149457@parhasard.net .
+
2008-05-27 Aidan Kehoe <kehoea(a)parhasard.net>
* editfns.c (Ftranslate_region):
diff -r 86283c809984f21bfb6f3fd971d2774b61e03f0a -r dbf79a1732bafb35ad5b7e86e8e535e95ec074ca src/redisplay-msw.c
--- a/src/redisplay-msw.c Sun Jul 06 19:46:19 2008 +0300
+++ b/src/redisplay-msw.c Thu Jul 10 17:05:59 2008 +0200
@@ -147,6 +147,15 @@ mswindows_text_width_single_run (HDC hdc
{
Lisp_Object font_inst = FACE_CACHEL_FONT (cachel, run->charset);
SIZE size;
+
+ /* The X11 code doesn't have to do this explicitly, because there we trust
+ the font instance to know whether it's actually proportional or not,
+ and we use the zero width that is stored in the monospace null font
+ instance. */
+ if (EQ (Vthe_null_font_instance, font_inst))
+ {
+ return 0;
+ }
#if 0 /* #### not the way of ikeyama's ws */
if (!fi->proportional_p || !hdc)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: autoconf 2.62 compatibility, #370
16 years, 5 months
Aidan Kehoe
changeset: 4505:86283c809984f21bfb6f3fd971d2774b61e03f0a
user: "Ville SkyttÀ <scop(a)xemacs.org>"
date: Sun Jul 06 19:46:19 2008 +0300
files: ChangeLog configure.ac
description:
autoconf 2.62 compatibility, #370
diff -r 78738a40e31e5bb7d8ee5a1d0f8e27d025bcebb9 -r 86283c809984f21bfb6f3fd971d2774b61e03f0a ChangeLog
--- a/ChangeLog Sun Jun 29 11:06:16 2008 +0200
+++ b/ChangeLog Sun Jul 06 19:46:19 2008 +0300
@@ -1,3 +1,9 @@ 2008-05-12 Michael Sperber <mike@xemac
+2008-07-06 Ville Skyttä <scop(a)xemacs.org>
+
+ * configure.ac (xe_fst):
+ New, to replace m4_fst which disappeared in autoconf 2.62 (#370).
+ (XE_EXPAND_COMPLEX_OPTIONS): Use xe_fst.
+
2008-05-12 Michael Sperber <mike(a)xemacs.org>
* configure.ac:
diff -r 78738a40e31e5bb7d8ee5a1d0f8e27d025bcebb9 -r 86283c809984f21bfb6f3fd971d2774b61e03f0a configure.ac
--- a/configure.ac Sun Jun 29 11:06:16 2008 +0200
+++ b/configure.ac Sun Jul 06 19:46:19 2008 +0300
@@ -387,9 +387,11 @@ dnl
dnl
dnl Internal macro to recursively expand all the options in the option list.
dnl
+dnl m4_fst disappeared without a trace in autoconf 2.62
+m4_define([xe_fst], [$1])dnl
define([XE_EXPAND_COMPLEX_OPTIONS],
[m4_if([$2], [], [],
- [XE_EXPAND_COMPLEX_OPTION([$1], m4_fst($2))[]dnl
+ [XE_EXPAND_COMPLEX_OPTION([$1], xe_fst($2))[]dnl
XE_EXPAND_COMPLEX_OPTIONS([$1], XE_CDR($2))])])dnl
dnl
dnl XE_INIT_COMPLEX_OPTION(prefix, option_list)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches
carbon2-commit: Don't leak the Unihan database handle when looking up non-Han characters.
16 years, 5 months
Aidan Kehoe
changeset: 4504:78738a40e31e5bb7d8ee5a1d0f8e27d025bcebb9
parent: 4502:0204391fc17cfbae2117a6ba5babd84081ac3834
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Sun Jun 29 11:06:16 2008 +0200
files: lisp/ChangeLog lisp/descr-text.el
description:
Don't leak the Unihan database handle when looking up non-Han characters.
2008-06-29 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (describe-char-unicode-data):
Don't leak the Unihan database handle when looking up non-Han
characters.
diff -r 0204391fc17cfbae2117a6ba5babd84081ac3834 -r 78738a40e31e5bb7d8ee5a1d0f8e27d025bcebb9 lisp/ChangeLog
--- a/lisp/ChangeLog Wed Jun 04 21:57:49 2008 +0200
+++ b/lisp/ChangeLog Sun Jun 29 11:06:16 2008 +0200
@@ -1,3 +1,9 @@ 2008-06-04 Aidan Kehoe <kehoea@parhasa
+2008-06-29 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * descr-text.el (describe-char-unicode-data):
+ Don't leak the Unihan database handle when looking up non-Han
+ characters.
+
2008-06-04 Aidan Kehoe <kehoea(a)parhasard.net>
* descr-text.el (describe-property-list):
diff -r 0204391fc17cfbae2117a6ba5babd84081ac3834 -r 78738a40e31e5bb7d8ee5a1d0f8e27d025bcebb9 lisp/descr-text.el
--- a/lisp/descr-text.el Wed Jun 04 21:57:49 2008 +0200
+++ b/lisp/descr-text.el Sun Jun 29 11:06:16 2008 +0200
@@ -729,16 +729,7 @@ The list is null if CHAR isn't found in
(goto-char (point-min))
(let ((hex (format "%04X" char))
- found first last unihan-match unihan-info
- (unihan-database-handle
- (and describe-char-unihan-file
- (open-database (unidata-generate-database-file-name
- describe-char-unihan-file
- (eighth (file-attributes
- describe-char-unihan-file))
- unidata-database-format)
- unidata-database-format
- nil "r" #o644 'no-conversion-unix)))
+ found first last unihan-match unihan-info unihan-database-handle
(coding-system-for-read 'no-conversion-unix))
(if (re-search-forward (concat "^" hex) nil t)
(setq found t)
@@ -920,7 +911,16 @@ character)")
(if (and (> (length (nth 0 fields)) 13)
(equal "<CJK Ideograph"
(substring (nth 0 fields) 0 14)))
- (if (and unihan-database-handle
+ (if (and describe-char-unihan-file
+ (setq unihan-database-handle
+ (open-database
+ (unidata-generate-database-file-name
+ describe-char-unihan-file
+ (eighth (file-attributes
+ describe-char-unihan-file))
+ unidata-database-format)
+ unidata-database-format
+ nil "r" #o644 'no-conversion-unix))
(setq unihan-match
(get-database (format "%04X" char)
unihan-database-handle)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches