* rlogin.el (rlogin): recognise the `-l user' option to rlogin and
[bpt/emacs.git] / lisp / startup.el
CommitLineData
c88ab9ce
ER
1;;; startup.el --- process Emacs shell arguments
2
1d7da582 3;; Copyright (C) 1985, 1986, 1992, 1994 Free Software Foundation, Inc.
eea8d4ef 4
630cc463 5;; Maintainer: FSF
d7b4d18f 6;; Keywords: internal
630cc463 7
a726e0d1
JB
8;; This file is part of GNU Emacs.
9
10;; GNU Emacs is free software; you can redistribute it and/or modify
11;; it under the terms of the GNU General Public License as published by
4746118a 12;; the Free Software Foundation; either version 2, or (at your option)
a726e0d1
JB
13;; any later version.
14
15;; GNU Emacs is distributed in the hope that it will be useful,
16;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18;; GNU General Public License for more details.
19
20;; You should have received a copy of the GNU General Public License
21;; along with GNU Emacs; see the file COPYING. If not, write to
22;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
23
630cc463 24;;; Commentary:
a726e0d1
JB
25
26; These are processed only at the beginning of the argument list.
27; -batch execute noninteractively (messages go to stdout,
28; variable noninteractive set to t)
29; This option must be the first in the arglist.
30; Processed by `main' in emacs.c -- never seen by lisp
31; -t file Specify to use file rather than stdin/stdout
32; as the terminal.
33; This option must be the first in the arglist.
34; Processed by `main' in emacs.c -- never seen by lisp
35; -nw Inhibit the use of any window-system-specific display
36; code; use the current virtual terminal.
37; This option must be the first in the arglist.
38; Processed by `main' in emacs.c -- never seen by lisp
39; -q load no init file
40; -no-init-file same
41; -u user load user's init file
42; -user user same
43; -debug-init Don't catch errors in init file; let debugger run.
44
45; These are processed in the order encountered.
46; -f function execute function
47; -funcall function same
48; -l file load file
49; -load file same
a726e0d1
JB
50; -insert file same
51; file visit file
52; -kill kill (exit) emacs
53
630cc463
ER
54;;; Code:
55
a726e0d1
JB
56(setq top-level '(normal-top-level))
57
58(defvar command-line-processed nil "t once command line has been processed")
59
60(defconst inhibit-startup-message nil
1d7da582 61 "*Non-nil inhibits the initial startup message.
a726e0d1
JB
62This is for use in your personal init file, once you are familiar
63with the contents of the startup message.")
64
1d7da582
RS
65(defconst inhibit-startup-echo-area-message nil
66 "*Non-nil inhibits the initial startup echo area message.
67Inhibition takes effect only if your `.emacs' file contains
e5575c06 68a line of this form:
54a003f7 69 (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")
e5575c06
RS
70If your `.emacs' file is byte-compiled, use the following form instead:
71 (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\"))
1d7da582
RS
72Thus, someone else using a copy of your `.emacs' file will see
73the startup message unless he personally acts to inhibit it.")
74
a726e0d1
JB
75(defconst inhibit-default-init nil
76 "*Non-nil inhibits loading the `default' library.")
77
78(defconst command-switch-alist nil
79 "Alist of command-line switches.
80Elements look like (SWITCH-STRING . HANDLER-FUNCTION).
81HANDLER-FUNCTION receives switch name as sole arg;
82remaining command-line args are in the variable `command-line-args-left'.")
83
860befc8
RS
84(defvar command-line-args-left nil
85 "List of command-line args not yet processed.")
86
a726e0d1
JB
87(defvar command-line-functions nil ;; lrs 7/31/89
88 "List of functions to process unrecognized command-line arguments.
89Each function should access the dynamically bound variables
b4484ea8 90`argi' (the current argument) and `command-line-args-left' (the remaining
a726e0d1 91arguments). The function should return non-nil only if it recognizes and
b4484ea8
RS
92processes `argi'. If it does so, it may consume successive arguments by
93altering `command-line-args-left' to remove them.")
a726e0d1 94
09a1077c
RS
95(defvar command-line-default-directory nil
96 "Default directory to use for command line arguments.
97This is normally copied from `default-directory' when Emacs starts.")
98
e3bd99f5 99(defvar before-init-hook nil
b4484ea8 100 "Functions to call after handling urgent options but before init files.
0cc89026 101The frame system uses this to open frames to display messages while
3fc958a4
JB
102Emacs loads the user's initialization file.")
103
e3bd99f5 104(defvar after-init-hook nil
a0965605 105 "Functions to call after loading the init file (`~/.emacs').
e3bd99f5 106The call is not protected by a condition-case, so you can set `debug-on-error'
a0965605 107in `.emacs', and put all the actual code on `after-init-hook'.")
e3bd99f5 108
a726e0d1 109(defvar term-setup-hook nil
b4484ea8 110 "Functions to be called after loading terminal-specific Lisp code.
e3bd99f5 111See `run-hooks'. This variable exists for users to set,
a726e0d1
JB
112so as to override the definitions made by the terminal-specific file.
113Emacs never sets this variable itself.")
114
115(defvar keyboard-type nil
b4484ea8
RS
116 "The brand of keyboard you are using.
117This variable is used to define
a726e0d1
JB
118the proper function and keypad keys for use under X. It is used in a
119fashion analogous to the environment value TERM.")
120
121(defvar window-setup-hook nil
b4484ea8
RS
122 "Normal hook run to initialize window system display.
123Emacs runs this hook after processing the command line arguments and loading
124the user's init file.")
a726e0d1
JB
125
126(defconst initial-major-mode 'lisp-interaction-mode
127 "Major mode command symbol to use for the initial *scratch* buffer.")
128
129(defvar init-file-user nil
130 "Identity of user whose `.emacs' file is or was read.
2bdfaa42
KH
131The value is nil if no init file is being used; otherwise, it may be either
132the null string, meaning that the init file was taken from the user that
133originally logged in, or it may be a string containing a user's name.
a726e0d1 134
2bdfaa42
KH
135In either of the latter cases, `(concat \"~\" init-file-user \"/\")'
136evaluates to the name of the directory where the `.emacs' file was
137looked for.")
a726e0d1 138
b7444d31
RS
139(defvar site-run-file "site-start"
140 "File containing site-wide run-time initializations.
141This file is loaded at run-time before `~/.emacs'. It contains inits
142that need to be in place for the entire site, but which, due to their
143higher incidence of change, don't make sense to load into emacs'
144dumped image. Thus, the run-time load order is: 1. file described in
145this variable, if non-nil; 2. `~/.emacs'; 3. `default.el'.")
146
30dc01ea
RS
147(defconst iso-8859-1-locale-regexp "8859[-_]?1"
148 "Regexp that specifies when to enable the ISO 8859-1 character set.
149We do that if this regexp matches the locale name
150specified by the LC_ALL, LC_CTYPE and LANG environment variables.")
151
c10d1f06
RS
152(defvar user-mail-address nil
153 "Full mailing address of this user.")
154
a726e0d1
JB
155(defvar init-file-debug nil)
156
52320897
RS
157(defvar init-file-had-error nil)
158
a726e0d1
JB
159(defun normal-top-level ()
160 (if command-line-processed
161 (message "Back to top level.")
162 (setq command-line-processed t)
ffd56f97 163 (if (not (eq system-type 'vax-vms))
a4b33896
JB
164 (progn
165 ;; If the PWD environment variable isn't accurate, delete it.
166 (let ((pwd (getenv "PWD")))
167 (and (stringp pwd)
168 ;; Use FOO/., so that if FOO is a symlink, file-attributes
169 ;; describes the directory linked to, not FOO itself.
170 (or (equal (file-attributes
171 (concat (file-name-as-directory pwd) "."))
172 (file-attributes
173 (concat (file-name-as-directory default-directory)
174 ".")))
175 (setq process-environment
176 (delete (concat "PWD=" pwd)
177 process-environment)))))))
492878e4 178 (setq default-directory (abbreviate-file-name default-directory))
c10d1f06 179 (setq user-mail-address (concat (user-login-name) "@" (system-name)))
6f2c86fa
KH
180 (let ((menubar-bindings-done nil))
181 (unwind-protect
182 (command-line)
183 ;; Do this again, in case .emacs defined more abbreviations.
184 (setq default-directory (abbreviate-file-name default-directory))
185 (run-hooks 'emacs-startup-hook)
186 (and term-setup-hook
187 (run-hooks 'term-setup-hook))
188 ;; Modify the initial frame based on what .emacs puts into
189 ;; ...-frame-alist.
190 (if (fboundp 'frame-notice-user-settings)
191 (frame-notice-user-settings))
192 ;; Now we know the user's default font, so add it to the menu.
193 (if (fboundp 'font-menu-add-default)
194 (font-menu-add-default))
195 (and window-setup-hook
196 (run-hooks 'window-setup-hook))
197 (or menubar-bindings-done
198 (precompute-menubar-bindings))))))
199
200;; Precompute the keyboard equivalents in the menu bar items.
201(defun precompute-menubar-bindings ()
42a49b29 202 (if (eq window-system 'x)
6f2c86fa
KH
203 (let ((submap (lookup-key global-map [menu-bar])))
204 (while submap
205 (and (consp (car submap))
206 (symbolp (car (car submap)))
207 (stringp (car-safe (cdr (car submap))))
208 (keymapp (cdr (cdr (car submap))))
209 (x-popup-menu nil (cdr (cdr (car submap)))))
210 (setq submap (cdr submap))))))
a726e0d1
JB
211
212(defun command-line ()
09a1077c
RS
213 (setq command-line-default-directory default-directory)
214
74f2ab06 215 ;; See if we should import version-control from the environment variable.
a726e0d1
JB
216 (let ((vc (getenv "VERSION_CONTROL")))
217 (cond ((eq vc nil)) ;don't do anything if not set
218 ((or (string= vc "t")
219 (string= vc "numbered"))
220 (setq version-control t))
221 ((or (string= vc "nil")
222 (string= vc "existing"))
223 (setq version-control nil))
224 ((or (string= vc "never")
225 (string= vc "simple"))
226 (setq version-control 'never))))
227
30dc01ea
RS
228 (if (let ((ctype
229 ;; Use the first of these three envvars that has a nonempty value.
230 (or (let ((string (getenv "LC_ALL")))
231 (and (not (equal string "")) string))
232 (let ((string (getenv "LC_CTYPE")))
233 (and (not (equal string "")) string))
234 (let ((string (getenv "LANG")))
235 (and (not (equal string "")) string)))))
236 (and ctype
237 (string-match iso-8859-1-locale-regexp ctype)))
e9d8e8c7
RS
238 (progn
239 (standard-display-european t)
240 (require 'iso-syntax)))
241
79058860
JB
242 ;;! This has been commented out; I currently find the behavior when
243 ;;! split-window-keep-point is nil disturbing, but if I can get used
244 ;;! to it, then it would be better to eliminate the option.
245 ;;! ;; Choose a good default value for split-window-keep-point.
246 ;;! (setq split-window-keep-point (> baud-rate 2400))
f35fe3c6 247
a726e0d1 248 ;; Read window system's init file if using a window system.
1ed14cfd
RS
249 (condition-case error
250 (if (and window-system (not noninteractive))
251 (load (concat term-file-prefix
252 (symbol-name window-system)
253 "-win")
254 ;; Every window system should have a startup file;
255 ;; barf if we can't find it.
256 nil t))
257 ;; If we can't read it, print the error message and exit.
258 (error
2677ad61
RS
259 (princ
260 (if (eq (car error) 'error)
261 (apply 'concat (cdr error))
262 (if (memq 'file-error (get (car error) 'error-conditions))
263 (format "%s: %s"
264 (nth 1 error)
265 (mapconcat '(lambda (obj) (prin1-to-string obj t))
266 (cdr (cdr error)) ", "))
267 (format "%s: %s"
268 (get (car error) 'error-message)
269 (mapconcat '(lambda (obj) (prin1-to-string obj t))
270 (cdr error) ", "))))
271 'external-debugging-output)
272 (setq window-system nil)
1ed14cfd 273 (kill-emacs)))
a726e0d1 274
03e3c30a
JB
275 (let ((done nil)
276 (args (cdr command-line-args)))
277
a726e0d1
JB
278 ;; Figure out which user's init file to load,
279 ;; either from the environment or from the options.
280 (setq init-file-user (if noninteractive nil (user-login-name)))
281 ;; If user has not done su, use current $HOME to find .emacs.
282 (and init-file-user (string= init-file-user (user-real-login-name))
283 (setq init-file-user ""))
03e3c30a
JB
284
285 ;; Process the command-line args, and delete the arguments
286 ;; processed. This is consistent with the way main in emacs.c
287 ;; does things.
a726e0d1
JB
288 (while (and (not done) args)
289 (let ((argi (car args)))
290 (cond
291 ((or (string-equal argi "-q")
292 (string-equal argi "-no-init-file"))
293 (setq init-file-user nil
294 args (cdr args)))
295 ((or (string-equal argi "-u")
296 (string-equal argi "-user"))
297 (setq args (cdr args)
298 init-file-user (car args)
299 args (cdr args)))
b7444d31
RS
300 ((string-equal argi "-no-site-file")
301 (setq site-run-file nil
302 args (cdr args)))
a726e0d1
JB
303 ((string-equal argi "-debug-init")
304 (setq init-file-debug t
305 args (cdr args)))
03e3c30a
JB
306 (t (setq done t)))))
307
308 ;; Re-attach the program name to the front of the arg list.
309 (setcdr command-line-args args))
a726e0d1 310
c722566c 311 ;; Under X Windows, this creates the X frame and deletes the terminal frame.
4e1b1e72
JB
312 (if (fboundp 'face-initialize)
313 (face-initialize))
853ccbd5
RS
314 (if (fboundp 'frame-initialize)
315 (frame-initialize))
1fe0333f
RS
316 ;; If frame was created with a menu bar, set menu-bar-mode on.
317 (if (and (eq window-system 'x)
318 (> (cdr (assq 'menu-bar-lines (frame-parameters))) 0))
319 (menu-bar-mode t))
c722566c 320
e3bd99f5 321 (run-hooks 'before-init-hook)
3fc958a4 322
09973c54
RM
323 ;; Run the site-start library if it exists. The point of this file is
324 ;; that it is run before .emacs. There is no point in doing this after
325 ;; .emacs; that is useless.
b7444d31
RS
326 (if site-run-file
327 (load site-run-file t t))
09973c54 328
8a988f45
RS
329 ;; Sites should not disable this. Only individuals should disable
330 ;; the startup message.
331 (setq inhibit-startup-message nil)
332
a726e0d1 333 ;; Load that user's init file, or the default one, or none.
3d1b78f0
RS
334 (let (debug-on-error-from-init-file
335 debug-on-error-should-be-set
336 (debug-on-error-initial
337 (if (eq init-file-debug t) 'startup init-file-debug)))
338 (let ((debug-on-error debug-on-error-initial)
339 ;; This function actually reads the init files.
340 (inner
341 (function
342 (lambda ()
343 (if init-file-user
a4c5c705
RS
344 (progn
345 (setq user-init-file
346 (cond
347 ((eq system-type 'ms-dos)
348 (concat "~" init-file-user "/_emacs"))
349 ((eq system-type 'vax-vms)
350 "sys$login:.emacs")
351 (t
352 (concat "~" init-file-user "/.emacs"))))
353 (load user-init-file t t t)
354 (or inhibit-default-init
355 (let ((inhibit-startup-message nil))
356 ;; Users are supposed to be told their rights.
357 ;; (Plus how to get help and how to undo.)
358 ;; Don't you dare turn this off for anyone
359 ;; except yourself.
360 (load "default" t t)))))))))
3d1b78f0
RS
361 (if init-file-debug
362 ;; Do this without a condition-case if the user wants to debug.
363 (funcall inner)
364 (condition-case error
365 (progn
366 (funcall inner)
367 (setq init-file-had-error nil))
368 (error (message "Error in init file: %s%s%s"
369 (get (car error) 'error-message)
ad2aeb8d 370 (if (cdr error) ": " "")
3d1b78f0
RS
371 (mapconcat 'prin1-to-string (cdr error) ", "))
372 (setq init-file-had-error t))))
ad2aeb8d 373 ;; If we can tell that the init file altered debug-on-error,
3d1b78f0
RS
374 ;; arrange to preserve the value that it set up.
375 (or (eq debug-on-error debug-on-error-initial)
376 (setq debug-on-error-should-be-set t
377 debug-on-error-from-init-file debug-on-error)))
378 (if debug-on-error-should-be-set
379 (setq debug-on-error debug-on-error-from-init-file)))
3fc958a4 380
e3bd99f5
RM
381 (run-hooks 'after-init-hook)
382
a726e0d1
JB
383 ;; If *scratch* exists and init file didn't change its mode, initialize it.
384 (if (get-buffer "*scratch*")
385 (save-excursion
386 (set-buffer "*scratch*")
387 (if (eq major-mode 'fundamental-mode)
388 (funcall initial-major-mode))))
389 ;; Load library for our terminal type.
390 ;; User init file can set term-file-prefix to nil to prevent this.
391 (and term-file-prefix (not noninteractive) (not window-system)
392 (let ((term (getenv "TERM"))
393 hyphend)
394 (while (and term
395 (not (load (concat term-file-prefix term) t t)))
396 ;; Strip off last hyphen and what follows, then try again
397 (if (setq hyphend (string-match "[-_][^-_]+$" term))
398 (setq term (substring term 0 hyphend))
399 (setq term nil)))))
400
03e3c30a 401 ;; Process the remaining args.
a726e0d1
JB
402 (command-line-1 (cdr command-line-args))
403
404 ;; If -batch, terminate after processing the command options.
405 (if noninteractive (kill-emacs t)))
406
407(defun command-line-1 (command-line-args-left)
52320897 408 (or noninteractive (input-pending-p) init-file-had-error
1d7da582
RS
409 (and inhibit-startup-echo-area-message
410 (let ((buffer (get-buffer-create " *temp*")))
411 (prog1
412 (condition-case nil
413 (save-excursion
414 (set-buffer buffer)
415 (insert-file-contents user-init-file)
416 (re-search-forward
417 (concat
d9a71a8f
RS
418 "([ \t\n]*setq[ \t\n]+"
419 "inhibit-startup-echo-area-message[ \t\n]+"
420 (regexp-quote
421 (prin1-to-string
422 (if (string= init-file-user "")
423 (user-login-name)
424 init-file-user)))
425 "[ \t\n]*)")
1d7da582
RS
426 nil t))
427 (error nil))
428 (kill-buffer buffer))))
429 (message (if (eq (key-binding "\C-h\C-p") 'describe-project)
430 "For information about the GNU Project and its goals, type C-h C-p."
431 (substitute-command-keys
432 "For information about the GNU Project and its goals, type \\[describe-project]."))))
a726e0d1
JB
433 (if (null command-line-args-left)
434 (cond ((and (not inhibit-startup-message) (not noninteractive)
435 ;; Don't clobber a non-scratch buffer if init file
436 ;; has selected it.
437 (string= (buffer-name) "*scratch*")
438 (not (input-pending-p)))
439 ;; If there are no switches to process, we might as well
440 ;; run this hook now, and there may be some need to do it
441 ;; before doing any output.
442 (and term-setup-hook
443 (run-hooks 'term-setup-hook))
444 ;; Don't let the hook be run twice.
445 (setq term-setup-hook nil)
4e1b1e72
JB
446
447 ;; It's important to notice the user settings before we
448 ;; display the startup message; otherwise, the settings
449 ;; won't take effect until the user gives the first
450 ;; keystroke, and that's distracting.
451 (if (fboundp 'frame-notice-user-settings)
452 (frame-notice-user-settings))
453
a726e0d1
JB
454 (and window-setup-hook
455 (run-hooks 'window-setup-hook))
456 (setq window-setup-hook nil)
fd11871a
RS
457 ;; Do this now to avoid an annoying delay if the user
458 ;; clicks the menu bar during the sit-for.
459 (precompute-menubar-bindings)
460 (setq menubar-bindings-done t)
a726e0d1
JB
461 (unwind-protect
462 (progn
463 (insert (emacs-version)
464 "
1d7da582 465Copyright (C) 1994 Free Software Foundation, Inc.\n\n")
a726e0d1
JB
466 ;; If keys have their default meanings,
467 ;; use precomputed string to save lots of time.
468 (if (and (eq (key-binding "\C-h") 'help-command)
469 (eq (key-binding "\C-xu") 'advertised-undo)
470 (eq (key-binding "\C-x\C-c") 'save-buffers-kill-emacs)
471 (eq (key-binding "\C-h\C-c") 'describe-copying)
472 (eq (key-binding "\C-h\C-d") 'describe-distribution)
473 (eq (key-binding "\C-h\C-w") 'describe-no-warranty)
474 (eq (key-binding "\C-ht") 'help-with-tutorial))
475 (insert
476 "Type C-h for help; C-x u to undo changes. (`C-' means use CTRL key.)
477To kill the Emacs job, type C-x C-c.
478Type C-h t for a tutorial on using Emacs.
54a0539a 479Type C-h i to enter Info, which you can use to read GNU documentation.
a726e0d1
JB
480
481GNU Emacs comes with ABSOLUTELY NO WARRANTY; type C-h C-w for full details.
482You may give out copies of Emacs; type C-h C-c to see the conditions.
483Type C-h C-d for information on getting the latest version.")
484 (insert (substitute-command-keys
485 "Type \\[help-command] for help; \\[advertised-undo] to undo changes. (`C-' means use CTRL key.)
486To kill the Emacs job, type \\[save-buffers-kill-emacs].
487Type \\[help-with-tutorial] for a tutorial on using Emacs.
54a0539a 488Type \\[info] to enter Info, which you can use to read GNU documentation.
a726e0d1
JB
489
490GNU Emacs comes with ABSOLUTELY NO WARRANTY; type \\[describe-no-warranty] for full details.
491You may give out copies of Emacs; type \\[describe-copying] to see the conditions.
492Type \\[describe-distribution] for information on getting the latest version.")))
493 (set-buffer-modified-p nil)
494 (sit-for 120))
495 (save-excursion
496 ;; In case the Emacs server has already selected
497 ;; another buffer, erase the one our message is in.
498 (set-buffer (get-buffer "*scratch*"))
499 (erase-buffer)
500 (set-buffer-modified-p nil)))))
09a1077c 501 (let ((dir command-line-default-directory)
a726e0d1
JB
502 (file-count 0)
503 first-file-buffer
504 (line 0))
505 (while command-line-args-left
506 (let ((argi (car command-line-args-left))
507 tem)
508 (setq command-line-args-left (cdr command-line-args-left))
509 (cond ((setq tem (assoc argi command-switch-alist))
510 (funcall (cdr tem) argi))
a726e0d1
JB
511 ((or (string-equal argi "-f") ;what the manual claims
512 (string-equal argi "-funcall")
513 (string-equal argi "-e")) ; what the source used to say
514 (setq tem (intern (car command-line-args-left)))
515 (setq command-line-args-left (cdr command-line-args-left))
516 (funcall tem))
517 ((or (string-equal argi "-l")
518 (string-equal argi "-load"))
519 (let ((file (car command-line-args-left)))
520 ;; Take file from default dir if it exists there;
521 ;; otherwise let `load' search for it.
522 (if (file-exists-p (expand-file-name file))
523 (setq file (expand-file-name file)))
524 (load file nil t))
525 (setq command-line-args-left (cdr command-line-args-left)))
fbce8654 526 ((string-equal argi "-insert")
cf91c6c8 527 (or (stringp (car command-line-args-left))
fbce8654 528 (error "filename omitted from `-insert' option"))
a726e0d1
JB
529 (insert-file-contents (car command-line-args-left))
530 (setq command-line-args-left (cdr command-line-args-left)))
531 ((string-equal argi "-kill")
532 (kill-emacs t))
533 ((string-match "^\\+[0-9]+\\'" argi)
534 (setq line (string-to-int argi)))
535 (t
536 ;; We have almost exhausted our options. See if the
537 ;; user has made any other command-line options available
538 (let ((hooks command-line-functions);; lrs 7/31/89
539 (did-hook nil))
540 (while (and hooks
541 (not (setq did-hook (funcall (car hooks)))))
542 (setq hooks (cdr hooks)))
543 (if (not did-hook)
544 ;; Ok, presume that the argument is a file name
545 (progn
546 (setq file-count (1+ file-count))
547 (cond ((= file-count 1)
548 (setq first-file-buffer
549 (find-file (expand-file-name argi dir))))
550 (t
551 (find-file-other-window (expand-file-name argi dir))))
552 (or (zerop line)
553 (goto-line line))
554 (setq line 0))))))))
555 ;; If 3 or more files visited, and not all visible,
556 ;; show user what they all are.
557 (if (> file-count 2)
558 (or (get-buffer-window first-file-buffer)
7e0795a4 559 (progn (other-window 1)
e8997612 560 (buffer-menu)))))))
c88ab9ce
ER
561
562;;; startup.el ends here