/[emacs]/emacs/lisp/term/x-win.el
ViewVC logotype

Diff of /emacs/lisp/term/x-win.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.155 by lektu, Thu May 16 12:00:04 2002 UTC revision 1.155.2.1 by miles, Fri Apr 4 06:20:37 2003 UTC
# Line 1  Line 1 
1  ;;; x-win.el --- parse switches controlling interface with X window system  ;;; x-win.el --- parse relevant switches and set up for X  -*-coding: iso-2022-7bit;-*-
2    
3  ;; Copyright (C) 1993, 1994, 2001, 2002 Free Software Foundation, Inc.  ;; Copyright (C) 1993, 1994, 2001, 2002 Free Software Foundation, Inc.
4    
5  ;; Author: FSF  ;; Author: FSF
6  ;; Keywords: terminals  ;; Keywords: terminals, i18n
7    
8  ;; This file is part of GNU Emacs.  ;; This file is part of GNU Emacs.
9    
# Line 30  Line 30 
30  ;; X display is opened and hooks are set for popping up the initial window.  ;; X display is opened and hooks are set for popping up the initial window.
31    
32  ;; startup.el will then examine startup files, and eventually call the hooks  ;; startup.el will then examine startup files, and eventually call the hooks
33  ;; which create the first window (s).  ;; which create the first window(s).
34    
35  ;;; Code:  ;;; Code:
36    
# Line 68  Line 68 
68    
69  (if (not (eq window-system 'x))  (if (not (eq window-system 'x))
70      (error "%s: Loading x-win.el but not compiled for X" (invocation-name)))      (error "%s: Loading x-win.el but not compiled for X" (invocation-name)))
71            
72  (require 'frame)  (require 'frame)
73  (require 'mouse)  (require 'mouse)
74  (require 'scroll-bar)  (require 'scroll-bar)
75  (require 'faces)  (require 'faces)
76  (require 'select)  (require 'select)
77  (require 'menu-bar)  (require 'menu-bar)
78  (if (fboundp 'new-fontset)  (require 'fontset)
     (require 'fontset))  
79    
80  (defvar x-invocation-args)  (defvar x-invocation-args)
81    
# Line 260  a file in the home directory." Line 259  a file in the home directory."
259      (expand-file-name (if (file-directory-p emacs-dir)      (expand-file-name (if (file-directory-p emacs-dir)
260                            (concat emacs-dir basename)                            (concat emacs-dir basename)
261                          (concat "~/.emacs-" basename)))))                          (concat "~/.emacs-" basename)))))
262            
263  (defun emacs-session-save ()  (defun emacs-session-save ()
264    "This function is called when the window system is shutting down.    "This function is called when the window system is shutting down.
265  If this function returns non-nil, the window system shutdown is cancelled.  If this function returns non-nil, the window system shutdown is cancelled.
# Line 283  that it should abort the window system s Line 282  that it should abort the window system s
282      (with-current-buffer buf      (with-current-buffer buf
283        (let ((cancel-shutdown (condition-case nil        (let ((cancel-shutdown (condition-case nil
284                                   ;; A return of t means cancel the shutdown.                                   ;; A return of t means cancel the shutdown.
285                                   (run-hook-with-args-until-success                                   (run-hook-with-args-until-success
286                                    'emacs-save-session-functions)                                    'emacs-save-session-functions)
287                                 (error t))))                                 (error t))))
288          (unless cancel-shutdown          (unless cancel-shutdown
# Line 301  exists." Line 300  exists."
300        (delete-file filename)        (delete-file filename)
301        (message "Restored session data"))))        (message "Restored session data"))))
302    
303    
304      
305    
306  ;;  ;;
307  ;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them.  ;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them.
# Line 1187  XConsortium: rgb.txt,v 10.41 94/02/20 18 Line 1186  XConsortium: rgb.txt,v 10.41 94/02/20 18
1186  (define-key function-key-map [M-return] [?\M-\C-m])  (define-key function-key-map [M-return] [?\M-\C-m])
1187  (define-key function-key-map [M-escape] [?\M-\e])  (define-key function-key-map [M-escape] [?\M-\e])
1188  (define-key function-key-map [iso-lefttab] [backtab])  (define-key function-key-map [iso-lefttab] [backtab])
1189    (define-key function-key-map [S-iso-lefttab] [backtab])
1190    
1191  ;; These tell read-char how to convert  ;; These tell read-char how to convert
1192  ;; these special chars to ASCII.  ;; these special chars to ASCII.
# Line 1198  XConsortium: rgb.txt,v 10.41 94/02/20 18 Line 1198  XConsortium: rgb.txt,v 10.41 94/02/20 18
1198  (put 'return 'ascii-character 13)  (put 'return 'ascii-character 13)
1199  (put 'escape 'ascii-character ?\e)  (put 'escape 'ascii-character ?\e)
1200    
1201    
1202    ;;;; Keysyms
1203    
1204  (defun vendor-specific-keysyms (vendor)  (defun vendor-specific-keysyms (vendor)
1205    "Return the appropriate value of system-key-alist for VENDOR.    "Return the appropriate value of `system-key-alist' for VENDOR.
1206  VENDOR is a string containing the name of the X Server's vendor,  VENDOR is a string containing the name of the X Server's vendor,
1207  as returned by (x-server-vendor)."  as returned by `x-server-vendor'."
1208      ;; Fixme: Drop Apollo now?
1209    (cond ((string-equal vendor "Apollo Computer Inc.")    (cond ((string-equal vendor "Apollo Computer Inc.")
1210           '((65280 . linedel)           '((65280 . linedel)
1211             (65281 . chardel)             (65281 . chardel)
# Line 1245  as returned by (x-server-vendor)." Line 1249  as returned by (x-server-vendor)."
1249             (65395 . deletechar)             (65395 . deletechar)
1250             (65396 . backtab)             (65396 . backtab)
1251             (65397 . kp-backtab)))             (65397 . kp-backtab)))
1252            ;; Fixme: What about non-X11/NeWS sun server?
1253          ((or (string-equal vendor "X11/NeWS - Sun Microsystems Inc.")          ((or (string-equal vendor "X11/NeWS - Sun Microsystems Inc.")
1254               (string-equal vendor "X Consortium"))               (string-equal vendor "X Consortium"))
1255           '((392976 . f36)           '((392976 . f36)
# Line 1261  as returned by (x-server-vendor)." Line 1266  as returned by (x-server-vendor)."
1266           ;; This is used by DEC's X server.           ;; This is used by DEC's X server.
1267           '((65280 . remove)))))           '((65280 . remove)))))
1268    
1269    (let ((i 160))
1270      (while (< i 256)
1271        (puthash i (make-char 'latin-iso8859-1 i) x-keysym-table)
1272        (setq i (1+ i))))
1273    
1274    ;; Table from Kuhn's proposed additions to the `KEYSYM Encoding'
1275    ;; appendix to the X protocol definition.
1276    (dolist
1277         (pair
1278          '(
1279            ;; Latin-2
1280            (#x1a1 . ?,B!(B)
1281            (#x1a2 . ?,B"(B)
1282            (#x1a3 . ?,B#(B)
1283            (#x1a5 . ?,B%(B)
1284            (#x1a6 . ?,B&(B)
1285            (#x1a9 . ?,B)(B)
1286            (#x1aa . ?,B*(B)
1287            (#x1ab . ?,B+(B)
1288            (#x1ac . ?,B,(B)
1289            (#x1ae . ?,B.(B)
1290            (#x1af . ?,B/(B)
1291            (#x1b1 . ?,B1(B)
1292            (#x1b2 . ?,B2(B)
1293            (#x1b3 . ?,B3(B)
1294            (#x1b5 . ?,B5(B)
1295            (#x1b6 . ?,B6(B)
1296            (#x1b7 . ?,B7(B)
1297            (#x1b9 . ?,B9(B)
1298            (#x1ba . ?,B:(B)
1299            (#x1bb . ?,B;(B)
1300            (#x1bc . ?,B<(B)
1301            (#x1bd . ?,B=(B)
1302            (#x1be . ?,B>(B)
1303            (#x1bf . ?,B?(B)
1304            (#x1c0 . ?,B@(B)
1305            (#x1c3 . ?,BC(B)
1306            (#x1c5 . ?,BE(B)
1307            (#x1c6 . ?,BF(B)
1308            (#x1c8 . ?,BH(B)
1309            (#x1ca . ?,BJ(B)
1310            (#x1cc . ?,BL(B)
1311            (#x1cf . ?,BO(B)
1312            (#x1d0 . ?,BP(B)
1313            (#x1d1 . ?,BQ(B)
1314            (#x1d2 . ?,BR(B)
1315            (#x1d5 . ?,BU(B)
1316            (#x1d8 . ?,BX(B)
1317            (#x1d9 . ?,BY(B)
1318            (#x1db . ?,B[(B)
1319            (#x1de . ?,B^(B)
1320            (#x1e0 . ?,B`(B)
1321            (#x1e3 . ?,Bc(B)
1322            (#x1e5 . ?,Be(B)
1323            (#x1e6 . ?,Bf(B)
1324            (#x1e8 . ?,Bh(B)
1325            (#x1ea . ?,Bj(B)
1326            (#x1ec . ?,Bl(B)
1327            (#x1ef . ?,Bo(B)
1328            (#x1f0 . ?,Bp(B)
1329            (#x1f1 . ?,Bq(B)
1330            (#x1f2 . ?,Br(B)
1331            (#x1f5 . ?,Bu(B)
1332            (#x1f8 . ?,Bx(B)
1333            (#x1f9 . ?,By(B)
1334            (#x1fb . ?,B{(B)
1335            (#x1fe . ?,B~(B)
1336            (#x1ff . ?,B(B)
1337            ;; Latin-3
1338            (#x2a1 . ?,C!(B)
1339            (#x2a6 . ?,C&(B)
1340            (#x2a9 . ?,C)(B)
1341            (#x2ab . ?,C+(B)
1342            (#x2ac . ?,C,(B)
1343            (#x2b1 . ?,C1(B)
1344            (#x2b6 . ?,C6(B)
1345            (#x2b9 . ?,C9(B)
1346            (#x2bb . ?,C;(B)
1347            (#x2bc . ?,C<(B)
1348            (#x2c5 . ?,CE(B)
1349            (#x2c6 . ?,CF(B)
1350            (#x2d5 . ?,CU(B)
1351            (#x2d8 . ?,CX(B)
1352            (#x2dd . ?,C](B)
1353            (#x2de . ?,C^(B)
1354            (#x2e5 . ?,Ce(B)
1355            (#x2e6 . ?,Cf(B)
1356            (#x2f5 . ?,Cu(B)
1357            (#x2f8 . ?,Cx(B)
1358            (#x2fd . ?,C}(B)
1359            (#x2fe . ?,C~(B)
1360            ;; Latin-4
1361            (#x3a2 . ?,D"(B)
1362            (#x3a3 . ?,D#(B)
1363            (#x3a5 . ?,D%(B)
1364            (#x3a6 . ?,D&(B)
1365            (#x3aa . ?,D*(B)
1366            (#x3ab . ?,D+(B)
1367            (#x3ac . ?,D,(B)
1368            (#x3b3 . ?,D3(B)
1369            (#x3b5 . ?,D5(B)
1370            (#x3b6 . ?,D6(B)
1371            (#x3ba . ?,D:(B)
1372            (#x3bb . ?,D;(B)
1373            (#x3bc . ?,D<(B)
1374            (#x3bd . ?,D=(B)
1375            (#x3bf . ?,D?(B)
1376            (#x3c0 . ?,D@(B)
1377            (#x3c7 . ?,DG(B)
1378            (#x3cc . ?,DL(B)
1379            (#x3cf . ?,DO(B)
1380            (#x3d1 . ?,DQ(B)
1381            (#x3d2 . ?,DR(B)
1382            (#x3d3 . ?,DS(B)
1383            (#x3d9 . ?,DY(B)
1384            (#x3dd . ?,D](B)
1385            (#x3de . ?,D^(B)
1386            (#x3e0 . ?,D`(B)
1387            (#x3e7 . ?,Dg(B)
1388            (#x3ec . ?,Dl(B)
1389            (#x3ef . ?,Do(B)
1390            (#x3f1 . ?,Dq(B)
1391            (#x3f2 . ?,Dr(B)
1392            (#x3f3 . ?,Ds(B)
1393            (#x3f9 . ?,Dy(B)
1394            (#x3fd . ?,D}(B)
1395            (#x3fe . ?,D~(B)
1396            ;; Kana: Fixme: needs conversion to Japanese charset -- seems
1397            ;; to require jisx0213, for which the Unicode translation
1398            ;; isn't clear.
1399            (#x47e . ?$,1s>(B)
1400            (#x4a1 . ?$,2=B(B)
1401            (#x4a2 . ?\$,2=L(B)
1402            (#x4a3 . ?\$,2=M(B)
1403            (#x4a4 . ?$,2=A(B)
1404            (#x4a5 . ?$,2?{(B)
1405            (#x4a6 . ?$,2?r(B)
1406            (#x4a7 . ?$,2?!(B)
1407            (#x4a8 . ?$,2?#(B)
1408            (#x4a9 . ?$,2?%(B)
1409            (#x4aa . ?$,2?'(B)
1410            (#x4ab . ?$,2?)(B)
1411            (#x4ac . ?$,2?c(B)
1412            (#x4ad . ?$,2?e(B)
1413            (#x4ae . ?$,2?g(B)
1414            (#x4af . ?$,2?C(B)
1415            (#x4b0 . ?$,2?|(B)
1416            (#x4b1 . ?$,2?"(B)
1417            (#x4b2 . ?$,2?$(B)
1418            (#x4b3 . ?$,2?&(B)
1419            (#x4b4 . ?$,2?((B)
1420            (#x4b5 . ?$,2?*(B)
1421            (#x4b6 . ?$,2?+(B)
1422            (#x4b7 . ?$,2?-(B)
1423            (#x4b8 . ?$,2?/(B)
1424            (#x4b9 . ?$,2?1(B)
1425            (#x4ba . ?$,2?3(B)
1426            (#x4bb . ?$,2?5(B)
1427            (#x4bc . ?$,2?7(B)
1428            (#x4bd . ?$,2?9(B)
1429            (#x4be . ?$,2?;(B)
1430            (#x4bf . ?$,2?=(B)
1431            (#x4c0 . ?$,2??(B)
1432            (#x4c1 . ?$,2?A(B)
1433            (#x4c2 . ?$,2?D(B)
1434            (#x4c3 . ?$,2?F(B)
1435            (#x4c4 . ?$,2?H(B)
1436            (#x4c5 . ?$,2?J(B)
1437            (#x4c6 . ?$,2?K(B)
1438            (#x4c7 . ?$,2?L(B)
1439            (#x4c8 . ?$,2?M(B)
1440            (#x4c9 . ?$,2?N(B)
1441            (#x4ca . ?$,2?O(B)
1442            (#x4cb . ?$,2?R(B)
1443            (#x4cc . ?$,2?U(B)
1444            (#x4cd . ?$,2?X(B)
1445            (#x4ce . ?$,2?[(B)
1446            (#x4cf . ?$,2?^(B)
1447            (#x4d0 . ?$,2?_(B)
1448            (#x4d1 . ?$,2?`(B)
1449            (#x4d2 . ?$,2?a(B)
1450            (#x4d3 . ?$,2?b(B)
1451            (#x4d4 . ?$,2?d(B)
1452            (#x4d5 . ?$,2?f(B)
1453            (#x4d6 . ?$,2?h(B)
1454            (#x4d7 . ?$,2?i(B)
1455            (#x4d8 . ?$,2?j(B)
1456            (#x4d9 . ?$,2?k(B)
1457            (#x4da . ?$,2?l(B)
1458            (#x4db . ?$,2?m(B)
1459            (#x4dc . ?$,2?o(B)
1460            (#x4dd . ?$,2?s(B)
1461            (#x4de . ?$,2>{(B)
1462            (#x4df . ?$,2>|(B)
1463            ;; Arabic
1464            (#x5ac . ?,G,(B)
1465            (#x5bb . ?,G;(B)
1466            (#x5bf . ?,G?(B)
1467            (#x5c1 . ?,GA(B)
1468            (#x5c2 . ?,GB(B)
1469            (#x5c3 . ?,GC(B)
1470            (#x5c4 . ?,GD(B)
1471            (#x5c5 . ?,GE(B)
1472            (#x5c6 . ?,GF(B)
1473            (#x5c7 . ?,GG(B)
1474            (#x5c8 . ?,GH(B)
1475            (#x5c9 . ?,GI(B)
1476            (#x5ca . ?,GJ(B)
1477            (#x5cb . ?,GK(B)
1478            (#x5cc . ?,GL(B)
1479            (#x5cd . ?,GM(B)
1480            (#x5ce . ?,GN(B)
1481            (#x5cf . ?,GO(B)
1482            (#x5d0 . ?,GP(B)
1483            (#x5d1 . ?,GQ(B)
1484            (#x5d2 . ?,GR(B)
1485            (#x5d3 . ?,GS(B)
1486            (#x5d4 . ?,GT(B)
1487            (#x5d5 . ?,GU(B)
1488            (#x5d6 . ?,GV(B)
1489            (#x5d7 . ?,GW(B)
1490            (#x5d8 . ?,GX(B)
1491            (#x5d9 . ?,GY(B)
1492            (#x5da . ?,GZ(B)
1493            (#x5e0 . ?,G`(B)
1494            (#x5e1 . ?,Ga(B)
1495            (#x5e2 . ?,Gb(B)
1496            (#x5e3 . ?,Gc(B)
1497            (#x5e4 . ?,Gd(B)
1498            (#x5e5 . ?,Ge(B)
1499            (#x5e6 . ?,Gf(B)
1500            (#x5e7 . ?,Gg(B)
1501            (#x5e8 . ?,Gh(B)
1502            (#x5e9 . ?,Gi(B)
1503            (#x5ea . ?,Gj(B)
1504            (#x5eb . ?,Gk(B)
1505            (#x5ec . ?,Gl(B)
1506            (#x5ed . ?,Gm(B)
1507            (#x5ee . ?,Gn(B)
1508            (#x5ef . ?,Go(B)
1509            (#x5f0 . ?,Gp(B)
1510            (#x5f1 . ?,Gq(B)
1511            (#x5f2 . ?,Gr(B)
1512            ;; Cyrillic
1513            (#x6a1 . ?,Lr(B)
1514            (#x6a2 . ?,Ls(B)
1515            (#x6a3 . ?,Lq(B)
1516            (#x6a4 . ?,Lt(B)
1517            (#x6a5 . ?,Lu(B)
1518            (#x6a6 . ?,Lv(B)
1519            (#x6a7 . ?,Lw(B)
1520            (#x6a8 . ?,Lx(B)
1521            (#x6a9 . ?,Ly(B)
1522            (#x6aa . ?,Lz(B)
1523            (#x6ab . ?,L{(B)
1524            (#x6ac . ?,L|(B)
1525            (#x6ae . ?,L~(B)
1526            (#x6af . ?,L(B)
1527            (#x6b0 . ?,Lp(B)
1528            (#x6b1 . ?,L"(B)
1529            (#x6b2 . ?,L#(B)
1530            (#x6b3 . ?,L!(B)
1531            (#x6b4 . ?,L$(B)
1532            (#x6b5 . ?,L%(B)
1533            (#x6b6 . ?,L&(B)
1534            (#x6b7 . ?,L'(B)
1535            (#x6b8 . ?,L((B)
1536            (#x6b9 . ?,L)(B)
1537            (#x6ba . ?,L*(B)
1538            (#x6bb . ?,L+(B)
1539            (#x6bc . ?,L,(B)
1540            (#x6be . ?,L.(B)
1541            (#x6bf . ?,L/(B)
1542            (#x6c0 . ?,Ln(B)
1543            (#x6c1 . ?,LP(B)
1544            (#x6c2 . ?,LQ(B)
1545            (#x6c3 . ?,Lf(B)
1546            (#x6c4 . ?,LT(B)
1547            (#x6c5 . ?,LU(B)
1548            (#x6c6 . ?,Ld(B)
1549            (#x6c7 . ?,LS(B)
1550            (#x6c8 . ?,Le(B)
1551            (#x6c9 . ?,LX(B)
1552            (#x6ca . ?,LY(B)
1553            (#x6cb . ?,LZ(B)
1554            (#x6cc . ?,L[(B)
1555            (#x6cd . ?,L\(B)
1556            (#x6ce . ?,L](B)
1557            (#x6cf . ?,L^(B)
1558            (#x6d0 . ?,L_(B)
1559            (#x6d1 . ?,Lo(B)
1560            (#x6d2 . ?,L`(B)
1561            (#x6d3 . ?,La(B)
1562            (#x6d4 . ?,Lb(B)
1563            (#x6d5 . ?,Lc(B)
1564            (#x6d6 . ?,LV(B)
1565            (#x6d7 . ?,LR(B)
1566            (#x6d8 . ?,Ll(B)
1567            (#x6d9 . ?,Lk(B)
1568            (#x6da . ?,LW(B)
1569            (#x6db . ?,Lh(B)
1570            (#x6dc . ?,Lm(B)
1571            (#x6dd . ?,Li(B)
1572            (#x6de . ?,Lg(B)
1573            (#x6df . ?,Lj(B)
1574            (#x6e0 . ?,LN(B)
1575            (#x6e1 . ?,L0(B)
1576            (#x6e2 . ?,L1(B)
1577            (#x6e3 . ?,LF(B)
1578            (#x6e4 . ?,L4(B)
1579            (#x6e5 . ?,L5(B)
1580            (#x6e6 . ?,LD(B)
1581            (#x6e7 . ?,L3(B)
1582            (#x6e8 . ?,LE(B)
1583            (#x6e9 . ?,L8(B)
1584            (#x6ea . ?,L9(B)
1585            (#x6eb . ?,L:(B)
1586            (#x6ec . ?,L;(B)
1587            (#x6ed . ?,L<(B)
1588            (#x6ee . ?,L=(B)
1589            (#x6ef . ?,L>(B)
1590            (#x6f0 . ?,L?(B)
1591            (#x6f1 . ?,LO(B)
1592            (#x6f2 . ?,L@(B)
1593            (#x6f3 . ?,LA(B)
1594            (#x6f4 . ?,LB(B)
1595            (#x6f5 . ?,LC(B)
1596            (#x6f6 . ?,L6(B)
1597            (#x6f7 . ?,L2(B)
1598            (#x6f8 . ?,LL(B)
1599            (#x6f9 . ?,LK(B)
1600            (#x6fa . ?,L7(B)
1601            (#x6fb . ?,LH(B)
1602            (#x6fc . ?,LM(B)
1603            (#x6fd . ?,LI(B)
1604            (#x6fe . ?,LG(B)
1605            (#x6ff . ?,LJ(B)
1606            ;; Greek
1607            (#x7a1 . ?,F6(B)
1608            (#x7a2 . ?,F8(B)
1609            (#x7a3 . ?,F9(B)
1610            (#x7a4 . ?,F:(B)
1611            (#x7a5 . ?,FZ(B)
1612            (#x7a7 . ?,F<(B)
1613            (#x7a8 . ?,F>(B)
1614            (#x7a9 . ?,F[(B)
1615            (#x7ab . ?,F?(B)
1616            (#x7ae . ?,F5(B)
1617            (#x7af . ?,F/(B)
1618            (#x7b1 . ?,F\(B)
1619            (#x7b2 . ?,F](B)
1620            (#x7b3 . ?,F^(B)
1621            (#x7b4 . ?,F_(B)
1622            (#x7b5 . ?,Fz(B)
1623            (#x7b6 . ?,F@(B)
1624            (#x7b7 . ?,F|(B)
1625            (#x7b8 . ?,F}(B)
1626            (#x7b9 . ?,F{(B)
1627            (#x7ba . ?,F`(B)
1628            (#x7bb . ?,F~(B)
1629            (#x7c1 . ?,FA(B)
1630            (#x7c2 . ?,FB(B)
1631            (#x7c3 . ?,FC(B)
1632            (#x7c4 . ?,FD(B)
1633            (#x7c5 . ?,FE(B)
1634            (#x7c6 . ?,FF(B)
1635            (#x7c7 . ?,FG(B)
1636            (#x7c8 . ?,FH(B)
1637            (#x7c9 . ?,FI(B)
1638            (#x7ca . ?,FJ(B)
1639            (#x7cb . ?,FK(B)
1640            (#x7cc . ?,FL(B)
1641            (#x7cd . ?,FM(B)
1642            (#x7ce . ?,FN(B)
1643            (#x7cf . ?,FO(B)
1644            (#x7d0 . ?,FP(B)
1645            (#x7d1 . ?,FQ(B)
1646            (#x7d2 . ?,FS(B)
1647            (#x7d4 . ?,FT(B)
1648            (#x7d5 . ?,FU(B)
1649            (#x7d6 . ?,FV(B)
1650            (#x7d7 . ?,FW(B)
1651            (#x7d8 . ?,FX(B)
1652            (#x7d9 . ?,FY(B)
1653            (#x7e1 . ?,Fa(B)
1654            (#x7e2 . ?,Fb(B)
1655            (#x7e3 . ?,Fc(B)
1656            (#x7e4 . ?,Fd(B)
1657            (#x7e5 . ?,Fe(B)
1658            (#x7e6 . ?,Ff(B)
1659            (#x7e7 . ?,Fg(B)
1660            (#x7e8 . ?,Fh(B)
1661            (#x7e9 . ?,Fi(B)
1662            (#x7ea . ?,Fj(B)
1663            (#x7eb . ?,Fk(B)
1664            (#x7ec . ?,Fl(B)
1665            (#x7ed . ?,Fm(B)
1666            (#x7ee . ?,Fn(B)
1667            (#x7ef . ?,Fo(B)
1668            (#x7f0 . ?,Fp(B)
1669            (#x7f1 . ?,Fq(B)
1670            (#x7f2 . ?,Fs(B)
1671            (#x7f3 . ?,Fr(B)
1672            (#x7f4 . ?,Ft(B)
1673            (#x7f5 . ?,Fu(B)
1674            (#x7f6 . ?,Fv(B)
1675            (#x7f7 . ?,Fw(B)
1676            (#x7f8 . ?,Fx(B)
1677            (#x7f9 . ?,Fy(B)
1678             ;; Technical
1679            (#x8a1 . ?$,1|W(B)
1680            (#x8a2 . ?$,2 ,(B)
1681            (#x8a3 . ?$,2  (B)
1682            (#x8a4 . ?$,1{ (B)
1683            (#x8a5 . ?$,1{!(B)
1684            (#x8a6 . ?$,2 "(B)
1685            (#x8a7 . ?$,1|A(B)
1686            (#x8a8 . ?$,1|C(B)
1687            (#x8a9 . ?$,1|D(B)
1688            (#x8aa . ?$,1|F(B)
1689            (#x8ab . ?$,1|;(B)
1690            (#x8ac . ?$,1|=(B)
1691            (#x8ad . ?$,1|>(B)
1692            (#x8ae . ?$,1|@(B)
1693            (#x8af . ?$,1|H(B)
1694            (#x8b0 . ?$,1|L(B)
1695            (#x8bc . ?$,1y$(B)
1696            (#x8bd . ?$,1y (B)
1697            (#x8be . ?$,1y%(B)
1698            (#x8bf . ?$,1xK(B)
1699            (#x8c0 . ?$,1xT(B)
1700            (#x8c1 . ?$,1x=(B)
1701            (#x8c2 . ?$,1x>(B)
1702            (#x8c5 . ?$,1x'(B)
1703            (#x8c8 . ?$,1x\(B)
1704            (#x8c9 . ?$,1xc(B)
1705            (#x8cd . ?$,1wT(B)
1706            (#x8ce . ?$,1wR(B)
1707            (#x8cf . ?$,1y!(B)
1708            (#x8d6 . ?$,1x:(B)
1709            (#x8da . ?$,1yB(B)
1710            (#x8db . ?$,1yC(B)
1711            (#x8dc . ?$,1xI(B)
1712            (#x8dd . ?$,1xJ(B)
1713            (#x8de . ?$,1xG(B)
1714            (#x8df . ?$,1xH(B)
1715            (#x8ef . ?$,1x"(B)
1716            (#x8f6 . ?$,1!R(B)
1717            (#x8fb . ?$,1vp(B)
1718            (#x8fc . ?$,1vq(B)
1719            (#x8fd . ?$,1vr(B)
1720            (#x8fe . ?$,1vs(B)
1721            ;; Special
1722            (#x9e0 . ?$,2"&(B)
1723            (#x9e1 . ?$,2!R(B)
1724            (#x9e2 . ?$,1}I(B)
1725            (#x9e3 . ?$,1}L(B)
1726            (#x9e4 . ?$,1}M(B)
1727            (#x9e5 . ?$,1}J(B)
1728            (#x9e8 . ?$,1}d(B)
1729            (#x9e9 . ?$,1}K(B)
1730            (#x9ea . ?$,2 8(B)
1731            (#x9eb . ?$,2 0(B)
1732            (#x9ec . ?$,2 ,(B)
1733            (#x9ed . ?$,2 4(B)
1734            (#x9ee . ?$,2 \(B)
1735            (#x9ef . ?$,1|Z(B)
1736            (#x9f0 . ?$,1|[(B)
1737            (#x9f1 . ?$,2  (B)
1738            (#x9f2 . ?$,1|\(B)
1739            (#x9f3 . ?$,1|](B)
1740            (#x9f4 . ?$,2 <(B)
1741            (#x9f5 . ?$,2 D(B)
1742            (#x9f6 . ?$,2 T(B)
1743            (#x9f7 . ?$,2 L(B)
1744            (#x9f8 . ?$,2 "(B)
1745            ;; Publishing
1746            (#xaa1 . ?$,1rc(B)
1747            (#xaa2 . ?$,1rb(B)
1748            (#xaa3 . ?$,1rd(B)
1749            (#xaa4 . ?$,1re(B)
1750            (#xaa5 . ?$,1rg(B)
1751            (#xaa6 . ?$,1rh(B)
1752            (#xaa7 . ?$,1ri(B)
1753            (#xaa8 . ?$,1rj(B)
1754            (#xaa9 . ?$,1rt(B)
1755            (#xaaa . ?$,1rs(B)
1756            (#xaae . ?$,1s&(B)
1757            (#xaaf . ?$,1s%(B)
1758            (#xab0 . ?$,1v3(B)
1759            (#xab1 . ?$,1v4(B)
1760            (#xab2 . ?$,1v5(B)
1761            (#xab3 . ?$,1v6(B)
1762            (#xab4 . ?$,1v7(B)
1763            (#xab5 . ?$,1v8(B)
1764            (#xab6 . ?$,1v9(B)
1765            (#xab7 . ?$,1v:(B)
1766            (#xab8 . ?$,1uE(B)
1767            (#xabb . ?$,1rr(B)
1768            (#xabc . ?$,1{)(B)
1769            (#xabe . ?$,1{*(B)
1770            (#xac3 . ?$,1v;(B)
1771            (#xac4 . ?$,1v<(B)
1772            (#xac5 . ?$,1v=(B)
1773            (#xac6 . ?$,1v>(B)
1774            (#xac9 . ?$,1ub(B)
1775            (#xaca . ?$,2"s(B)
1776            (#xacc . ?$,2"!(B)
1777            (#xacd . ?$,2!w(B)
1778            (#xace . ?$,2"+(B)
1779            (#xacf . ?$,2!o(B)
1780            (#xad0 . ?$,1rx(B)
1781            (#xad1 . ?$,1ry(B)
1782            (#xad2 . ?$,1r|(B)
1783            (#xad3 . ?$,1r}(B)
1784            (#xad4 . ?$,1u^(B)
1785            (#xad6 . ?$,1s2(B)
1786            (#xad7 . ?$,1s3(B)
1787            (#xad9 . ?$,2%](B)
1788            (#xadb . ?$,2!l(B)
1789            (#xadc . ?$,2" (B)
1790            (#xadd . ?$,2!v(B)
1791            (#xade . ?$,2"/(B)
1792            (#xadf . ?$,2!n(B)
1793            (#xae0 . ?$,2"F(B)
1794            (#xae1 . ?$,2!k(B)
1795            (#xae2 . ?$,2!m(B)
1796            (#xae3 . ?$,2!s(B)
1797            (#xae4 . ?$,2!}(B)
1798            (#xae5 . ?$,2"f(B)
1799            (#xae6 . ?$,1s"(B)
1800            (#xae7 . ?$,2!j(B)
1801            (#xae8 . ?$,2!r(B)
1802            (#xae9 . ?$,2!|(B)
1803            (#xaea . ?$,2"|(B)
1804            (#xaeb . ?$,2"~(B)
1805            (#xaec . ?$,2#c(B)
1806            (#xaed . ?$,2#f(B)
1807            (#xaee . ?$,2#e(B)
1808            (#xaf0 . ?$,2%`(B)
1809            (#xaf1 . ?$,1s (B)
1810            (#xaf2 . ?$,1s!(B)
1811            (#xaf3 . ?$,2%S(B)
1812            (#xaf4 . ?$,2%W(B)
1813            (#xaf5 . ?$,2#o(B)
1814            (#xaf6 . ?$,2#m(B)
1815            (#xaf7 . ?$,2#B(B)
1816            (#xaf8 . ?$,2#@(B)
1817            (#xaf9 . ?$,2"n(B)
1818            (#xafa . ?$,1zu(B)
1819            (#xafb . ?$,1uW(B)
1820            (#xafc . ?$,1s8(B)
1821            (#xafd . ?$,1rz(B)
1822            (#xafe . ?$,1r~(B)
1823            ;; APL
1824            (#xba3 . ?<)
1825            (#xba6 . ?>)
1826            (#xba8 . ?$,1xH(B)
1827            (#xba9 . ?$,1xG(B)
1828            (#xbc0 . ?,A/(B)
1829            (#xbc2 . ?$,1ye(B)
1830            (#xbc3 . ?$,1xI(B)
1831            (#xbc4 . ?$,1zj(B)
1832            (#xbc6 . ?_)
1833            (#xbca . ?$,1x8(B)
1834            (#xbcc . ?$,1|5(B)
1835            (#xbce . ?$,1yd(B)
1836            (#xbcf . ?$,2"+(B)
1837            (#xbd3 . ?$,1zh(B)
1838            (#xbd6 . ?$,1xJ(B)
1839            (#xbd8 . ?$,1yC(B)
1840            (#xbda . ?$,1yB(B)
1841            (#xbdc . ?$,1yb(B)
1842            (#xbfc . ?$,1yc(B)
1843            ;; Hebrew
1844            (#xcdf . ?,H_(B)
1845            (#xce0 . ?,H`(B)
1846            (#xce1 . ?,Ha(B)
1847            (#xce2 . ?,Hb(B)
1848            (#xce3 . ?,Hc(B)
1849            (#xce4 . ?,Hd(B)
1850            (#xce5 . ?,He(B)
1851            (#xce6 . ?,Hf(B)
1852            (#xce7 . ?,Hg(B)
1853            (#xce8 . ?,Hh(B)
1854            (#xce9 . ?,Hi(B)
1855            (#xcea . ?,Hj(B)
1856            (#xceb . ?,Hk(B)
1857            (#xcec . ?,Hl(B)
1858            (#xced . ?,Hm(B)
1859            (#xcee . ?,Hn(B)
1860            (#xcef . ?,Ho(B)
1861            (#xcf0 . ?,Hp(B)
1862            (#xcf1 . ?,Hq(B)
1863            (#xcf2 . ?,Hr(B)
1864            (#xcf3 . ?,Hs(B)
1865            (#xcf4 . ?,Ht(B)
1866            (#xcf5 . ?,Hu(B)
1867            (#xcf6 . ?,Hv(B)
1868            (#xcf7 . ?,Hw(B)
1869            (#xcf8 . ?,Hx(B)
1870            (#xcf9 . ?,Hy(B)
1871            (#xcfa . ?,Hz(B)
1872            ;; Thai
1873            (#xda1 . ?,T!(B)
1874            (#xda2 . ?,T"(B)
1875            (#xda3 . ?,T#(B)
1876            (#xda4 . ?,T$(B)
1877            (#xda5 . ?,T%(B)
1878            (#xda6 . ?,T&(B)
1879            (#xda7 . ?,T'(B)
1880            (#xda8 . ?,T((B)
1881            (#xda9 . ?,T)(B)
1882            (#xdaa . ?,T*(B)
1883            (#xdab . ?,T+(B)
1884            (#xdac . ?,T,(B)
1885            (#xdad . ?,T-(B)
1886            (#xdae . ?,T.(B)
1887            (#xdaf . ?,T/(B)
1888            (#xdb0 . ?,T0(B)
1889            (#xdb1 . ?,T1(B)
1890            (#xdb2 . ?,T2(B)
1891            (#xdb3 . ?,T3(B)
1892            (#xdb4 . ?,T4(B)
1893            (#xdb5 . ?,T5(B)
1894            (#xdb6 . ?,T6(B)
1895            (#xdb7 . ?,T7(B)
1896            (#xdb8 . ?,T8(B)
1897            (#xdb9 . ?,T9(B)
1898            (#xdba . ?,T:(B)
1899            (#xdbb . ?,T;(B)
1900            (#xdbc . ?,T<(B)
1901            (#xdbd . ?,T=(B)
1902            (#xdbe . ?,T>(B)
1903            (#xdbf . ?,T?(B)
1904            (#xdc0 . ?,T@(B)
1905            (#xdc1 . ?,TA(B)
1906            (#xdc2 . ?,TB(B)
1907            (#xdc3 . ?,TC(B)
1908            (#xdc4 . ?,TD(B)
1909            (#xdc5 . ?,TE(B)
1910            (#xdc6 . ?,TF(B)
1911            (#xdc7 . ?,TG(B)
1912            (#xdc8 . ?,TH(B)
1913            (#xdc9 . ?,TI(B)
1914            (#xdca . ?,TJ(B)
1915            (#xdcb . ?,TK(B)
1916            (#xdcc . ?,TL(B)
1917            (#xdcd . ?,TM(B)
1918            (#xdce . ?,TN(B)
1919            (#xdcf . ?,TO(B)
1920            (#xdd0 . ?,TP(B)
1921            (#xdd1 . ?,TQ(B)
1922            (#xdd2 . ?,TR(B)
1923            (#xdd3 . ?,TS(B)
1924            (#xdd4 . ?,TT(B)
1925            (#xdd5 . ?,TU(B)
1926            (#xdd6 . ?,TV(B)
1927            (#xdd7 . ?,TW(B)
1928            (#xdd8 . ?,TX(B)
1929            (#xdd9 . ?,TY(B)
1930            (#xdda . ?,TZ(B)
1931            (#xddf . ?,T_(B)
1932            (#xde0 . ?,T`(B)
1933            (#xde1 . ?,Ta(B)
1934            (#xde2 . ?,Tb(B)
1935            (#xde3 . ?,Tc(B)
1936            (#xde4 . ?,Td(B)
1937            (#xde5 . ?,Te(B)
1938            (#xde6 . ?,Tf(B)
1939            (#xde7 . ?,Tg(B)
1940            (#xde8 . ?,Th(B)
1941            (#xde9 . ?,Ti(B)
1942            (#xdea . ?,Tj(B)
1943            (#xdeb . ?,Tk(B)
1944            (#xdec . ?,Tl(B)
1945            (#xded . ?,Tm(B)
1946            (#xdf0 . ?,Tp(B)
1947            (#xdf1 . ?,Tq(B)
1948            (#xdf2 . ?,Tr(B)
1949            (#xdf3 . ?,Ts(B)
1950            (#xdf4 . ?,Tt(B)
1951            (#xdf5 . ?,Tu(B)
1952            (#xdf6 . ?,Tv(B)
1953            (#xdf7 . ?,Tw(B)
1954            (#xdf8 . ?,Tx(B)
1955            (#xdf9 . ?,Ty(B)
1956            ;; Korean
1957            (#xea1 . ?$(C$!(B)
1958            (#xea2 . ?$(C$"(B)
1959            (#xea3 . ?$(C$#(B)
1960            (#xea4 . ?$(C$$(B)
1961            (#xea5 . ?$(C$%(B)
1962            (#xea6 . ?$(C$&(B)
1963            (#xea7 . ?$(C$'(B)
1964            (#xea8 . ?$(C$((B)
1965            (#xea9 . ?$(C$)(B)
1966            (#xeaa . ?$(C$*(B)
1967            (#xeab . ?$(C$+(B)
1968            (#xeac . ?$(C$,(B)
1969            (#xead . ?$(C$-(B)
1970            (#xeae . ?$(C$.(B)
1971            (#xeaf . ?$(C$/(B)
1972            (#xeb0 . ?$(C$0(B)
1973            (#xeb1 . ?$(C$1(B)
1974            (#xeb2 . ?$(C$2(B)
1975            (#xeb3 . ?$(C$3(B)
1976            (#xeb4 . ?$(C$4(B)
1977            (#xeb5 . ?$(C$5(B)
1978            (#xeb6 . ?$(C$6(B)
1979            (#xeb7 . ?$(C$7(B)
1980            (#xeb8 . ?$(C$8(B)
1981            (#xeb9 . ?$(C$9(B)
1982            (#xeba . ?$(C$:(B)
1983            (#xebb . ?$(C$;(B)
1984            (#xebc . ?$(C$<(B)
1985            (#xebd . ?$(C$=(B)
1986            (#xebe . ?$(C$>(B)
1987            (#xebf . ?$(C$?(B)
1988            (#xec0 . ?$(C$@(B)
1989            (#xec1 . ?$(C$A(B)
1990            (#xec2 . ?$(C$B(B)
1991            (#xec3 . ?$(C$C(B)
1992            (#xec4 . ?$(C$D(B)
1993            (#xec5 . ?$(C$E(B)
1994            (#xec6 . ?$(C$F(B)
1995            (#xec7 . ?$(C$G(B)
1996            (#xec8 . ?$(C$H(B)
1997            (#xec9 . ?$(C$I(B)
1998            (#xeca . ?$(C$J(B)
1999            (#xecb . ?$(C$K(B)
2000            (#xecc . ?$(C$L(B)
2001            (#xecd . ?$(C$M(B)
2002            (#xece . ?$(C$N(B)
2003            (#xecf . ?$(C$O(B)
2004            (#xed0 . ?$(C$P(B)
2005            (#xed1 . ?$(C$Q(B)
2006            (#xed2 . ?$(C$R(B)
2007            (#xed3 . ?$(C$S(B)
2008            (#xed4 . ?$,1LH(B)
2009            (#xed5 . ?$,1LI(B)
2010            (#xed6 . ?$,1LJ(B)
2011            (#xed7 . ?$,1LK(B)
2012            (#xed8 . ?$,1LL(B)
2013            (#xed9 . ?$,1LM(B)
2014            (#xeda . ?$,1LN(B)
2015            (#xedb . ?$,1LO(B)
2016            (#xedc . ?$,1LP(B)
2017            (#xedd . ?$,1LQ(B)
2018            (#xede . ?$,1LR(B)
2019            (#xedf . ?$,1LS(B)
2020            (#xee0 . ?$,1LT(B)
2021            (#xee1 . ?$,1LU(B)
2022            (#xee2 . ?$,1LV(B)
2023            (#xee3 . ?$,1LW(B)
2024            (#xee4 . ?$,1LX(B)
2025            (#xee5 . ?$,1LY(B)
2026            (#xee6 . ?$,1LZ(B)
2027            (#xee7 . ?$,1L[(B)
2028            (#xee8 . ?$,1L\(B)
2029            (#xee9 . ?$,1L](B)
2030            (#xeea . ?$,1L^(B)
2031            (#xeeb . ?$,1L_(B)
2032            (#xeec . ?$,1L`(B)
2033            (#xeed . ?$,1La(B)
2034            (#xeee . ?$,1Lb(B)
2035            (#xeef . ?$(C$](B)
2036            (#xef0 . ?$(C$a(B)
2037            (#xef1 . ?$(C$h(B)
2038            (#xef2 . ?$(C$o(B)
2039            (#xef3 . ?$(C$q(B)
2040            (#xef4 . ?$(C$t(B)
2041            (#xef5 . ?$(C$v(B)
2042            (#xef6 . ?$(C$}(B)
2043            (#xef7 . ?$(C$~(B)
2044            (#xef8 . ?$,1M+(B)
2045            (#xef9 . ?$,1M0(B)
2046            (#xefa . ?$,1M9(B)
2047            (#xeff . ?$,1tI(B)
2048            ;; Latin-5
2049            ;; Latin-6
2050            ;; Latin-7
2051            ;; Latin-8
2052            ;; Latin-9
2053            (#x13bc . ?,b<(B)
2054            (#x13bd . ?,b=(B)
2055            (#x13be . ?,b>(B)
2056            ;; Currency
2057            (#x20a0 . ?$,1t@(B)
2058            (#x20a1 . ?$,1tA(B)
2059            (#x20a2 . ?$,1tB(B)
2060            (#x20a3 . ?$,1tC(B)
2061            (#x20a4 . ?$,1tD(B)
2062            (#x20a5 . ?$,1tE(B)
2063            (#x20a6 . ?$,1tF(B)
2064            (#x20a7 . ?$,1tG(B)
2065            (#x20a8 . ?$,1tH(B)
2066            (#x20aa . ?$,1tJ(B)
2067            (#x20ab . ?$,1tK(B)
2068            (#x20ac . ?,b$(B)))
2069      (puthash (car pair) (cdr pair) x-keysym-table))
2070    
2071    ;; The following keysym codes for graphics are listed in the document
2072    ;; as not having unicodes available:
2073    
2074    ;; #x08b1       TOP LEFT SUMMATION      Technical
2075    ;; #x08b2       BOTTOM LEFT SUMMATION   Technical
2076    ;; #x08b3       TOP VERTICAL SUMMATION CONNECTOR        Technical
2077    ;; #x08b4       BOTTOM VERTICAL SUMMATION CONNECTOR     Technical
2078    ;; #x08b5       TOP RIGHT SUMMATION     Technical
2079    ;; #x08b6       BOTTOM RIGHT SUMMATION  Technical
2080    ;; #x08b7       RIGHT MIDDLE SUMMATION  Technical
2081    ;; #x0aac       SIGNIFICANT BLANK SYMBOL        Publish
2082    ;; #x0abd       DECIMAL POINT   Publish
2083    ;; #x0abf       MARKER  Publish
2084    ;; #x0acb       TRADEMARK SIGN IN CIRCLE        Publish
2085    ;; #x0ada       HEXAGRAM        Publish
2086    ;; #x0aff       CURSOR  Publish
2087    ;; #x0dde       THAI MAIHANAKAT Thai
2088    
2089    
2090  ;;;; Selections and cut buffers  ;;;; Selections and cut buffers
2091    
# Line 1273  as returned by (x-server-vendor)." Line 2098  as returned by (x-server-vendor)."
2098  (defvar x-last-selected-text-clipboard nil  (defvar x-last-selected-text-clipboard nil
2099    "The value of the CLIPBOARD X selection last time we selected or    "The value of the CLIPBOARD X selection last time we selected or
2100  pasted text.")  pasted text.")
2101  (defvar x-last-selected-text-primary   nil  (defvar x-last-selected-text-primary nil
2102    "The value of the PRIMARY X selection last time we selected or    "The value of the PRIMARY X selection last time we selected or
2103  pasted text.")  pasted text.")
2104  (defvar x-last-selected-text-cut       nil  (defvar x-last-selected-text-cut nil
2105    "The vaue of the X cut buffer last time we selected or    "The value of the X cut buffer last time we selected or pasted text.")
 pasted text.")  
2106    
2107  ;;; It is said that overlarge strings are slow to put into the cut buffer.  ;;; It is said that overlarge strings are slow to put into the cut buffer.
2108  ;;; Note this value is overridden below.  ;;; Note this value is overridden below.
# Line 1302  This is in addition to, but in preferenc Line 2126  This is in addition to, but in preferenc
2126    (cond ((>= (length text) x-cut-buffer-max)    (cond ((>= (length text) x-cut-buffer-max)
2127           (x-set-cut-buffer "" push)           (x-set-cut-buffer "" push)
2128           (setq x-last-selected-text-cut ""))           (setq x-last-selected-text-cut ""))
2129          (t          ;; Don't store a multibyte string that contains
2130        (x-set-cut-buffer text push)          ;; eight-bit-control/graphic chars because they can't be
2131            ;; restored correctly by x-get-cut-buffer.
2132            ((and (multibyte-string-p text)
2133                  (let ((charsets (find-charset-string text)))
2134                    (or (memq 'eight-bit-control charsets)
2135                        (memq 'eight-bit-graphic charsets))))
2136             (x-set-cut-buffer "" push)
2137             (setq x-last-selected-text-cut ""))
2138            (t
2139             (x-set-cut-buffer text push)
2140           (setq x-last-selected-text-cut text)))           (setq x-last-selected-text-cut text)))
2141    (x-set-selection 'PRIMARY text)    (x-set-selection 'PRIMARY text)
2142    (setq x-last-selected-text-primary text)    (setq x-last-selected-text-primary text)
2143    (when x-select-enable-clipboard    (when x-select-enable-clipboard
2144        (x-set-selection 'CLIPBOARD text)      (x-set-selection 'CLIPBOARD text)
2145        (setq x-last-selected-text-clipboard text))      (setq x-last-selected-text-clipboard text))
2146    )    )
2147    
2148  ;;; Return the value of the current X selection.  ;;; Return the value of the current X selection.
# Line 1322  This is in addition to, but in preferenc Line 2155  This is in addition to, but in preferenc
2155    (let (clip-text primary-text cut-text)    (let (clip-text primary-text cut-text)
2156      (when x-select-enable-clipboard      (when x-select-enable-clipboard
2157        ;; Don't die if x-get-selection signals an error.        ;; Don't die if x-get-selection signals an error.
2158        (if (null clip-text)        (if (null clip-text)
2159            (condition-case c            (condition-case c
2160                (setq clip-text (x-get-selection 'CLIPBOARD 'COMPOUND_TEXT))                (setq clip-text (x-get-selection 'CLIPBOARD 'COMPOUND_TEXT))
2161              (error nil)))              (error nil)))
2162        (if (null clip-text)        (if (null clip-text)
2163            (condition-case c            (condition-case c
2164                (setq clip-text (x-get-selection 'CLIPBOARD 'STRING))                (setq clip-text (x-get-selection 'CLIPBOARD 'STRING))
2165              (error nil)))              (error nil)))
# Line 1335  This is in addition to, but in preferenc Line 2168  This is in addition to, but in preferenc
2168        ;; Check the CLIPBOARD selection for 'newness', is it different        ;; Check the CLIPBOARD selection for 'newness', is it different
2169        ;; from what we remebered them to be last time we did a        ;; from what we remebered them to be last time we did a
2170        ;; cut/paste operation.        ;; cut/paste operation.
2171        (setq clip-text        (setq clip-text
2172              (cond;; check clipboard              (cond;; check clipboard
2173               ((or (not clip-text) (string= clip-text ""))               ((or (not clip-text) (string= clip-text ""))
2174                (setq x-last-selected-text-clipboard nil))                (setq x-last-selected-text-clipboard nil))
2175               ((eq      clip-text x-last-selected-text-clipboard) nil)               ((eq      clip-text x-last-selected-text-clipboard) nil)
2176               ((string= clip-text x-last-selected-text-clipboard)               ((string= clip-text x-last-selected-text-clipboard)
2177                ;; Record the newer string,                ;; Record the newer string,
2178                ;; so subsequent calls can use the `eq' test.                ;; so subsequent calls can use the `eq' test.
2179                (setq x-last-selected-text-clipboard clip-text)                (setq x-last-selected-text-clipboard clip-text)
2180                nil)                nil)
# Line 1350  This is in addition to, but in preferenc Line 2183  This is in addition to, but in preferenc
2183        )        )
2184    
2185      ;; Don't die if x-get-selection signals an error.      ;; Don't die if x-get-selection signals an error.
2186      (if (null primary-text)      (if (null primary-text)
2187          (condition-case c          (condition-case c
2188              (setq primary-text (x-get-selection 'PRIMARY 'COMPOUND_TEXT))              (setq primary-text (x-get-selection 'PRIMARY 'COMPOUND_TEXT))
2189            (error nil)))            (error nil)))
2190      (if (null primary-text)      (if (null primary-text)
2191          (condition-case c          (condition-case c
2192              (setq primary-text (x-get-selection 'PRIMARY 'STRING))              (setq primary-text (x-get-selection 'PRIMARY 'STRING))
2193            (error nil)))            (error nil)))
2194      ;; Check the PRIMARY selection for 'newness', is it different      ;; Check the PRIMARY selection for 'newness', is it different
2195      ;; from what we remebered them to be last time we did a      ;; from what we remebered them to be last time we did a
2196      ;; cut/paste operation.      ;; cut/paste operation.
2197      (setq primary-text      (setq primary-text
2198            (cond;; check primary selection            (cond;; check primary selection
2199             ((or (not primary-text) (string= primary-text ""))             ((or (not primary-text) (string= primary-text ""))
2200              (setq x-last-selected-text-primary nil))              (setq x-last-selected-text-primary nil))
2201             ((eq      primary-text x-last-selected-text-primary) nil)             ((eq      primary-text x-last-selected-text-primary) nil)
2202             ((string= primary-text x-last-selected-text-primary)             ((string= primary-text x-last-selected-text-primary)
2203              ;; Record the newer string,              ;; Record the newer string,
2204              ;; so subsequent calls can use the `eq' test.              ;; so subsequent calls can use the `eq' test.
2205              (setq x-last-selected-text-primary primary-text)              (setq x-last-selected-text-primary primary-text)
2206              nil)              nil)
# Line 1379  This is in addition to, but in preferenc Line 2212  This is in addition to, but in preferenc
2212      ;; Check the x cut buffer for 'newness', is it different      ;; Check the x cut buffer for 'newness', is it different
2213      ;; from what we remebered them to be last time we did a      ;; from what we remebered them to be last time we did a
2214      ;; cut/paste operation.      ;; cut/paste operation.
2215      (setq cut-text      (setq cut-text
2216            (cond;; check primary selection            (cond;; check primary selection
2217             ((or (not cut-text) (string= cut-text ""))             ((or (not cut-text) (string= cut-text ""))
2218              (setq x-last-selected-text-cut nil))              (setq x-last-selected-text-cut nil))
2219             ((eq      cut-text x-last-selected-text-cut) nil)             ((eq      cut-text x-last-selected-text-cut) nil)
2220             ((string= cut-text x-last-selected-text-cut)             ((string= cut-text x-last-selected-text-cut)
2221              ;; Record the newer string,              ;; Record the newer string,
2222              ;; so subsequent calls can use the `eq' test.              ;; so subsequent calls can use the `eq' test.
2223              (setq x-last-selected-text-cut cut-text)              (setq x-last-selected-text-cut cut-text)
2224        nil)        nil)
# Line 1406  This is in addition to, but in preferenc Line 2239  This is in addition to, but in preferenc
2239      ;; timestamps there is no way to know what the 'correct' value to      ;; timestamps there is no way to know what the 'correct' value to
2240      ;; return is.  The nice thing to do would be to tell the user we      ;; return is.  The nice thing to do would be to tell the user we
2241      ;; saw multiple possible selections and ask the user which was the      ;; saw multiple possible selections and ask the user which was the
2242      ;; one they wanted.        ;; one they wanted.
2243      ;; This code is still a big improvement because now the user can      ;; This code is still a big improvement because now the user can
2244      ;; futz with the current selection and get emacs to pay attention      ;; futz with the current selection and get emacs to pay attention
2245      ;; to the cut buffer again (previously as soon as clipboard or      ;; to the cut buffer again (previously as soon as clipboard or
# Line 1431  This is in addition to, but in preferenc Line 2264  This is in addition to, but in preferenc
2264        (while (setq i (string-match "[.*]" x-resource-name))        (while (setq i (string-match "[.*]" x-resource-name))
2265          (aset x-resource-name i ?-))))          (aset x-resource-name i ?-))))
2266    
2267  ;; For the benefit of older Emacses (19.27 and earlier) that are sharing  (x-open-connection (or x-display-name
2268  ;; the same lisp directory, don't pass the third argument unless we seem                         (setq x-display-name (getenv "DISPLAY")))
2269  ;; to have the multi-display support.                     x-command-line-resources
2270  (if (fboundp 'x-close-connection)                     ;; Exit Emacs with fatal error if this fails.
2271      (x-open-connection (or x-display-name                     t)
                            (setq x-display-name (getenv "DISPLAY")))  
                        x-command-line-resources  
                        ;; Exit Emacs with fatal error if this fails.  
                        t)  
   (x-open-connection (or x-display-name  
                          (setq x-display-name (getenv "DISPLAY")))  
                      x-command-line-resources))  
2272    
2273  (setq frame-creation-function 'x-create-frame-with-faces)  (setq frame-creation-function 'x-create-frame-with-faces)
2274    
2275  (setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)  (setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
2276                              x-cut-buffer-max))                              x-cut-buffer-max))
2277    
2278  (if (fboundp 'new-fontset)  ;; Setup the default fontset.
2279      (progn  (setup-default-fontset)
2280        ;; Create the standard fontset.  
2281        (create-fontset-from-fontset-spec standard-fontset-spec t)  ;; Create the standard fontset.
2282    (create-fontset-from-fontset-spec standard-fontset-spec t)
2283        ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).  
2284        (create-fontset-from-x-resource)  ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
2285    (create-fontset-from-x-resource)
2286        ;; Try to create a fontset from a font specification which comes  
2287        ;; from initial-frame-alist, default-frame-alist, or X resource.  ;; Try to create a fontset from a font specification which comes
2288        ;; A font specification in command line argument (i.e. -fn XXXX)  ;; from initial-frame-alist, default-frame-alist, or X resource.
2289        ;; should be already in default-frame-alist as a `font'  ;; A font specification in command line argument (i.e. -fn XXXX)
2290        ;; parameter.  However, any font specifications in site-start  ;; should be already in default-frame-alist as a `font'
2291        ;; library, user's init file (.emacs), and default.el are not  ;; parameter.  However, any font specifications in site-start
2292        ;; yet handled here.  ;; library, user's init file (.emacs), and default.el are not
2293    ;; yet handled here.
2294        (let ((font (or (cdr (assq 'font initial-frame-alist))  
2295                        (cdr (assq 'font default-frame-alist))  (let ((font (or (cdr (assq 'font initial-frame-alist))
2296                        (x-get-resource "font" "Font")))                  (cdr (assq 'font default-frame-alist))
2297              xlfd-fields resolved-name)                  (x-get-resource "font" "Font")))
2298          (if (and font        xlfd-fields resolved-name)
2299                   (not (query-fontset font))    (if (and font
2300                   (setq resolved-name (x-resolve-font-name font))             (not (query-fontset font))
2301                   (setq xlfd-fields (x-decompose-font-name font)))             (setq resolved-name (x-resolve-font-name font))
2302              (if (string= "fontset"             (setq xlfd-fields (x-decompose-font-name font)))
2303                           (aref xlfd-fields xlfd-regexp-registry-subnum))        (if (string= "fontset" (aref xlfd-fields xlfd-regexp-registry-subnum))
2304                  (new-fontset font (x-complement-fontset-spec xlfd-fields nil))            (new-fontset font (x-complement-fontset-spec xlfd-fields nil))
2305                ;; Create a fontset from FONT.  The fontset name is          ;; Create a fontset from FONT.  The fontset name is
2306                ;; generated from FONT.          ;; generated from FONT.
2307                (create-fontset-from-ascii-font font          (create-fontset-from-ascii-font font resolved-name "startup"))))
                                               resolved-name "startup"))))))  
2308    
2309  ;; Sun expects the menu bar cut and paste commands to use the clipboard.  ;; Sun expects the menu bar cut and paste commands to use the clipboard.
2310  ;; This has ,? to match both on Sunos and on Solaris.  ;; This has ,? to match both on Sunos and on Solaris.
# Line 1528  This is in addition to, but in preferenc Line 2353  This is in addition to, but in preferenc
2353        (setq x-selection-timeout (string-to-number res-selection-timeout))))        (setq x-selection-timeout (string-to-number res-selection-timeout))))
2354    
2355  (defun x-win-suspend-error ()  (defun x-win-suspend-error ()
2356    (error "Suspending an emacs running under X makes no sense"))    (error "Suspending an Emacs running under X makes no sense"))
2357  (add-hook 'suspend-hook 'x-win-suspend-error)  (add-hook 'suspend-hook 'x-win-suspend-error)
2358    
2359  ;;; Arrange for the kill and yank functions to set and check the clipboard.  ;;; Arrange for the kill and yank functions to set and check the clipboard.

Legend:
Removed from v.1.155  
changed lines
  Added in v.1.155.2.1

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26