-;;; x-win.el --- parse switches controlling interface with X window system
-;; Copyright (C) 1993 Free Software Foundation, Inc.
+;;; x-win.el --- parse relevant switches and set up for X -*-coding: iso-2022-7bit;-*-
+
+;; Copyright (C) 1993, 1994, 2001, 2002 Free Software Foundation, Inc.
;; Author: FSF
-;; Keywords: terminals
-
-;;; This file is part of GNU Emacs.
-;;;
-;;; GNU Emacs is free software; you can redistribute it and/or modify
-;;; it under the terms of the GNU General Public License as published by
-;;; the Free Software Foundation; either version 2, or (at your option)
-;;; any later version.
-;;;
-;;; GNU Emacs is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GNU Emacs; see the file COPYING. If not, write to
-;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; Keywords: terminals, i18n
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
;;; Commentary:
;; X display is opened and hooks are set for popping up the initial window.
;; startup.el will then examine startup files, and eventually call the hooks
-;; which create the first window (s).
+;; which create the first window(s).
;;; Code:
\f
(if (not (eq window-system 'x))
(error "%s: Loading x-win.el but not compiled for X" (invocation-name)))
-
+
(require 'frame)
(require 'mouse)
(require 'scroll-bar)
(require 'faces)
(require 'select)
(require 'menu-bar)
+(require 'fontset)
(defvar x-invocation-args)
(defvar x-command-line-resources nil)
-(setq command-switch-alist
- (append '(("-bw" . x-handle-numeric-switch)
- ("-d" . x-handle-display)
- ("-display" . x-handle-display)
- ("-name" . x-handle-name-rn-switch)
- ("-rn" . x-handle-name-rn-switch)
- ("-T" . x-handle-switch)
- ("-r" . x-handle-switch)
- ("-rv" . x-handle-switch)
- ("-reverse" . x-handle-switch)
- ("-fn" . x-handle-switch)
- ("-font" . x-handle-switch)
- ("-ib" . x-handle-numeric-switch)
- ("-g" . x-handle-geometry)
- ("-geometry" . x-handle-geometry)
- ("-fg" . x-handle-switch)
- ("-foreground". x-handle-switch)
- ("-bg" . x-handle-switch)
- ("-background". x-handle-switch)
- ("-ms" . x-handle-switch)
- ("-itype" . x-handle-switch)
- ("-i" . x-handle-switch)
- ("-iconic" . x-handle-iconic)
- ("-xrm" . x-handle-xrm-switch)
- ("-cr" . x-handle-switch)
- ("-vb" . x-handle-switch)
- ("-hb" . x-handle-switch)
- ("-bd" . x-handle-switch))
- command-switch-alist))
-
-(defconst x-switch-definitions
- '(("-name" name)
- ("-T" name)
- ("-r" reverse t)
- ("-rv" reverse t)
- ("-reverse" reverse t)
- ("-fn" font)
- ("-font" font)
- ("-ib" internal-border-width)
- ("-fg" foreground-color)
- ("-foreground" foreground-color)
- ("-bg" background-color)
- ("-background" background-color)
- ("-ms" mouse-color)
- ("-cr" cursor-color)
- ("-itype" icon-type t)
- ("-i" icon-type t)
- ("-vb" vertical-scroll-bars t)
- ("-hb" horizontal-scroll-bars t)
- ("-bd" border-color)
- ("-bw" border-width)))
-
;; Handler for switches of the form "-switch value" or "-switch".
(defun x-handle-switch (switch)
- (let ((aelt (assoc switch x-switch-definitions)))
+ (let ((aelt (assoc switch command-line-x-option-alist)))
(if aelt
- (if (nth 2 aelt)
+ (let ((param (nth 3 aelt))
+ (value (nth 4 aelt)))
+ (if value
+ (setq default-frame-alist
+ (cons (cons param value)
+ default-frame-alist))
(setq default-frame-alist
- (cons (cons (nth 1 aelt) (nth 2 aelt))
- default-frame-alist))
+ (cons (cons param
+ (car x-invocation-args))
+ default-frame-alist)
+ x-invocation-args (cdr x-invocation-args)))))))
+
+;; Handler for switches of the form "-switch n"
+(defun x-handle-numeric-switch (switch)
+ (let ((aelt (assoc switch command-line-x-option-alist)))
+ (if aelt
+ (let ((param (nth 3 aelt)))
(setq default-frame-alist
- (cons (cons (nth 1 aelt)
- (car x-invocation-args))
+ (cons (cons param
+ (string-to-int (car x-invocation-args)))
default-frame-alist)
- x-invocation-args (cdr x-invocation-args))))))
+ x-invocation-args
+ (cdr x-invocation-args))))))
+
+;; Handle options that apply to initial frame only
+(defun x-handle-initial-switch (switch)
+ (let ((aelt (assoc switch command-line-x-option-alist)))
+ (if aelt
+ (let ((param (nth 3 aelt))
+ (value (nth 4 aelt)))
+ (if value
+ (setq initial-frame-alist
+ (cons (cons param value)
+ initial-frame-alist))
+ (setq initial-frame-alist
+ (cons (cons param
+ (car x-invocation-args))
+ initial-frame-alist)
+ x-invocation-args (cdr x-invocation-args)))))))
;; Make -iconic apply only to the initial frame!
(defun x-handle-iconic (switch)
(setq initial-frame-alist
(cons '(visibility . icon) initial-frame-alist)))
-;; Handler for switches of the form "-switch n"
-(defun x-handle-numeric-switch (switch)
- (let ((aelt (assoc switch x-switch-definitions)))
- (if aelt
- (setq default-frame-alist
- (cons (cons (nth 1 aelt)
- (string-to-int (car x-invocation-args)))
- default-frame-alist)
- x-invocation-args
- (cdr x-invocation-args)))))
-
;; Handle the -xrm option.
(defun x-handle-xrm-switch (switch)
- (or (consp x-invocation-args)
- (error "%s: missing argument to `%s' option" (invocation-name) switch))
- (setq x-command-line-resources (car x-invocation-args))
+ (unless (consp x-invocation-args)
+ (error "%s: missing argument to `%s' option" (invocation-name) switch))
+ (setq x-command-line-resources
+ (if (null x-command-line-resources)
+ (car x-invocation-args)
+ (concat x-command-line-resources "\n" (car x-invocation-args))))
(setq x-invocation-args (cdr x-invocation-args)))
;; Handle the geometry option
(defun x-handle-geometry (switch)
- (setq initial-frame-alist
- (append initial-frame-alist
- (x-parse-geometry (car x-invocation-args)))
- x-invocation-args (cdr x-invocation-args)))
+ (let* ((geo (x-parse-geometry (car x-invocation-args)))
+ (left (assq 'left geo))
+ (top (assq 'top geo))
+ (height (assq 'height geo))
+ (width (assq 'width geo)))
+ (if (or height width)
+ (setq default-frame-alist
+ (append default-frame-alist
+ '((user-size . t))
+ (if height (list height))
+ (if width (list width)))
+ initial-frame-alist
+ (append initial-frame-alist
+ '((user-size . t))
+ (if height (list height))
+ (if width (list width)))))
+ (if (or left top)
+ (setq initial-frame-alist
+ (append initial-frame-alist
+ '((user-position . t))
+ (if left (list left))
+ (if top (list top)))))
+ (setq x-invocation-args (cdr x-invocation-args))))
-;; Handle the -name and -rn options. Set the variable x-resource-name
-;; to the option's operand; if the switch was `-name', set the name of
+;; Handle the -name option. Set the variable x-resource-name
+;; to the option's operand; set the name of
;; the initial frame, too.
-(defun x-handle-name-rn-switch (switch)
+(defun x-handle-name-switch (switch)
(or (consp x-invocation-args)
(error "%s: missing argument to `%s' option" (invocation-name) switch))
(setq x-resource-name (car x-invocation-args)
x-invocation-args (cdr x-invocation-args))
- (if (string= switch "-name")
- (setq initial-frame-alist (cons (cons 'name x-resource-name)
- initial-frame-alist))))
+ (setq initial-frame-alist (cons (cons 'name x-resource-name)
+ initial-frame-alist)))
(defvar x-display-name nil
"The X display name specifying server and X frame.")
(defun x-handle-display (switch)
(setq x-display-name (car x-invocation-args)
- x-invocation-args (cdr x-invocation-args)))
-
-(defvar x-invocation-args nil)
+ x-invocation-args (cdr x-invocation-args))
+ ;; Make subshell programs see the same DISPLAY value Emacs really uses.
+ ;; Note that this isn't completely correct, since Emacs can use
+ ;; multiple displays. However, there is no way to tell an already
+ ;; running subshell which display the user is currently typing on.
+ (setenv "DISPLAY" x-display-name))
(defun x-handle-args (args)
"Process the X-related command line options in ARGS.
This is done before the user's startup file is loaded. They are copied to
-x-invocation args from which the X-related things are extracted, first
+`x-invocation-args', from which the X-related things are extracted, first
the switch (e.g., \"-fg\") in the following code, and possible values
-(e.g., \"black\") in the option handler code (e.g., x-handle-switch).
-This returns ARGS with the arguments that have been processed removed."
+\(e.g., \"black\") in the option handler code (e.g., x-handle-switch).
+This function returns ARGS minus the arguments that have been processed."
+ ;; We use ARGS to accumulate the args that we don't handle here, to return.
(setq x-invocation-args args
args nil)
- (while x-invocation-args
+ (while (and x-invocation-args
+ (not (equal (car x-invocation-args) "--")))
(let* ((this-switch (car x-invocation-args))
- (aelt (assoc this-switch command-switch-alist)))
+ (orig-this-switch this-switch)
+ completion argval aelt handler)
(setq x-invocation-args (cdr x-invocation-args))
- (if aelt
- (funcall (cdr aelt) this-switch)
- (setq args (cons this-switch args)))))
- (setq args (nreverse args)))
+ ;; Check for long options with attached arguments
+ ;; and separate out the attached option argument into argval.
+ (if (string-match "^--[^=]*=" this-switch)
+ (setq argval (substring this-switch (match-end 0))
+ this-switch (substring this-switch 0 (1- (match-end 0)))))
+ ;; Complete names of long options.
+ (if (string-match "^--" this-switch)
+ (progn
+ (setq completion (try-completion this-switch command-line-x-option-alist))
+ (if (eq completion t)
+ ;; Exact match for long option.
+ nil
+ (if (stringp completion)
+ (let ((elt (assoc completion command-line-x-option-alist)))
+ ;; Check for abbreviated long option.
+ (or elt
+ (error "Option `%s' is ambiguous" this-switch))
+ (setq this-switch completion))))))
+ (setq aelt (assoc this-switch command-line-x-option-alist))
+ (if aelt (setq handler (nth 2 aelt)))
+ (if handler
+ (if argval
+ (let ((x-invocation-args
+ (cons argval x-invocation-args)))
+ (funcall handler this-switch))
+ (funcall handler this-switch))
+ (setq args (cons orig-this-switch args)))))
+ (nconc (nreverse args) x-invocation-args))
+
+;; Handle the --smid switch. This is used by the session manager
+;; to give us back our session id we had on the previous run.
+(defun x-handle-smid (switch)
+ (or (consp x-invocation-args)
+ (error "%s: missing argument to `%s' option" (invocation-name) switch))
+ (setq x-session-previous-id (car x-invocation-args)
+ x-invocation-args (cdr x-invocation-args)))
+
+(defvar emacs-save-session-functions nil
+ "Special hook run when a save-session event occurs.
+The functions do not get any argument.
+Functions can return non-nil to inform the session manager that the
+window system shutdown should be aborted.
+
+See also `emacs-session-save'.")
+
+(defun emacs-session-filename (session-id)
+ "Construct a filename to save the session in based on SESSION-ID.
+If the directory ~/.emacs.d exists, we make a filename in there, otherwise
+a file in the home directory."
+ (let ((basename (concat "session." session-id))
+ (emacs-dir "~/.emacs.d/"))
+ (expand-file-name (if (file-directory-p emacs-dir)
+ (concat emacs-dir basename)
+ (concat "~/.emacs-" basename)))))
+
+(defun emacs-session-save ()
+ "This function is called when the window system is shutting down.
+If this function returns non-nil, the window system shutdown is cancelled.
+
+When a session manager tells Emacs that the window system is shutting
+down, this function is called. It calls the functions in the hook
+`emacs-save-session-functions'. Functions are called with the current
+buffer set to a temporary buffer. Functions should use `insert' to insert
+lisp code to save the session state. The buffer is saved
+in a file in the home directory of the user running Emacs. The file
+is evaluated when Emacs is restarted by the session manager.
+
+If any of the functions returns non-nil, no more functions are called
+and this function returns non-nil. This will inform the session manager
+that it should abort the window system shutdown."
+ (let ((filename (emacs-session-filename x-session-id))
+ (buf (get-buffer-create (concat " *SES " x-session-id))))
+ (when (file-exists-p filename)
+ (delete-file filename))
+ (with-current-buffer buf
+ (let ((cancel-shutdown (condition-case nil
+ ;; A return of t means cancel the shutdown.
+ (run-hook-with-args-until-success
+ 'emacs-save-session-functions)
+ (error t))))
+ (unless cancel-shutdown
+ (write-file filename))
+ (kill-buffer buf)
+ cancel-shutdown))))
+
+(defun emacs-session-restore (previous-session-id)
+ "Restore the Emacs session if started by a session manager.
+The file saved by `emacs-session-save' is evaluated and deleted if it
+exists."
+ (let ((filename (emacs-session-filename previous-session-id)))
+ (when (file-exists-p filename)
+ (load-file filename)
+ (delete-file filename)
+ (message "Restored session data"))))
+
\f
;; Available colors
;;
-(defvar x-colors '("aquamarine"
- "Aquamarine"
- "medium aquamarine"
- "MediumAquamarine"
- "black"
- "Black"
- "blue"
- "Blue"
- "cadet blue"
- "CadetBlue"
- "cornflower blue"
- "CornflowerBlue"
- "dark slate blue"
- "DarkSlateBlue"
- "light blue"
- "LightBlue"
- "light steel blue"
- "LightSteelBlue"
- "medium blue"
- "MediumBlue"
- "medium slate blue"
- "MediumSlateBlue"
- "midnight blue"
- "MidnightBlue"
- "navy blue"
- "NavyBlue"
- "navy"
- "Navy"
- "sky blue"
- "SkyBlue"
- "slate blue"
- "SlateBlue"
- "steel blue"
- "SteelBlue"
+(defvar x-colors '("LightGreen"
+ "light green"
+ "DarkRed"
+ "dark red"
+ "DarkMagenta"
+ "dark magenta"
+ "DarkCyan"
+ "dark cyan"
+ "DarkBlue"
+ "dark blue"
+ "DarkGray"
+ "dark gray"
+ "DarkGrey"
+ "dark grey"
+ "grey100"
+ "gray100"
+ "grey99"
+ "gray99"
+ "grey98"
+ "gray98"
+ "grey97"
+ "gray97"
+ "grey96"
+ "gray96"
+ "grey95"
+ "gray95"
+ "grey94"
+ "gray94"
+ "grey93"
+ "gray93"
+ "grey92"
+ "gray92"
+ "grey91"
+ "gray91"
+ "grey90"
+ "gray90"
+ "grey89"
+ "gray89"
+ "grey88"
+ "gray88"
+ "grey87"
+ "gray87"
+ "grey86"
+ "gray86"
+ "grey85"
+ "gray85"
+ "grey84"
+ "gray84"
+ "grey83"
+ "gray83"
+ "grey82"
+ "gray82"
+ "grey81"
+ "gray81"
+ "grey80"
+ "gray80"
+ "grey79"
+ "gray79"
+ "grey78"
+ "gray78"
+ "grey77"
+ "gray77"
+ "grey76"
+ "gray76"
+ "grey75"
+ "gray75"
+ "grey74"
+ "gray74"
+ "grey73"
+ "gray73"
+ "grey72"
+ "gray72"
+ "grey71"
+ "gray71"
+ "grey70"
+ "gray70"
+ "grey69"
+ "gray69"
+ "grey68"
+ "gray68"
+ "grey67"
+ "gray67"
+ "grey66"
+ "gray66"
+ "grey65"
+ "gray65"
+ "grey64"
+ "gray64"
+ "grey63"
+ "gray63"
+ "grey62"
+ "gray62"
+ "grey61"
+ "gray61"
+ "grey60"
+ "gray60"
+ "grey59"
+ "gray59"
+ "grey58"
+ "gray58"
+ "grey57"
+ "gray57"
+ "grey56"
+ "gray56"
+ "grey55"
+ "gray55"
+ "grey54"
+ "gray54"
+ "grey53"
+ "gray53"
+ "grey52"
+ "gray52"
+ "grey51"
+ "gray51"
+ "grey50"
+ "gray50"
+ "grey49"
+ "gray49"
+ "grey48"
+ "gray48"
+ "grey47"
+ "gray47"
+ "grey46"
+ "gray46"
+ "grey45"
+ "gray45"
+ "grey44"
+ "gray44"
+ "grey43"
+ "gray43"
+ "grey42"
+ "gray42"
+ "grey41"
+ "gray41"
+ "grey40"
+ "gray40"
+ "grey39"
+ "gray39"
+ "grey38"
+ "gray38"
+ "grey37"
+ "gray37"
+ "grey36"
+ "gray36"
+ "grey35"
+ "gray35"
+ "grey34"
+ "gray34"
+ "grey33"
+ "gray33"
+ "grey32"
+ "gray32"
+ "grey31"
+ "gray31"
+ "grey30"
+ "gray30"
+ "grey29"
+ "gray29"
+ "grey28"
+ "gray28"
+ "grey27"
+ "gray27"
+ "grey26"
+ "gray26"
+ "grey25"
+ "gray25"
+ "grey24"
+ "gray24"
+ "grey23"
+ "gray23"
+ "grey22"
+ "gray22"
+ "grey21"
+ "gray21"
+ "grey20"
+ "gray20"
+ "grey19"
+ "gray19"
+ "grey18"
+ "gray18"
+ "grey17"
+ "gray17"
+ "grey16"
+ "gray16"
+ "grey15"
+ "gray15"
+ "grey14"
+ "gray14"
+ "grey13"
+ "gray13"
+ "grey12"
+ "gray12"
+ "grey11"
+ "gray11"
+ "grey10"
+ "gray10"
+ "grey9"
+ "gray9"
+ "grey8"
+ "gray8"
+ "grey7"
+ "gray7"
+ "grey6"
+ "gray6"
+ "grey5"
+ "gray5"
+ "grey4"
+ "gray4"
+ "grey3"
+ "gray3"
+ "grey2"
+ "gray2"
+ "grey1"
+ "gray1"
+ "grey0"
+ "gray0"
+ "thistle4"
+ "thistle3"
+ "thistle2"
+ "thistle1"
+ "MediumPurple4"
+ "MediumPurple3"
+ "MediumPurple2"
+ "MediumPurple1"
+ "purple4"
+ "purple3"
+ "purple2"
+ "purple1"
+ "DarkOrchid4"
+ "DarkOrchid3"
+ "DarkOrchid2"
+ "DarkOrchid1"
+ "MediumOrchid4"
+ "MediumOrchid3"
+ "MediumOrchid2"
+ "MediumOrchid1"
+ "plum4"
+ "plum3"
+ "plum2"
+ "plum1"
+ "orchid4"
+ "orchid3"
+ "orchid2"
+ "orchid1"
+ "magenta4"
+ "magenta3"
+ "magenta2"
+ "magenta1"
+ "VioletRed4"
+ "VioletRed3"
+ "VioletRed2"
+ "VioletRed1"
+ "maroon4"
+ "maroon3"
+ "maroon2"
+ "maroon1"
+ "PaleVioletRed4"
+ "PaleVioletRed3"
+ "PaleVioletRed2"
+ "PaleVioletRed1"
+ "LightPink4"
+ "LightPink3"
+ "LightPink2"
+ "LightPink1"
+ "pink4"
+ "pink3"
+ "pink2"
+ "pink1"
+ "HotPink4"
+ "HotPink3"
+ "HotPink2"
+ "HotPink1"
+ "DeepPink4"
+ "DeepPink3"
+ "DeepPink2"
+ "DeepPink1"
+ "red4"
+ "red3"
+ "red2"
+ "red1"
+ "OrangeRed4"
+ "OrangeRed3"
+ "OrangeRed2"
+ "OrangeRed1"
+ "tomato4"
+ "tomato3"
+ "tomato2"
+ "tomato1"
+ "coral4"
+ "coral3"
+ "coral2"
+ "coral1"
+ "DarkOrange4"
+ "DarkOrange3"
+ "DarkOrange2"
+ "DarkOrange1"
+ "orange4"
+ "orange3"
+ "orange2"
+ "orange1"
+ "LightSalmon4"
+ "LightSalmon3"
+ "LightSalmon2"
+ "LightSalmon1"
+ "salmon4"
+ "salmon3"
+ "salmon2"
+ "salmon1"
+ "brown4"
+ "brown3"
+ "brown2"
+ "brown1"
+ "firebrick4"
+ "firebrick3"
+ "firebrick2"
+ "firebrick1"
+ "chocolate4"
+ "chocolate3"
+ "chocolate2"
+ "chocolate1"
+ "tan4"
+ "tan3"
+ "tan2"
+ "tan1"
+ "wheat4"
+ "wheat3"
+ "wheat2"
+ "wheat1"
+ "burlywood4"
+ "burlywood3"
+ "burlywood2"
+ "burlywood1"
+ "sienna4"
+ "sienna3"
+ "sienna2"
+ "sienna1"
+ "IndianRed4"
+ "IndianRed3"
+ "IndianRed2"
+ "IndianRed1"
+ "RosyBrown4"
+ "RosyBrown3"
+ "RosyBrown2"
+ "RosyBrown1"
+ "DarkGoldenrod4"
+ "DarkGoldenrod3"
+ "DarkGoldenrod2"
+ "DarkGoldenrod1"
+ "goldenrod4"
+ "goldenrod3"
+ "goldenrod2"
+ "goldenrod1"
+ "gold4"
+ "gold3"
+ "gold2"
+ "gold1"
+ "yellow4"
+ "yellow3"
+ "yellow2"
+ "yellow1"
+ "LightYellow4"
+ "LightYellow3"
+ "LightYellow2"
+ "LightYellow1"
+ "LightGoldenrod4"
+ "LightGoldenrod3"
+ "LightGoldenrod2"
+ "LightGoldenrod1"
+ "khaki4"
+ "khaki3"
+ "khaki2"
+ "khaki1"
+ "DarkOliveGreen4"
+ "DarkOliveGreen3"
+ "DarkOliveGreen2"
+ "DarkOliveGreen1"
+ "OliveDrab4"
+ "OliveDrab3"
+ "OliveDrab2"
+ "OliveDrab1"
+ "chartreuse4"
+ "chartreuse3"
+ "chartreuse2"
+ "chartreuse1"
+ "green4"
+ "green3"
+ "green2"
+ "green1"
+ "SpringGreen4"
+ "SpringGreen3"
+ "SpringGreen2"
+ "SpringGreen1"
+ "PaleGreen4"
+ "PaleGreen3"
+ "PaleGreen2"
+ "PaleGreen1"
+ "SeaGreen4"
+ "SeaGreen3"
+ "SeaGreen2"
+ "SeaGreen1"
+ "DarkSeaGreen4"
+ "DarkSeaGreen3"
+ "DarkSeaGreen2"
+ "DarkSeaGreen1"
+ "aquamarine4"
+ "aquamarine3"
+ "aquamarine2"
+ "aquamarine1"
+ "DarkSlateGray4"
+ "DarkSlateGray3"
+ "DarkSlateGray2"
+ "DarkSlateGray1"
+ "cyan4"
+ "cyan3"
+ "cyan2"
+ "cyan1"
+ "turquoise4"
+ "turquoise3"
+ "turquoise2"
+ "turquoise1"
+ "CadetBlue4"
+ "CadetBlue3"
+ "CadetBlue2"
+ "CadetBlue1"
+ "PaleTurquoise4"
+ "PaleTurquoise3"
+ "PaleTurquoise2"
+ "PaleTurquoise1"
+ "LightCyan4"
+ "LightCyan3"
+ "LightCyan2"
+ "LightCyan1"
+ "LightBlue4"
+ "LightBlue3"
+ "LightBlue2"
+ "LightBlue1"
+ "LightSteelBlue4"
+ "LightSteelBlue3"
+ "LightSteelBlue2"
+ "LightSteelBlue1"
+ "SlateGray4"
+ "SlateGray3"
+ "SlateGray2"
+ "SlateGray1"
+ "LightSkyBlue4"
+ "LightSkyBlue3"
+ "LightSkyBlue2"
+ "LightSkyBlue1"
+ "SkyBlue4"
+ "SkyBlue3"
+ "SkyBlue2"
+ "SkyBlue1"
+ "DeepSkyBlue4"
+ "DeepSkyBlue3"
+ "DeepSkyBlue2"
+ "DeepSkyBlue1"
+ "SteelBlue4"
+ "SteelBlue3"
+ "SteelBlue2"
+ "SteelBlue1"
+ "DodgerBlue4"
+ "DodgerBlue3"
+ "DodgerBlue2"
+ "DodgerBlue1"
+ "blue4"
+ "blue3"
+ "blue2"
+ "blue1"
+ "RoyalBlue4"
+ "RoyalBlue3"
+ "RoyalBlue2"
+ "RoyalBlue1"
+ "SlateBlue4"
+ "SlateBlue3"
+ "SlateBlue2"
+ "SlateBlue1"
+ "azure4"
+ "azure3"
+ "azure2"
+ "azure1"
+ "MistyRose4"
+ "MistyRose3"
+ "MistyRose2"
+ "MistyRose1"
+ "LavenderBlush4"
+ "LavenderBlush3"
+ "LavenderBlush2"
+ "LavenderBlush1"
+ "honeydew4"
+ "honeydew3"
+ "honeydew2"
+ "honeydew1"
+ "ivory4"
+ "ivory3"
+ "ivory2"
+ "ivory1"
+ "cornsilk4"
+ "cornsilk3"
+ "cornsilk2"
+ "cornsilk1"
+ "LemonChiffon4"
+ "LemonChiffon3"
+ "LemonChiffon2"
+ "LemonChiffon1"
+ "NavajoWhite4"
+ "NavajoWhite3"
+ "NavajoWhite2"
+ "NavajoWhite1"
+ "PeachPuff4"
+ "PeachPuff3"
+ "PeachPuff2"
+ "PeachPuff1"
+ "bisque4"
+ "bisque3"
+ "bisque2"
+ "bisque1"
+ "AntiqueWhite4"
+ "AntiqueWhite3"
+ "AntiqueWhite2"
+ "AntiqueWhite1"
+ "seashell4"
+ "seashell3"
+ "seashell2"
+ "seashell1"
+ "snow4"
+ "snow3"
+ "snow2"
+ "snow1"
+ "thistle"
+ "MediumPurple"
+ "medium purple"
+ "purple"
+ "BlueViolet"
+ "blue violet"
+ "DarkViolet"
+ "dark violet"
+ "DarkOrchid"
+ "dark orchid"
+ "MediumOrchid"
+ "medium orchid"
+ "orchid"
+ "plum"
+ "violet"
+ "magenta"
+ "VioletRed"
+ "violet red"
+ "MediumVioletRed"
+ "medium violet red"
+ "maroon"
+ "PaleVioletRed"
+ "pale violet red"
+ "LightPink"
+ "light pink"
+ "pink"
+ "DeepPink"
+ "deep pink"
+ "HotPink"
+ "hot pink"
+ "red"
+ "OrangeRed"
+ "orange red"
+ "tomato"
+ "LightCoral"
+ "light coral"
"coral"
- "Coral"
- "cyan"
- "Cyan"
- "firebrick"
- "Firebrick"
+ "DarkOrange"
+ "dark orange"
+ "orange"
+ "LightSalmon"
+ "light salmon"
+ "salmon"
+ "DarkSalmon"
+ "dark salmon"
"brown"
- "Brown"
- "gold"
- "Gold"
+ "firebrick"
+ "chocolate"
+ "tan"
+ "SandyBrown"
+ "sandy brown"
+ "wheat"
+ "beige"
+ "burlywood"
+ "peru"
+ "sienna"
+ "SaddleBrown"
+ "saddle brown"
+ "IndianRed"
+ "indian red"
+ "RosyBrown"
+ "rosy brown"
+ "DarkGoldenrod"
+ "dark goldenrod"
"goldenrod"
- "Goldenrod"
- "medium goldenrod"
- "MediumGoldenrod"
- "green"
- "Green"
- "dark green"
- "DarkGreen"
- "dark olive green"
- "DarkOliveGreen"
- "forest green"
+ "LightGoldenrod"
+ "light goldenrod"
+ "gold"
+ "yellow"
+ "LightYellow"
+ "light yellow"
+ "LightGoldenrodYellow"
+ "light goldenrod yellow"
+ "PaleGoldenrod"
+ "pale goldenrod"
+ "khaki"
+ "DarkKhaki"
+ "dark khaki"
+ "OliveDrab"
+ "olive drab"
"ForestGreen"
- "lime green"
+ "forest green"
+ "YellowGreen"
+ "yellow green"
"LimeGreen"
- "medium forest green"
- "MediumForestGreen"
- "medium sea green"
- "MediumSeaGreen"
- "medium spring green"
+ "lime green"
+ "GreenYellow"
+ "green yellow"
"MediumSpringGreen"
- "pale green"
+ "medium spring green"
+ "chartreuse"
+ "green"
+ "LawnGreen"
+ "lawn green"
+ "SpringGreen"
+ "spring green"
"PaleGreen"
- "sea green"
+ "pale green"
+ "LightSeaGreen"
+ "light sea green"
+ "MediumSeaGreen"
+ "medium sea green"
"SeaGreen"
- "spring green"
- "SpringGreen"
- "yellow green"
- "YellowGreen"
- "dark slate grey"
- "DarkSlateGrey"
- "dark slate gray"
- "DarkSlateGray"
- "dim grey"
- "DimGrey"
- "dim gray"
- "DimGray"
- "light grey"
- "LightGrey"
- "light gray"
- "LightGray"
- "gray"
- "grey"
- "Gray"
- "Grey"
- "khaki"
- "Khaki"
- "magenta"
- "Magenta"
- "maroon"
- "Maroon"
- "orange"
- "Orange"
- "orchid"
- "Orchid"
- "dark orchid"
- "DarkOrchid"
- "medium orchid"
- "MediumOrchid"
- "pink"
- "Pink"
- "plum"
- "Plum"
- "red"
- "Red"
- "indian red"
- "IndianRed"
- "medium violet red"
- "MediumVioletRed"
- "orange red"
- "OrangeRed"
- "violet red"
- "VioletRed"
- "salmon"
- "Salmon"
- "sienna"
- "Sienna"
- "tan"
- "Tan"
- "thistle"
- "Thistle"
+ "sea green"
+ "DarkSeaGreen"
+ "dark sea green"
+ "DarkOliveGreen"
+ "dark olive green"
+ "DarkGreen"
+ "dark green"
+ "aquamarine"
+ "MediumAquamarine"
+ "medium aquamarine"
+ "CadetBlue"
+ "cadet blue"
+ "LightCyan"
+ "light cyan"
+ "cyan"
"turquoise"
- "Turquoise"
- "dark turquoise"
- "DarkTurquoise"
- "medium turquoise"
"MediumTurquoise"
- "violet"
- "Violet"
- "blue violet"
- "BlueViolet"
- "wheat"
- "Wheat"
+ "medium turquoise"
+ "DarkTurquoise"
+ "dark turquoise"
+ "PaleTurquoise"
+ "pale turquoise"
+ "PowderBlue"
+ "powder blue"
+ "LightBlue"
+ "light blue"
+ "LightSteelBlue"
+ "light steel blue"
+ "SteelBlue"
+ "steel blue"
+ "LightSkyBlue"
+ "light sky blue"
+ "SkyBlue"
+ "sky blue"
+ "DeepSkyBlue"
+ "deep sky blue"
+ "DodgerBlue"
+ "dodger blue"
+ "blue"
+ "RoyalBlue"
+ "royal blue"
+ "MediumBlue"
+ "medium blue"
+ "LightSlateBlue"
+ "light slate blue"
+ "MediumSlateBlue"
+ "medium slate blue"
+ "SlateBlue"
+ "slate blue"
+ "DarkSlateBlue"
+ "dark slate blue"
+ "CornflowerBlue"
+ "cornflower blue"
+ "NavyBlue"
+ "navy blue"
+ "navy"
+ "MidnightBlue"
+ "midnight blue"
+ "LightGray"
+ "light gray"
+ "LightGrey"
+ "light grey"
+ "grey"
+ "gray"
+ "LightSlateGrey"
+ "light slate grey"
+ "LightSlateGray"
+ "light slate gray"
+ "SlateGrey"
+ "slate grey"
+ "SlateGray"
+ "slate gray"
+ "DimGrey"
+ "dim grey"
+ "DimGray"
+ "dim gray"
+ "DarkSlateGrey"
+ "dark slate grey"
+ "DarkSlateGray"
+ "dark slate gray"
+ "black"
"white"
- "White"
- "yellow"
- "Yellow"
- "green yellow"
- "GreenYellow")
- "The full list of X colors from the rgb.text file.")
+ "MistyRose"
+ "misty rose"
+ "LavenderBlush"
+ "lavender blush"
+ "lavender"
+ "AliceBlue"
+ "alice blue"
+ "azure"
+ "MintCream"
+ "mint cream"
+ "honeydew"
+ "seashell"
+ "LemonChiffon"
+ "lemon chiffon"
+ "ivory"
+ "cornsilk"
+ "moccasin"
+ "NavajoWhite"
+ "navajo white"
+ "PeachPuff"
+ "peach puff"
+ "bisque"
+ "BlanchedAlmond"
+ "blanched almond"
+ "PapayaWhip"
+ "papaya whip"
+ "AntiqueWhite"
+ "antique white"
+ "linen"
+ "OldLace"
+ "old lace"
+ "FloralWhite"
+ "floral white"
+ "gainsboro"
+ "WhiteSmoke"
+ "white smoke"
+ "GhostWhite"
+ "ghost white"
+ "snow")
+ "The list of X colors from the `rgb.txt' file.
+XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")
-(defun x-defined-colors ()
- "Return a list of colors supported by the current X-Display."
+(defun xw-defined-colors (&optional frame)
+ "Internal function called by `defined-colors', which see."
+ (or frame (setq frame (selected-frame)))
(let ((all-colors x-colors)
(this-color nil)
(defined-colors nil))
(while all-colors
(setq this-color (car all-colors)
all-colors (cdr all-colors))
- (and (x-color-defined-p this-color)
+ (and (color-supported-p this-color frame t)
(setq defined-colors (cons this-color defined-colors))))
defined-colors))
\f
;;;; Function keys
-(defun iconify-or-deiconify-frame ()
- "Iconify the selected frame, or deiconify if it's currently an icon."
- (interactive)
- (if (eq (cdr (assq 'visibility (frame-parameters))) t)
- (iconify-frame)
- (make-frame-visible)))
-
(substitute-key-definition 'suspend-emacs 'iconify-or-deiconify-frame
global-map)
(define-key function-key-map [delete] [127])
(define-key function-key-map [tab] [?\t])
(define-key function-key-map [linefeed] [?\n])
-(define-key function-key-map [clear] [11])
-(define-key function-key-map [return] [13])
+(define-key function-key-map [clear] [?\C-l])
+(define-key function-key-map [return] [?\C-m])
(define-key function-key-map [escape] [?\e])
(define-key function-key-map [M-backspace] [?\M-\d])
(define-key function-key-map [M-delete] [?\M-\d])
(define-key function-key-map [M-tab] [?\M-\t])
(define-key function-key-map [M-linefeed] [?\M-\n])
-(define-key function-key-map [M-clear] [?\M-\013])
-(define-key function-key-map [M-return] [?\M-\015])
+(define-key function-key-map [M-clear] [?\M-\C-l])
+(define-key function-key-map [M-return] [?\M-\C-m])
(define-key function-key-map [M-escape] [?\M-\e])
+(define-key function-key-map [iso-lefttab] [backtab])
+(define-key function-key-map [S-iso-lefttab] [backtab])
;; These tell read-char how to convert
;; these special chars to ASCII.
(put 'return 'ascii-character 13)
(put 'escape 'ascii-character ?\e)
-;; Set up to recognize vendor-specific keysyms.
-;; Unless/until there is a real conflict,
-;; we need not try to make this list depend on
-;; the type of X server in use.
-(setq system-key-alist
+\f
+;;;; Keysyms
+
+(defun vendor-specific-keysyms (vendor)
+ "Return the appropriate value of `system-key-alist' for VENDOR.
+VENDOR is a string containing the name of the X Server's vendor,
+as returned by `x-server-vendor'."
+ ;; Fixme: Drop Apollo now?
+ (cond ((string-equal vendor "Apollo Computer Inc.")
+ '((65280 . linedel)
+ (65281 . chardel)
+ (65282 . copy)
+ (65283 . cut)
+ (65284 . paste)
+ (65285 . move)
+ (65286 . grow)
+ (65287 . cmd)
+ (65288 . shell)
+ (65289 . leftbar)
+ (65290 . rightbar)
+ (65291 . leftbox)
+ (65292 . rightbox)
+ (65293 . upbox)
+ (65294 . downbox)
+ (65295 . pop)
+ (65296 . read)
+ (65297 . edit)
+ (65298 . save)
+ (65299 . exit)
+ (65300 . repeat)))
+ ((or (string-equal vendor "Hewlett-Packard Incorporated")
+ (string-equal vendor "Hewlett-Packard Company"))
+ '(( 168 . mute-acute)
+ ( 169 . mute-grave)
+ ( 170 . mute-asciicircum)
+ ( 171 . mute-diaeresis)
+ ( 172 . mute-asciitilde)
+ ( 175 . lira)
+ ( 190 . guilder)
+ ( 252 . block)
+ ( 256 . longminus)
+ (65388 . reset)
+ (65389 . system)
+ (65390 . user)
+ (65391 . clearline)
+ (65392 . insertline)
+ (65393 . deleteline)
+ (65394 . insertchar)
+ (65395 . deletechar)
+ (65396 . backtab)
+ (65397 . kp-backtab)))
+ ;; Fixme: What about non-X11/NeWS sun server?
+ ((or (string-equal vendor "X11/NeWS - Sun Microsystems Inc.")
+ (string-equal vendor "X Consortium"))
+ '((392976 . f36)
+ (392977 . f37)
+ (393056 . req)
+ ;; These are for Sun under X11R6
+ (393072 . props)
+ (393073 . front)
+ (393074 . copy)
+ (393075 . open)
+ (393076 . paste)
+ (393077 . cut)))
+ (t
+ ;; This is used by DEC's X server.
+ '((65280 . remove)))))
+
+(let ((i 160))
+ (while (< i 256)
+ (puthash i (make-char 'latin-iso8859-1 i) x-keysym-table)
+ (setq i (1+ i))))
+
+;; Table from Kuhn's proposed additions to the `KEYSYM Encoding'
+;; appendix to the X protocol definition.
+(dolist
+ (pair
'(
- ;; These are some HP keys.
- ( 168 . mute-acute)
- ( 169 . mute-grave)
- ( 170 . mute-asciicircum)
- ( 171 . mute-diaeresis)
- ( 172 . mute-asciitilde)
- ( 175 . lira)
- ( 190 . guilder)
- ( 252 . block)
- ( 256 . longminus)
- (65388 . reset)
- (65389 . system)
- (65390 . user)
- (65391 . clearline)
- (65392 . insertline)
- (65393 . deleteline)
- (65394 . insertchar)
- (65395 . deletechar)
- (65396 . backtab)
- (65397 . kp-backtab)
- ;; This is used by DEC's X server.
- (65280 . remove)
- ;; These are for Sun.
- (392976 . f35)
- (392977 . f36)
- (393056 . req)
- ))
+ ;; Latin-2
+ (#x1a1 . ?\e,B!\e(B)
+ (#x1a2 . ?\e,B"\e(B)
+ (#x1a3 . ?\e,B#\e(B)
+ (#x1a5 . ?\e,B%\e(B)
+ (#x1a6 . ?\e,B&\e(B)
+ (#x1a9 . ?\e,B)\e(B)
+ (#x1aa . ?\e,B*\e(B)
+ (#x1ab . ?\e,B+\e(B)
+ (#x1ac . ?\e,B,\e(B)
+ (#x1ae . ?\e,B.\e(B)
+ (#x1af . ?\e,B/\e(B)
+ (#x1b1 . ?\e,B1\e(B)
+ (#x1b2 . ?\e,B2\e(B)
+ (#x1b3 . ?\e,B3\e(B)
+ (#x1b5 . ?\e,B5\e(B)
+ (#x1b6 . ?\e,B6\e(B)
+ (#x1b7 . ?\e,B7\e(B)
+ (#x1b9 . ?\e,B9\e(B)
+ (#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9
+ (#x13bc . ?\e,b<\e(B)
+ (#x13bd . ?\e,b=\e(B)
+ (#x13be . ?\e,b>\e(B)
+ ;; Currency
+ (#x20a0 . ?\e$,1t@\e(B)
+ (#x20a1 . ?\e$,1tA\e(B)
+ (#x20a2 . ?\e$,1tB\e(B)
+ (#x20a3 . ?\e$,1tC\e(B)
+ (#x20a4 . ?\e$,1tD\e(B)
+ (#x20a5 . ?\e$,1tE\e(B)
+ (#x20a6 . ?\e$,1tF\e(B)
+ (#x20a7 . ?\e$,1tG\e(B)
+ (#x20a8 . ?\e$,1tH\e(B)
+ (#x20aa . ?\e$,1tJ\e(B)
+ (#x20ab . ?\e$,1tK\e(B)
+ (#x20ac . ?\e,b$\e(B)))
+ (puthash (car pair) (cdr pair) x-keysym-table))
+
+;; The following keysym codes for graphics are listed in the document
+;; as not having unicodes available:
+
+;; #x08b1 TOP LEFT SUMMATION Technical
+;; #x08b2 BOTTOM LEFT SUMMATION Technical
+;; #x08b3 TOP VERTICAL SUMMATION CONNECTOR Technical
+;; #x08b4 BOTTOM VERTICAL SUMMATION CONNECTOR Technical
+;; #x08b5 TOP RIGHT SUMMATION Technical
+;; #x08b6 BOTTOM RIGHT SUMMATION Technical
+;; #x08b7 RIGHT MIDDLE SUMMATION Technical
+;; #x0aac SIGNIFICANT BLANK SYMBOL Publish
+;; #x0abd DECIMAL POINT Publish
+;; #x0abf MARKER Publish
+;; #x0acb TRADEMARK SIGN IN CIRCLE Publish
+;; #x0ada HEXAGRAM Publish
+;; #x0aff CURSOR Publish
+;; #x0dde THAI MAIHANAKAT Thai
+
\f
;;;; Selections and cut buffers
;;; We keep track of the last text selected here, so we can check the
;;; current selection against it, and avoid passing back our own text
-;;; from x-cut-buffer-or-selection-value.
-(defvar x-last-selected-text nil)
+;;; from x-cut-buffer-or-selection-value. We track all three
+;;; seperately in case another X application only sets one of them
+;;; (say the cut buffer) we aren't fooled by the PRIMARY or
+;;; CLIPBOARD selection staying the same.
+(defvar x-last-selected-text-clipboard nil
+ "The value of the CLIPBOARD X selection last time we selected or
+pasted text.")
+(defvar x-last-selected-text-primary nil
+ "The value of the PRIMARY X selection last time we selected or
+pasted text.")
+(defvar x-last-selected-text-cut nil
+ "The value of the X cut buffer last time we selected or pasted text.")
;;; It is said that overlarge strings are slow to put into the cut buffer.
;;; Note this value is overridden below.
(defvar x-cut-buffer-max 20000
"Max number of characters to put in the cut buffer.")
-(defvar x-select-enable-clipboard nil
+(defcustom x-select-enable-clipboard nil
"Non-nil means cutting and pasting uses the clipboard.
-This is in addition to the primary selection.")
+This is in addition to, but in preference to, the primary selection."
+ :type 'boolean
+ :group 'killing)
;;; Make TEXT, a string, the primary X selection.
;;; Also, set the value of X cut buffer 0, for backward compatibility
;;; with older X applications.
-;;; gildea@lcs.mit.edu says it's not desirable to put kills
+;;; gildea@stop.mail-abuse.org says it's not desirable to put kills
;;; in the clipboard.
(defun x-select-text (text &optional push)
;; Don't send the cut buffer too much text.
;; It becomes slow, and if really big it causes errors.
- (if (< (length text) x-cut-buffer-max)
- (x-set-cut-buffer text push)
- (x-set-cut-buffer "" push))
+ (cond ((>= (length text) x-cut-buffer-max)
+ (x-set-cut-buffer "" push)
+ (setq x-last-selected-text-cut ""))
+ ;; Don't store a multibyte string that contains
+ ;; eight-bit-control/graphic chars because they can't be
+ ;; restored correctly by x-get-cut-buffer.
+ ((and (multibyte-string-p text)
+ (let ((charsets (find-charset-string text)))
+ (or (memq 'eight-bit-control charsets)
+ (memq 'eight-bit-graphic charsets))))
+ (x-set-cut-buffer "" push)
+ (setq x-last-selected-text-cut ""))
+ (t
+ (x-set-cut-buffer text push)
+ (setq x-last-selected-text-cut text)))
(x-set-selection 'PRIMARY text)
- (if x-select-enable-clipboard
- (x-set-selection 'CLIPBOARD text))
- (setq x-last-selected-text text))
+ (setq x-last-selected-text-primary text)
+ (when x-select-enable-clipboard
+ (x-set-selection 'CLIPBOARD text)
+ (setq x-last-selected-text-clipboard text))
+ )
+
+(defvar x-select-request-type nil
+ "*Data type request for X selection.
+The value is nil, one of the following data types, or a list of them:
+ `COMPOUND_TEXT', `UTF8_STRING', `STRING', `TEXT'
+
+If the value is nil, try `COMPOUND_TEXT' and `UTF8_STRING', and
+use the more appropriate result. If both fail, try `STRING', and
+then `TEXT'.
+
+If the value is one of the above symbols, try only the specified
+type.
+
+If the value is a list of them, try each of them in the specified
+order until succeed.")
+
+;; Helper function for x-selection-value. Select UTF8 or CTEXT
+;; whichever is more appropriate. Here, we use this heurisitcs.
+;;
+;; (1) If their lengthes are different, select the longer one. This
+;; is because an X client may just cut off unsupported characters.
+;;
+;; (2) Otherwise, if the Nth character of CTEXT is an ASCII
+;; character that is different from the Nth character of UTF8,
+;; select UTF8. This is because an X client may replace unsupported
+;; characters with some ASCII character (typically ` ' or `?') in
+;; CTEXT.
+;;
+;; (3) Otherwise, select CTEXT. This is because legacy charsets are
+;; better for the current Emacs, especially when the selection owner
+;; is also Emacs.
+(defun x-select-utf8-or-ctext (utf8 ctext)
+ (let ((len-utf8 (length utf8))
+ (len-ctext (length ctext))
+ (selected ctext)
+ (i 0)
+ char)
+ (if (/= len-utf8 len-ctext)
+ (if (> len-utf8 len-ctext) utf8 ctext)
+ (while (< i len-utf8)
+ (setq char (aref ctext i))
+ (if (and (< char 128) (/= char (aref utf8 i)))
+ (setq selected utf8
+ i len-utf8)
+ (setq i (1+ i))))
+ selected)))
+
+(defun x-selection-value (type)
+ (let (text)
+ (cond ((null x-select-request-type)
+ (let (utf8 ctext utf8-coding)
+ ;; We try both UTF8_STRING and COMPOUND_TEXT, and choose
+ ;; the more appropriate one. If both fail, try STRING.
+
+ ;; At first try UTF8_STRING.
+ (setq utf8 (condition-case nil
+ (x-get-selection type 'UTF8_STRING)
+ (error nil))
+ utf8-coding last-coding-system-used)
+ (if utf8
+ ;; If it is a locale selection, choose it.
+ (or (get-text-property 0 'foreign-selection utf8)
+ (setq text utf8)))
+ ;; If not yet decided, try COMPOUND_TEXT.
+ (if (not text)
+ (if (setq ctext (condition-case nil
+ (x-get-selection type 'COMPOUND_TEXT)
+ (error nil)))
+ ;; If UTF8_STRING was also successful, choose the
+ ;; more appropriate one from UTF8 and CTEXT.
+ (if utf8
+ (setq text (x-select-utf8-or-ctext utf8 ctext))
+ ;; Othewise, choose CTEXT.
+ (setq text ctext))))
+ ;; If not yet decided, try STRING.
+ (or text
+ (setq text (condition-case nil
+ (x-get-selection type 'STRING)
+ (error nil))))
+ (if (eq text utf8)
+ (setq last-coding-system-used utf8-coding))))
+
+ ((consp x-select-request-type)
+ (let ((tail x-select-request-type))
+ (while (and tail (not text))
+ (condition-case nil
+ (setq text (x-get-selection type (car tail)))
+ (error nil))
+ (setq tail (cdr tail)))))
+
+ (t
+ (condition-case nil
+ (setq text (x-get-selection type x-select-request-type))
+ (error nil))))
+
+ (if text
+ (remove-text-properties 0 (length text) '(foreign-selection nil) text))
+ text))
+
;;; Return the value of the current X selection.
-;;; Consult the selection, then the cut buffer. Treat empty strings
+;;; Consult the selection, and the cut buffer. Treat empty strings
;;; as if they were unset.
+;;; If this function is called twice and finds the same text,
+;;; it returns nil the second time. This is so that a single
+;;; selection won't be added to the kill ring over and over.
(defun x-cut-buffer-or-selection-value ()
- (let (text)
+ (let (clip-text primary-text cut-text)
+ (when x-select-enable-clipboard
+ (setq clip-text (x-selection-value 'CLIPBOARD))
+ (if (string= clip-text "") (setq clip-text nil))
+
+ ;; Check the CLIPBOARD selection for 'newness', is it different
+ ;; from what we remebered them to be last time we did a
+ ;; cut/paste operation.
+ (setq clip-text
+ (cond;; check clipboard
+ ((or (not clip-text) (string= clip-text ""))
+ (setq x-last-selected-text-clipboard nil))
+ ((eq clip-text x-last-selected-text-clipboard) nil)
+ ((string= clip-text x-last-selected-text-clipboard)
+ ;; Record the newer string,
+ ;; so subsequent calls can use the `eq' test.
+ (setq x-last-selected-text-clipboard clip-text)
+ nil)
+ (t
+ (setq x-last-selected-text-clipboard clip-text))))
+ )
- ;; Don't die if x-get-selection signals an error.
- (condition-case c
- (setq text (x-get-selection 'PRIMARY))
- (error (message "%s" c)))
- (if (string= text "") (setq text nil))
-
- (if x-select-enable-clipboard
- (condition-case c
- (setq text (x-get-selection 'CLIPBOARD))
- (error (message "%s" c))))
- (if (string= text "") (setq text nil))
- (or text (setq text (x-get-cut-buffer 0)))
- (if (string= text "") (setq text nil))
-
- (cond
- ((not text) nil)
- ((eq text x-last-selected-text) nil)
- ((string= text x-last-selected-text)
- ;; Record the newer string, so subsequent calls can use the `eq' test.
- (setq x-last-selected-text text)
+ (setq primary-text (x-selection-value 'PRIMARY))
+ ;; Check the PRIMARY selection for 'newness', is it different
+ ;; from what we remebered them to be last time we did a
+ ;; cut/paste operation.
+ (setq primary-text
+ (cond;; check primary selection
+ ((or (not primary-text) (string= primary-text ""))
+ (setq x-last-selected-text-primary nil))
+ ((eq primary-text x-last-selected-text-primary) nil)
+ ((string= primary-text x-last-selected-text-primary)
+ ;; Record the newer string,
+ ;; so subsequent calls can use the `eq' test.
+ (setq x-last-selected-text-primary primary-text)
+ nil)
+ (t
+ (setq x-last-selected-text-primary primary-text))))
+
+ (setq cut-text (x-get-cut-buffer 0))
+
+ ;; Check the x cut buffer for 'newness', is it different
+ ;; from what we remebered them to be last time we did a
+ ;; cut/paste operation.
+ (setq cut-text
+ (cond;; check primary selection
+ ((or (not cut-text) (string= cut-text ""))
+ (setq x-last-selected-text-cut nil))
+ ((eq cut-text x-last-selected-text-cut) nil)
+ ((string= cut-text x-last-selected-text-cut)
+ ;; Record the newer string,
+ ;; so subsequent calls can use the `eq' test.
+ (setq x-last-selected-text-cut cut-text)
nil)
(t
- (setq x-last-selected-text text)))))
+ (setq x-last-selected-text-cut cut-text))))
+
+ ;; As we have done one selection, clear this now.
+ (setq next-selection-coding-system nil)
+
+ ;; At this point we have recorded the current values for the
+ ;; selection from clipboard (if we are supposed to) primary,
+ ;; and cut buffer. So return the first one that has changed
+ ;; (which is the first non-null one).
+ ;;
+ ;; NOTE: There will be cases where more than one of these has
+ ;; changed and the new values differ. This indicates that
+ ;; something like the following has happened since the last time
+ ;; we looked at the selections: Application X set all the
+ ;; selections, then Application Y set only one or two of them (say
+ ;; just the cut-buffer). In this case since we don't have
+ ;; timestamps there is no way to know what the 'correct' value to
+ ;; return is. The nice thing to do would be to tell the user we
+ ;; saw multiple possible selections and ask the user which was the
+ ;; one they wanted.
+ ;; This code is still a big improvement because now the user can
+ ;; futz with the current selection and get emacs to pay attention
+ ;; to the cut buffer again (previously as soon as clipboard or
+ ;; primary had been set the cut buffer would essentially never be
+ ;; checked again).
+ (or clip-text primary-text cut-text)
+ ))
\f
;;; Do the actual X Windows setup here; the above code just defines
(while (setq i (string-match "[.*]" x-resource-name))
(aset x-resource-name i ?-))))
-(menu-bar-mode t)
-
(x-open-connection (or x-display-name
(setq x-display-name (getenv "DISPLAY")))
- x-command-line-resources)
+ x-command-line-resources
+ ;; Exit Emacs with fatal error if this fails.
+ t)
(setq frame-creation-function 'x-create-frame-with-faces)
(setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
x-cut-buffer-max))
+;; Setup the default fontset.
+(setup-default-fontset)
+
+;; Create the standard fontset.
+(create-fontset-from-fontset-spec standard-fontset-spec t)
+
+;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
+(create-fontset-from-x-resource)
+
+;; Try to create a fontset from a font specification which comes
+;; from initial-frame-alist, default-frame-alist, or X resource.
+;; A font specification in command line argument (i.e. -fn XXXX)
+;; should be already in default-frame-alist as a `font'
+;; parameter. However, any font specifications in site-start
+;; library, user's init file (.emacs), and default.el are not
+;; yet handled here.
+
+(let ((font (or (cdr (assq 'font initial-frame-alist))
+ (cdr (assq 'font default-frame-alist))
+ (x-get-resource "font" "Font")))
+ xlfd-fields resolved-name)
+ (if (and font
+ (not (query-fontset font))
+ (setq resolved-name (x-resolve-font-name font))
+ (setq xlfd-fields (x-decompose-font-name font)))
+ (if (string= "fontset" (aref xlfd-fields xlfd-regexp-registry-subnum))
+ (new-fontset font (x-complement-fontset-spec xlfd-fields nil))
+ ;; Create a fontset from FONT. The fontset name is
+ ;; generated from FONT.
+ (create-fontset-from-ascii-font font resolved-name "startup"))))
+
+;; Sun expects the menu bar cut and paste commands to use the clipboard.
+;; This has ,? to match both on Sunos and on Solaris.
+(if (string-match "Sun Microsystems,? Inc\\."
+ (x-server-vendor))
+ (menu-bar-enable-clipboard))
+
;; Apply a geometry resource to the initial frame. Put it at the end
;; of the alist, so that anything specified on the command line takes
;; precedence.
-(let ((res-geometry (x-get-resource "geometry" "Geometry")))
+(let* ((res-geometry (x-get-resource "geometry" "Geometry"))
+ parsed)
(if res-geometry
- (setq initial-frame-alist (append initial-frame-alist
- (x-parse-geometry res-geometry)))))
+ (progn
+ (setq parsed (x-parse-geometry res-geometry))
+ ;; If the resource specifies a position,
+ ;; call the position and size "user-specified".
+ (if (or (assq 'top parsed) (assq 'left parsed))
+ (setq parsed (cons '(user-position . t)
+ (cons '(user-size . t) parsed))))
+ ;; All geometry parms apply to the initial frame.
+ (setq initial-frame-alist (append initial-frame-alist parsed))
+ ;; The size parms apply to all frames.
+ (if (assq 'height parsed)
+ (setq default-frame-alist
+ (cons (cons 'height (cdr (assq 'height parsed)))
+ default-frame-alist)))
+ (if (assq 'width parsed)
+ (setq default-frame-alist
+ (cons (cons 'width (cdr (assq 'width parsed)))
+ default-frame-alist))))))
;; Check the reverseVideo resource.
(let ((case-fold-search t))
(setq x-selection-timeout (string-to-number res-selection-timeout))))
(defun x-win-suspend-error ()
- (error "Suspending an emacs running under X makes no sense"))
+ (error "Suspending an Emacs running under X makes no sense"))
(add-hook 'suspend-hook 'x-win-suspend-error)
;;; Arrange for the kill and yank functions to set and check the clipboard.
;;; that this is only annoying.
(setq split-window-keep-point t)
+;; Don't show the frame name; that's redundant with X.
+(setq-default mode-line-frame-identification " ")
+
+;; Motif direct handling of f10 wasn't working right,
+;; So temporarily we've turned it off in lwlib-Xm.c
+;; and turned the Emacs f10 back on.
+;; ;; Motif normally handles f10 itself, so don't try to handle it a second time.
+;; (if (featurep 'motif)
+;; (global-set-key [f10] 'ignore))
+
+;; Turn on support for mouse wheels.
+(mouse-wheel-mode 1)
+
+;;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78
;;; x-win.el ends here