Mercurial > emacs
comparison lisp/w32-fns.el @ 64563:3a895c8815ed
(w32-shell-name): Use `bound-and-true-p'.
(x-select-text, set-w32-system-coding-system, w32-add-charset-info):
Fix typos in docstrings.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Thu, 21 Jul 2005 10:51:10 +0000 |
parents | 6fb026ad601f |
children | 41bb365f41c4 187d6a1f84f7 |
comparison
equal
deleted
inserted
replaced
64562:e54d85f535eb | 64563:3a895c8815ed |
---|---|
1 ;;; w32-fns.el --- Lisp routines for Windows NT | 1 ;;; w32-fns.el --- Lisp routines for Windows NT |
2 | 2 |
3 ;; Copyright (C) 1994, 2001, 2004 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1994, 2001, 2004, 2005 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: Geoff Voelker <voelker@cs.washington.edu> | 5 ;; Author: Geoff Voelker <voelker@cs.washington.edu> |
6 ;; Keywords: internal | 6 ;; Keywords: internal |
7 | 7 |
8 ;; This file is part of GNU Emacs. | 8 ;; This file is part of GNU Emacs. |
58 That includes all Windows systems except for 9X/Me." | 58 That includes all Windows systems except for 9X/Me." |
59 (and (eq system-type 'windows-nt) (getenv "SystemRoot"))) | 59 (and (eq system-type 'windows-nt) (getenv "SystemRoot"))) |
60 | 60 |
61 (defun w32-shell-name () | 61 (defun w32-shell-name () |
62 "Return the name of the shell being used." | 62 "Return the name of the shell being used." |
63 (or (and (boundp 'explicit-shell-file-name) explicit-shell-file-name) | 63 (or (bound-and-true-p explicit-shell-file-name) |
64 (getenv "ESHELL") | 64 (getenv "ESHELL") |
65 (getenv "SHELL") | 65 (getenv "SHELL") |
66 (and (w32-using-nt) "cmd.exe") | 66 (and (w32-using-nt) "cmd.exe") |
67 "command.com")) | 67 "command.com")) |
68 | 68 |
270 (get 'x-selections type)) | 270 (get 'x-selections type)) |
271 | 271 |
272 (defun set-w32-system-coding-system (coding-system) | 272 (defun set-w32-system-coding-system (coding-system) |
273 "Set the coding system used by the Windows system to CODING-SYSTEM. | 273 "Set the coding system used by the Windows system to CODING-SYSTEM. |
274 This is used for things like passing font names with non-ASCII | 274 This is used for things like passing font names with non-ASCII |
275 characters in them to the system. For a list of possible values of | 275 characters in them to the system. For a list of possible values of |
276 CODING-SYSTEM, use \\[list-coding-systems]. | 276 CODING-SYSTEM, use \\[list-coding-systems]. |
277 | 277 |
278 This function is provided for backward compatibility, since | 278 This function is provided for backward compatibility, since |
279 `w32-system-coding-system' is now an alias for `locale-coding-system'." | 279 `w32-system-coding-system' is now an alias for `locale-coding-system'." |
280 (interactive | 280 (interactive |
353 (defun w32-add-charset-info (xlfd-charset windows-charset codepage) | 353 (defun w32-add-charset-info (xlfd-charset windows-charset codepage) |
354 "Function to add character sets to display with Windows fonts. | 354 "Function to add character sets to display with Windows fonts. |
355 Creates entries in `w32-charset-info-alist'. | 355 Creates entries in `w32-charset-info-alist'. |
356 XLFD-CHARSET is a string which will appear in the XLFD font name to | 356 XLFD-CHARSET is a string which will appear in the XLFD font name to |
357 identify the character set. WINDOWS-CHARSET is a symbol identifying | 357 identify the character set. WINDOWS-CHARSET is a symbol identifying |
358 the Windows character set this maps to. For the list of possible | 358 the Windows character set this maps to. For the list of possible |
359 values, see the documentation for `w32-charset-info-alist'. CODEPAGE | 359 values, see the documentation for `w32-charset-info-alist'. CODEPAGE |
360 can be a numeric codepage that Windows uses to display the character | 360 can be a numeric codepage that Windows uses to display the character |
361 set, t for Unicode output with no codepage translation or nil for 8 | 361 set, t for Unicode output with no codepage translation or nil for 8 |
362 bit output with no translation." | 362 bit output with no translation." |
363 (add-to-list 'w32-charset-info-alist | 363 (add-to-list 'w32-charset-info-alist |
364 (cons xlfd-charset (cons windows-charset codepage))) | 364 (cons xlfd-charset (cons windows-charset codepage))) |
419 "Max number of characters to put in the cut buffer.") | 419 "Max number of characters to put in the cut buffer.") |
420 | 420 |
421 (defun x-select-text (text &optional push) | 421 (defun x-select-text (text &optional push) |
422 "Make TEXT the last selected text. | 422 "Make TEXT the last selected text. |
423 If `x-select-enable-clipboard' is non-nil, copy the text to the system | 423 If `x-select-enable-clipboard' is non-nil, copy the text to the system |
424 clipboard as well. Optional PUSH is ignored on Windows." | 424 clipboard as well. Optional PUSH is ignored on Windows." |
425 (if x-select-enable-clipboard | 425 (if x-select-enable-clipboard |
426 (w32-set-clipboard-data text)) | 426 (w32-set-clipboard-data text)) |
427 (setq x-last-selected-text text)) | 427 (setq x-last-selected-text text)) |
428 | 428 |
429 (defun x-get-selection-value () | 429 (defun x-get-selection-value () |