annotate lisp/dos-fns.el @ 15013:aad88afa6a0c libc-960413 libc-960414 libc-960415 libc-960416 libc-960417 libc-960418 libc-960419 libc-960420 libc-960421 libc-960422 libc-960423 libc-960424 libc-960425 libc-960426 libc-960427 libc-960428 libc-960429 libc-960430 libc-960501 libc-960502 libc-960503 libc-960504 libc-960505 libc-960506 libc-960507 libc-960508 libc-960509 libc-960510 libc-960511 libc-960512 libc-960513 libc-960514 libc-960515 libc-960516 libc-960517 libc-960518 libc-960519 libc-960520

* config.guess: Combine two OSF1 rules. Also recognize field test versions. From mjr@zk3.dec.com. * config.guess (dgux): Use /usr/bin/uname rather than uname, because GNU uname does not support -p. From pmr@pajato.com.
author Per Bothner <bothner@cygnus.com>
date Sat, 13 Apr 1996 00:06:54 +0000
parents 20f4c4a078b2
children d46c1e8bdb0d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
1 ;;; dos-fns.el --- MS-Dos specific functions.
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
2
14734
20f4c4a078b2 Comment change.
Richard M. Stallman <rms@gnu.org>
parents: 14380
diff changeset
3 ;; Copyright (C) 1991, 1993, 1995, 1996 Free Software Foundation, Inc.
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
4
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
5 ;; Maintainer: Morten Welinder (terra@diku.dk)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
6 ;; Keywords: internal
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
7
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
9
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
13 ;; any later version.
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
14
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
18 ;; GNU General Public License for more details.
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
19
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
14169
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14162
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14162
diff changeset
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
83f275dcd93a Update FSF's address.
Erik Naggum <erik@naggum.no>
parents: 14162
diff changeset
23 ;; Boston, MA 02111-1307, USA.
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
24
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
25 ;;; Commentary:
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
26
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
27 ;; Part of this code is taken from (or derived from) demacs.
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
28
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
29 ;;; Code:
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
30
13472
c51fb9c4c780 (mode-line-format): Modify it, don't override it entirely.
Richard M. Stallman <rms@gnu.org>
parents: 12253
diff changeset
31 ;;; Add %t: into the mode line format just after the open-paren.
13487
5cff4081b8a6 Fix previous change.
Richard M. Stallman <rms@gnu.org>
parents: 13472
diff changeset
32 (let ((tail (member " %[(" mode-line-format)))
13472
c51fb9c4c780 (mode-line-format): Modify it, don't override it entirely.
Richard M. Stallman <rms@gnu.org>
parents: 12253
diff changeset
33 (setcdr tail (cons (purecopy "%t:")
c51fb9c4c780 (mode-line-format): Modify it, don't override it entirely.
Richard M. Stallman <rms@gnu.org>
parents: 12253
diff changeset
34 (cdr tail))))
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
35
12253
5ff133dbb12f (path-separator, grep-null-device, grep-regexp-alist):
Richard M. Stallman <rms@gnu.org>
parents: 9572
diff changeset
36 ;; Use ";" instead of ":" as a path separator (from files.el).
5ff133dbb12f (path-separator, grep-null-device, grep-regexp-alist):
Richard M. Stallman <rms@gnu.org>
parents: 9572
diff changeset
37 (setq path-separator ";")
5ff133dbb12f (path-separator, grep-null-device, grep-regexp-alist):
Richard M. Stallman <rms@gnu.org>
parents: 9572
diff changeset
38
5ff133dbb12f (path-separator, grep-null-device, grep-regexp-alist):
Richard M. Stallman <rms@gnu.org>
parents: 9572
diff changeset
39 ;; Set the null device (for compile.el).
5ff133dbb12f (path-separator, grep-null-device, grep-regexp-alist):
Richard M. Stallman <rms@gnu.org>
parents: 9572
diff changeset
40 (setq grep-null-device "NUL")
5ff133dbb12f (path-separator, grep-null-device, grep-regexp-alist):
Richard M. Stallman <rms@gnu.org>
parents: 9572
diff changeset
41
5ff133dbb12f (path-separator, grep-null-device, grep-regexp-alist):
Richard M. Stallman <rms@gnu.org>
parents: 9572
diff changeset
42 ;; Set the grep regexp to match entries with drive letters.
5ff133dbb12f (path-separator, grep-null-device, grep-regexp-alist):
Richard M. Stallman <rms@gnu.org>
parents: 9572
diff changeset
43 (setq grep-regexp-alist
5ff133dbb12f (path-separator, grep-null-device, grep-regexp-alist):
Richard M. Stallman <rms@gnu.org>
parents: 9572
diff changeset
44 '(("^\\(\\([a-zA-Z]:\\)?[^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 3)))
5ff133dbb12f (path-separator, grep-null-device, grep-regexp-alist):
Richard M. Stallman <rms@gnu.org>
parents: 9572
diff changeset
45
13913
4e4201bcea5d (convert-standard-filename): New alternate definition.
Richard M. Stallman <rms@gnu.org>
parents: 13487
diff changeset
46 ;; This overrides a trivial definition in files.el.
4e4201bcea5d (convert-standard-filename): New alternate definition.
Richard M. Stallman <rms@gnu.org>
parents: 13487
diff changeset
47 (defun convert-standard-filename (filename)
4e4201bcea5d (convert-standard-filename): New alternate definition.
Richard M. Stallman <rms@gnu.org>
parents: 13487
diff changeset
48 "Convert a standard file's name to something suitable for the current OS.
4e4201bcea5d (convert-standard-filename): New alternate definition.
Richard M. Stallman <rms@gnu.org>
parents: 13487
diff changeset
49 This function's standard definition is trivial; it just returns the argument.
4e4201bcea5d (convert-standard-filename): New alternate definition.
Richard M. Stallman <rms@gnu.org>
parents: 13487
diff changeset
50 However, on some systems, the function is redefined
4e4201bcea5d (convert-standard-filename): New alternate definition.
Richard M. Stallman <rms@gnu.org>
parents: 13487
diff changeset
51 with a definition that really does change some file names."
14380
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
52 (let* ((dir (file-name-directory filename))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
53 (string (copy-sequence (file-name-nondirectory filename)))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
54 (lastchar (aref string (1- (length string))))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
55 i firstdot)
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
56 ;; If the argument is empty, just return it.
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
57 (if (or (not (stringp filename))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
58 (string= filename "")
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
59 (string= string ""))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
60 filename
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
61 (progn
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
62 ;; Change a leading period to a leading underscore.
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
63 (if (= (aref string 0) ?.)
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
64 (aset string 0 ?_))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
65 ;; Get rid of invalid characters.
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
66 (while (setq i (string-match
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
67 "[^-a-zA-Z0-9_.%~^$!#&{}@`'()\200-\376]"
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
68 string))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
69 (aset string i ?_))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
70 ;; If we don't have a period,
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
71 ;; and we have a dash or underscore that isn't the first char,
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
72 ;; change that to a period.
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
73 (if (and (not (string-match "\\." string))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
74 (setq i (string-match "[-_]" string 1)))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
75 (aset string i ?\.))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
76 ;; If we don't have a period in the first 8 chars, insert one.
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
77 (if (> (or (string-match "\\." string)
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
78 (length string))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
79 8)
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
80 (setq string
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
81 (concat (substring string 0 8)
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
82 "."
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
83 (substring string 8))))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
84 (setq firstdot (or (string-match "\\." string) (1- (length string))))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
85 ;; Truncate to 3 chars after the first period.
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
86 (if (> (length string) (+ firstdot 4))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
87 (setq string (substring string 0 (+ firstdot 4))))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
88 ;; Change all periods except the first one into underscores.
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
89 (while (string-match "\\." string (1+ firstdot))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
90 (setq i (string-match "\\." string (1+ firstdot)))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
91 (aset string i ?_))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
92 ;; If the last character of the original filename was `~',
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
93 ;; make sure the munged name ends with it also.
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
94 (if (equal lastchar ?~)
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
95 (aset string (1- (length string)) lastchar))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
96 (concat dir string)))))
13913
4e4201bcea5d (convert-standard-filename): New alternate definition.
Richard M. Stallman <rms@gnu.org>
parents: 13487
diff changeset
97
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
98 (defvar file-name-buffer-file-type-alist
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
99 '(
7087
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
100 ("[:/].*config.sys$" . nil) ; config.sys text
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
101 ("\\.elc$" . t) ; emacs stuff
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
102 ("\\.\\(obj\\|exe\\|com\\|lib\\|sys\\|chk\\|out\\|bin\\|ico\\|pif\\)$" . t)
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
103 ; MS-Dos stuff
7087
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
104 ("\\.\\(arc\\|zip\\|pak\\|lzh\\|zoo\\)$" . t)
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
105 ; Packers
7087
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
106 ("\\.\\(a\\|o\\|tar\\|z\\|gz\\|taz\\)$" . t)
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
107 ; Unix stuff
7087
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
108 ("\\.tp[ulpw]$" . t)
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
109 ; Borland Pascal stuff
7256
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
110 ("[:/]tags$" . t)
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
111 ; Emacs TAGS file
7087
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
112 )
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
113 "*Alist for distinguishing text files from binary files.
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
114 Each element has the form (REGEXP . TYPE), where REGEXP is matched
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
115 against the file name, and TYPE is nil for text, t for binary.")
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
116
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
117 (defun find-buffer-file-type (filename)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
118 (let ((alist file-name-buffer-file-type-alist)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
119 (found nil)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
120 (code nil))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
121 (let ((case-fold-search t))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
122 (setq filename (file-name-sans-versions filename))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
123 (while (and (not found) alist)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
124 (if (string-match (car (car alist)) filename)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
125 (setq code (cdr (car alist))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
126 found t))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
127 (setq alist (cdr alist))))
7087
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
128 (if found
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
129 (cond((memq code '(nil t)) code)
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
130 ((and (symbolp code) (fboundp code))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
131 (funcall code filename)))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
132 default-buffer-file-type)))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
133
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
134 (defun find-file-binary (filename)
7087
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
135 "Visit file FILENAME and treat it as binary."
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
136 (interactive "FFind file binary: ")
7087
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
137 (let ((file-name-buffer-file-type-alist '(("" . t))))
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
138 (find-file filename)))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
139
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
140 (defun find-file-text (filename)
7087
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
141 "Visit file FILENAME and treat it as a text file."
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
142 (interactive "FFind file text: ")
7087
57553b30baed (mode-line-format): Put `mode-line-process' earlier.
Richard M. Stallman <rms@gnu.org>
parents: 5469
diff changeset
143 (let ((file-name-buffer-file-type-alist '(("" . nil))))
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
144 (find-file filename)))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
145
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
146 (defun find-file-not-found-set-buffer-file-type ()
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
147 (save-excursion
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
148 (set-buffer (current-buffer))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
149 (setq buffer-file-type (find-buffer-file-type (buffer-file-name))))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
150 nil)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
151
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
152 ;;; To set the default file type on new files.
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
153 (add-hook 'find-file-not-found-hooks 'find-file-not-found-set-buffer-file-type)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
154
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
155 (defvar msdos-shells '("command.com" "4dos.com" "ndos.com")
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
156 "*List of shells that use `/c' instead of `-c' and a backslashed command.")
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
157
7256
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
158 (defconst register-name-alist
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
159 '((ax . 0) (bx . 1) (cx . 2) (dx . 3) (si . 4) (di . 5)
7256
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
160 (cflag . 6) (flags . 7)
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
161 (al . (0 . 0)) (bl . (1 . 0)) (cl . (2 . 0)) (dl . (3 . 0))
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
162 (ah . (0 . 1)) (bh . (1 . 1)) (ch . (2 . 1)) (dh . (3 . 1))))
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
163
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
164 (defun make-register ()
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
165 (make-vector 8 0))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
166
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
167 (defun register-value (regs name)
7256
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
168 (let ((where (cdr (assoc name register-name-alist))))
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
169 (cond ((consp where)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
170 (let ((tem (aref regs (car where))))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
171 (if (zerop (cdr where))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
172 (% tem 256)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
173 (/ tem 256))))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
174 ((numberp where)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
175 (aref regs where))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
176 (t nil))))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
177
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
178 (defun set-register-value (regs name value)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
179 (and (numberp value)
7256
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
180 (>= value 0)
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
181 (let ((where (cdr (assoc name register-name-alist))))
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
182 (cond ((consp where)
7256
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
183 (let ((tem (aref regs (car where)))
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
184 (value (logand value 255)))
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
185 (aset regs
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
186 (car where)
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
187 (if (zerop (cdr where))
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
188 (logior (logand tem 65280) value)
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
189 (logior (logand tem 255) (lsh value 8))))))
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
190 ((numberp where)
7256
0f06f87f3c3b (set-register-value): Setting the high byte of a
Richard M. Stallman <rms@gnu.org>
parents: 7087
diff changeset
191 (aset regs where (logand value 65535))))))
5443
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
192 regs)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
193
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
194 (defsubst intdos (regs)
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
195 (int86 33 regs))
391bfbbb9c1d Initial revision
Richard M. Stallman <rms@gnu.org>
parents:
diff changeset
196
9572
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7825
diff changeset
197 ;; Extra stub to functions in src/frame.c
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7825
diff changeset
198 ;; Emacs aborts during dump if the following don't have a doc string.
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7825
diff changeset
199 (defun window-frame (window)
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7825
diff changeset
200 "Return the frame that WINDOW resides on."
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7825
diff changeset
201 (selected-frame))
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7825
diff changeset
202 (defun raise-frame (frame)
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7825
diff changeset
203 "Raise FRAME to the top of the desktop."
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7825
diff changeset
204 nil)
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7825
diff changeset
205 (defun select-frame (frame &optional no-enter)
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7825
diff changeset
206 "Select FRAME for input events."
b36d5e88cccc *** empty log message ***
Morten Welinder <terra@diku.dk>
parents: 7825
diff changeset
207 (selected-frame))
14189
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
208
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
209 ;; Support for printing under MS-DOS, see lpr.el and ps-print.el.
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
210 (defvar dos-printer "PRN"
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
211 "*The name of a local MS-DOS device to which data is sent for printing.
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
212 \(Note that PostScript files are sent to `dos-ps-printer', which see.\)
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
213
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
214 Typical non-default settings would be \"LPT1\" to \"LPT3\" for
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
215 parallel printers, or \"COM1\" to \"COM4\" or \"AUX\" for serial
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
216 printers. You can also set it to a name of a file, in which
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
217 case the output gets appended to that file.
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
218 If you want to discard the printed output, set this to \"NUL\".")
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
219
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
220 (defun dos-print-region-function (start end
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
221 &optional lpr-prog
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
222 delete-text buf display rest)
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
223 "MS-DOS-specific function to print the region on a printer.
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
224 Writes the region to the device or file which is a value of
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
225 `dos-printer' \(which see\). Ignores any arguments beyond
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
226 START and END."
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
227
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
228 (write-region start end dos-printer t 0)
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
229 ;; Make each print-out start on a new page, but don't waste
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
230 ;; paper if there was a form-feed at the end of this file.
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
231 (if (not (char-equal (char-after (1- end)) ?\C-l))
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
232 (write-region "\f" nil dos-printer t 0)))
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
233
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
234 ;; Set this to nil if you have a port of the `lpr' program and
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
235 ;; you want to use it for printing. If the default setting is
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
236 ;; in effect, `lpr-command' and its switches are ignored when
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
237 ;; printing with `lpr-xxx' and `print-xxx'.
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
238 (setq print-region-function 'dos-print-region-function)
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
239
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
240 ;; Set this to nil if you have a port of the `pr' program
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
241 ;; (e.g., from GNU Textutils), or if you have an `lpr'
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
242 ;; program (see above) that can print page headers.
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
243 ;; If `lpr-headers-switches' is non-nil (the default) and
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
244 ;; `print-region-function' is set to `dos-print-region-function',
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
245 ;; then requests to print page headers will be silently
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
246 ;; ignored, and `print-buffer' and `print-region' produce
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
247 ;; the same output as `lpr-buffer' and `lpr-region', accordingly.
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
248 (setq lpr-headers-switches "(page headers are not supported)")
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
249
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
250 (defvar dos-ps-printer "PRN"
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
251 "*Method for printing PostScript files under MS-DOS.
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
252
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
253 If the value is a string, then it is taken as the name of the
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
254 device to which PostScript files are written. By default it
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
255 is the default printer device; typical non-default settings
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
256 would be \"LPT1\" to \"LPT3\" for parallel printers, or \"COM1\"
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
257 to \"COM4\" or \"AUX\" for serial printers. You can also set it
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
258 to a name of a file, in which case the output gets appended
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
259 to that file. \(Note that `ps-print' package already has
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
260 facilities for printing to a file, so you might as well use
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
261 them instead of changing the setting of this variable.\) If
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
262 you want to silently discard the printed output, set this to \"NUL\".
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
263
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
264 If the value is anything but a string, PostScript files will be
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
265 piped to the program given by `ps-lpr-command', with switches
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
266 given by `ps-lpr-switches', which see.")
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
267
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
268 (setq ps-lpr-command "gs")
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
269
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
270 (setq ps-lpr-switches '("-q" "-dNOPAUSE" "-sDEVICE=epson" "-r240x60"
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
271 "-sOutputFile=LPT1" "-"))
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
272
14380
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
273 ;; Backward compatibility for obsolescent functions which
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
274 ;; set screen size.
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
275
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
276 (defun mode25 ()
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
277 "Changes the number of screen rows to 25."
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
278 (interactive)
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
279 (set-frame-size (selected-frame) 80 25))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
280
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
281 (defun mode4350 ()
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
282 "Changes the number of rows to 43 or 50.
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
283 Emacs always tries to set the screen height to 50 rows first.
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
284 If this fails, it will try to set it to 43 rows, on the assumption
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
285 that your video hardware might not support 50-line mode."
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
286 (interactive)
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
287 (set-frame-size (selected-frame) 80 50)
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
288 (if (eq (frame-height (selected-frame)) 50)
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
289 nil ; the original built-in function returned nil
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
290 (set-frame-size (selected-frame) 80 43)))
874cd82cd2b4 (mode25): Moved from `src/dosfns.c' for backward compatibility.
Richard M. Stallman <rms@gnu.org>
parents: 14189
diff changeset
291
14189
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
292 (provide 'dos-fns)
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
293
557b3d11a381 (ps-lpr-switches, ps-lpr-command): Just setq them;
Richard M. Stallman <rms@gnu.org>
parents: 14169
diff changeset
294 ; dos-fns.el ends here