Mercurial > emacs
comparison lisp/term/w32-win.el @ 42848:4313f287da4d
Move user variables to w32-vars.el and make them defcustoms.
Use w32-list-proportional-fonts.
author | Jason Rumney <jasonr@gnu.org> |
---|---|
date | Sun, 20 Jan 2002 15:34:00 +0000 |
parents | c9282c43bb5a |
children | bf151fa5d915 |
comparison
equal
deleted
inserted
replaced
42847:094039817cba | 42848:4313f287da4d |
---|---|
80 (if (fboundp 'new-fontset) | 80 (if (fboundp 'new-fontset) |
81 (require 'fontset)) | 81 (require 'fontset)) |
82 | 82 |
83 ;; The following definition is used for debugging scroll bar events. | 83 ;; The following definition is used for debugging scroll bar events. |
84 ;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event)) | 84 ;(defun w32-handle-scroll-bar-event (event) (interactive "e") (princ event)) |
85 | |
86 (defvar mouse-wheel-scroll-amount 4 | |
87 "*Number of lines to scroll per click of the mouse wheel.") | |
88 | 85 |
89 (defun mouse-wheel-scroll-line (event) | 86 (defun mouse-wheel-scroll-line (event) |
90 "Scroll the window in which EVENT occurred by `mouse-wheel-scroll-amount'." | 87 "Scroll the window in which EVENT occurred by `mouse-wheel-scroll-amount'." |
91 (interactive "e") | 88 (interactive "e") |
92 (condition-case nil | 89 (condition-case nil |
1296 (t | 1293 (t |
1297 (read-string (concat prompt " " (symbol-name face) " to: ") | 1294 (read-string (concat prompt " " (symbol-name face) " to: ") |
1298 nil nil default)))) | 1295 nil nil default)))) |
1299 (list face (if (equal value "") nil value)))) | 1296 (list face (if (equal value "") nil value)))) |
1300 | 1297 |
1301 ;; Redefine the font selection to use the standard W32 dialog | |
1302 (defvar w32-use-w32-font-dialog t | |
1303 "*Use the standard font dialog if 't'. | |
1304 Otherwise pop up a menu of some standard fonts like X does - including | |
1305 fontsets.") | |
1306 | |
1307 (defvar w32-fixed-font-alist | |
1308 '("Font menu" | |
1309 ("Misc" | |
1310 ;; For these, we specify the pixel height and width. | |
1311 ("fixed" "Fixedsys") | |
1312 ("") | |
1313 ("Terminal 5x4" | |
1314 "-*-Terminal-normal-r-*-*-*-45-*-*-c-40-*-oem") | |
1315 ("Terminal 6x8" | |
1316 "-*-Terminal-normal-r-*-*-*-60-*-*-c-80-*-oem") | |
1317 ("Terminal 9x5" | |
1318 "-*-Terminal-normal-r-*-*-*-90-*-*-c-50-*-oem") | |
1319 ("Terminal 9x7" | |
1320 "-*-Terminal-normal-r-*-*-*-90-*-*-c-70-*-oem") | |
1321 ("Terminal 9x8" | |
1322 "-*-Terminal-normal-r-*-*-*-90-*-*-c-80-*-oem") | |
1323 ("Terminal 12x12" | |
1324 "-*-Terminal-normal-r-*-*-*-120-*-*-c-120-*-oem") | |
1325 ("Terminal 14x10" | |
1326 "-*-Terminal-normal-r-*-*-*-135-*-*-c-100-*-oem") | |
1327 ("Terminal 6x6 Bold" | |
1328 "-*-Terminal-bold-r-*-*-*-60-*-*-c-60-*-oem") | |
1329 ("") | |
1330 ("Lucida Sans Typewriter.8" | |
1331 "-*-Lucida Sans Typewriter-normal-r-*-*-11-*-*-*-c-*-iso8859-1") | |
1332 ("Lucida Sans Typewriter.9" | |
1333 "-*-Lucida Sans Typewriter-normal-r-*-*-12-*-*-*-c-*-iso8859-1") | |
1334 ("Lucida Sans Typewriter.10" | |
1335 "-*-Lucida Sans Typewriter-normal-r-*-*-13-*-*-*-c-*-iso8859-1") | |
1336 ("Lucida Sans Typewriter.11" | |
1337 "-*-Lucida Sans Typewriter-normal-r-*-*-15-*-*-*-c-*-iso8859-1") | |
1338 ("Lucida Sans Typewriter.12" | |
1339 "-*-Lucida Sans Typewriter-normal-r-*-*-16-*-*-*-c-*-iso8859-1") | |
1340 ("Lucida Sans Typewriter.8 Bold" | |
1341 "-*-Lucida Sans Typewriter-semibold-r-*-*-11-*-*-*-c-*-iso8859-1") | |
1342 ("Lucida Sans Typewriter.9 Bold" | |
1343 "-*-Lucida Sans Typewriter-semibold-r-*-*-12-*-*-*-c-*-iso8859-1") | |
1344 ("Lucida Sans Typewriter.10 Bold" | |
1345 "-*-Lucida Sans Typewriter-semibold-r-*-*-13-*-*-*-c-*-iso8859-1") | |
1346 ("Lucida Sans Typewriter.11 Bold" | |
1347 "-*-Lucida Sans Typewriter-semibold-r-*-*-15-*-*-*-c-*-iso8859-1") | |
1348 ("Lucida Sans Typewriter.12 Bold" | |
1349 "-*-Lucida Sans Typewriter-semibold-r-*-*-16-*-*-*-c-*-iso8859-1")) | |
1350 ("Courier" | |
1351 ("Courier 10x8" | |
1352 "-*-Courier-*normal-r-*-*-*-97-*-*-c-80-iso8859-1") | |
1353 ("Courier 12x9" | |
1354 "-*-Courier-*normal-r-*-*-*-120-*-*-c-90-iso8859-1") | |
1355 ("Courier 15x12" | |
1356 "-*-Courier-*normal-r-*-*-*-150-*-*-c-120-iso8859-1") | |
1357 ;; For these, we specify the point height. | |
1358 ("") | |
1359 ("8" "-*-Courier New-normal-r-*-*-11-*-*-*-c-*-iso8859-1") | |
1360 ("9" "-*-Courier New-normal-r-*-*-12-*-*-*-c-*-iso8859-1") | |
1361 ("10" "-*-Courier New-normal-r-*-*-13-*-*-*-c-*-iso8859-1") | |
1362 ("11" "-*-Courier New-normal-r-*-*-15-*-*-*-c-*-iso8859-1") | |
1363 ("12" "-*-Courier New-normal-r-*-*-16-*-*-*-c-*-iso8859-1") | |
1364 ("8 bold" "-*-Courier New-bold-r-*-*-11-*-*-*-c-*-iso8859-1") | |
1365 ("9 bold" "-*-Courier New-bold-r-*-*-12-*-*-*-c-*-iso8859-1") | |
1366 ("10 bold" "-*-Courier New-bold-r-*-*-13-*-*-*-c-*-iso8859-1") | |
1367 ("11 bold" "-*-Courier New-bold-r-*-*-15-*-*-*-c-*-iso8859-1") | |
1368 ("12 bold" "-*-Courier New-bold-r-*-*-16-*-*-*-c-*-iso8859-1") | |
1369 ("8 italic" "-*-Courier New-normal-i-*-*-11-*-*-*-c-*-iso8859-1") | |
1370 ("9 italic" "-*-Courier New-normal-i-*-*-12-*-*-*-c-*-iso8859-1") | |
1371 ("10 italic" "-*-Courier New-normal-i-*-*-13-*-*-*-c-*-iso8859-1") | |
1372 ("11 italic" "-*-Courier New-normal-i-*-*-15-*-*-*-c-*-iso8859-1") | |
1373 ("12 italic" "-*-Courier New-normal-i-*-*-16-*-*-*-c-*-iso8859-1") | |
1374 ("8 bold italic" "-*-Courier New-bold-i-*-*-11-*-*-*-c-*-iso8859-1") | |
1375 ("9 bold italic" "-*-Courier New-bold-i-*-*-12-*-*-*-c-*-iso8859-1") | |
1376 ("10 bold italic" "-*-Courier New-bold-i-*-*-13-*-*-*-c-*-iso8859-1") | |
1377 ("11 bold italic" "-*-Courier New-bold-i-*-*-15-*-*-*-c-*-iso8859-1") | |
1378 ("12 bold italic" "-*-Courier New-bold-i-*-*-16-*-*-*-c-*-iso8859-1") | |
1379 )) | |
1380 "Fonts suitable for use in Emacs. | |
1381 Initially this is a list of some fixed width fonts that most people | |
1382 will have like Terminal and Courier. These fonts are used in the font | |
1383 menu if the variable `w32-use-w32-font-dialog' is nil.") | |
1384 | |
1385 ;;; Enable Japanese fonts on Windows to be used by default. | 1298 ;;; Enable Japanese fonts on Windows to be used by default. |
1386 (set-fontset-font t (make-char 'katakana-jisx0201) '("*" . "JISX0208-SJIS")) | 1299 (set-fontset-font t (make-char 'katakana-jisx0201) '("*" . "JISX0208-SJIS")) |
1387 (set-fontset-font t (make-char 'latin-jisx0201) '("*" . "JISX0208-SJIS")) | 1300 (set-fontset-font t (make-char 'latin-jisx0201) '("*" . "JISX0208-SJIS")) |
1388 (set-fontset-font t (make-char 'japanese-jisx0208) '("*" . "JISX0208-SJIS")) | 1301 (set-fontset-font t (make-char 'japanese-jisx0208) '("*" . "JISX0208-SJIS")) |
1389 (set-fontset-font t (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS")) | 1302 (set-fontset-font t (make-char 'japanese-jisx0208-1978) '("*" . "JISX0208-SJIS")) |
1394 font dialog to get the matching FONTS. Otherwise use a pop-up menu | 1307 font dialog to get the matching FONTS. Otherwise use a pop-up menu |
1395 \(like Emacs on other platforms) initialized with the fonts in | 1308 \(like Emacs on other platforms) initialized with the fonts in |
1396 `w32-fixed-font-alist'." | 1309 `w32-fixed-font-alist'." |
1397 (interactive | 1310 (interactive |
1398 (if w32-use-w32-font-dialog | 1311 (if w32-use-w32-font-dialog |
1399 (let ((chosen-font (w32-select-font))) | 1312 (let ((chosen-font (w32-select-font (selected-frame) |
1313 w32-list-proportional-fonts))) | |
1400 (and chosen-font (list chosen-font))) | 1314 (and chosen-font (list chosen-font))) |
1401 (x-popup-menu | 1315 (x-popup-menu |
1402 last-nonmenu-event | 1316 last-nonmenu-event |
1403 ;; Append list of fontsets currently defined. | 1317 ;; Append list of fontsets currently defined. |
1404 ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles | 1318 ;; Conditional on new-fontset so bootstrapping works on non-GUI compiles |