comparison lisp/term/mac-win.el @ 46094:f6354f8039bc

Use directory-free-space-program instead of obsolete variable dired-free-space-program. On Darwin, don't set directory-free-space-program, shell-file-name and process-connection-type; set directory-free-space-args to not include `-P' and use utf-8 for file name coding system.
author Andreas Schwab <schwab@suse.de>
date Sat, 29 Jun 2002 19:01:32 +0000
parents 39cdf9669519
children 56af4e9d2ac3
comparison
equal deleted inserted replaced
46093:070dab19fecf 46094:f6354f8039bc
1 ;;; mac-win.el --- support for "Macintosh windows" 1 ;;; mac-win.el --- support for "Macintosh windows"
2 2
3 ;; Copyright (C) 1999, 2000 Free Software Foundation, Inc. 3 ;; Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
4 4
5 ;; Author: Andrew Choi <akochoi@mac.com> 5 ;; Author: Andrew Choi <akochoi@mac.com>
6 6
7 ;; This file is part of GNU Emacs. 7 ;; This file is part of GNU Emacs.
8 8
102 defined-colors)) 102 defined-colors))
103 103
104 ;; Don't have this yet. 104 ;; Don't have this yet.
105 (fset 'x-get-resource 'ignore) 105 (fset 'x-get-resource 'ignore)
106 106
107 ;; This variable specifies the Unix program to call (as a process) to 107 (if (eq system-type 'darwin)
108 ;; deteremine the amount of free space on a file system (defaults to 108 ;; df on Darwin does not understand -P
109 ;; df). If it is not set to nil, ls-lisp will not work correctly 109 (setq directory-free-space-args "-k")
110 ;; unless an external application df is implemented on the Mac. 110
111 (require 'dired) 111 ;; This variable specifies the Unix program to call (as a process) to
112 112 ;; deteremine the amount of free space on a file system (defaults to
113 (setq dired-free-space-program nil) 113 ;; df). If it is not set to nil, ls-lisp will not work correctly
114 114 ;; unless an external application df is implemented on the Mac.
115 ;; Set this so that Emacs calls subprocesses with "sh" as shell to 115 (setq directory-free-space-program nil)
116 ;; expand filenames Note no subprocess for the shell is actually 116
117 ;; started (see run_mac_command in sysdep.c). 117 ;; Set this so that Emacs calls subprocesses with "sh" as shell to
118 (setq shell-file-name "sh") 118 ;; expand filenames Note no subprocess for the shell is actually
119 ;; started (see run_mac_command in sysdep.c).
120 (setq shell-file-name "sh"))
119 121
120 ;; X Window emulation in macterm.c is not complete enough to start a 122 ;; X Window emulation in macterm.c is not complete enough to start a
121 ;; frame without a minibuffer properly. Call this to tell ediff 123 ;; frame without a minibuffer properly. Call this to tell ediff
122 ;; library to use a single frame. 124 ;; library to use a single frame.
123 ; (ediff-toggle-multiframe) 125 ; (ediff-toggle-multiframe)
209 (memq (char-charset key) 211 (memq (char-charset key)
210 '(ascii eight-bit-control eight-bit-graphic)) 212 '(ascii eight-bit-control eight-bit-graphic))
211 (set-fontset-font "fontset-mac" key monaco-font)))) 213 (set-fontset-font "fontset-mac" key monaco-font))))
212 (get 'mac-roman-encoder 'translation-table))))) 214 (get 'mac-roman-encoder 'translation-table)))))
213 215
214 ;; To display filenames in Chinese or Japanese, replace mac-roman with 216 (if (eq system-type 'darwin)
215 ;; big5 or sjis 217 ;; On Darwin filenames are encoded in UTF-8
216 (setq file-name-coding-system 'mac-roman) 218 (setq file-name-coding-system 'utf-8)
219 ;; To display filenames in Chinese or Japanese, replace mac-roman with
220 ;; big5 or sjis
221 (setq file-name-coding-system 'mac-roman))
217 222
218 ;; If Emacs is started from the Finder, change the default directory 223 ;; If Emacs is started from the Finder, change the default directory
219 ;; to the user's home directory. 224 ;; to the user's home directory.
220 (if (string= default-directory "/") 225 (if (string= default-directory "/")
221 (cd "~")) 226 (cd "~"))
222 227
223 ;; Tell Emacs to use pipes instead of pty's for processes because the 228 (unless (eq system-type 'darwin)
224 ;; latter sometimes lose characters. Pty support is compiled in since 229 ;; Tell Emacs to use pipes instead of pty's for processes because the
225 ;; ange-ftp will not work without it. 230 ;; latter sometimes lose characters. Pty support is compiled in since
226 (setq process-connection-type nil) 231 ;; ange-ftp will not work without it.
232 (setq process-connection-type nil))
227 233
228 ;; Assume that fonts are always scalable on the Mac. This sometimes 234 ;; Assume that fonts are always scalable on the Mac. This sometimes
229 ;; results in characters with jagged edges. However, without it, 235 ;; results in characters with jagged edges. However, without it,
230 ;; fonts with both truetype and bitmap representations but no italic 236 ;; fonts with both truetype and bitmap representations but no italic
231 ;; or bold bitmap versions will not display these variants correctly. 237 ;; or bold bitmap versions will not display these variants correctly.