]> code.delx.au - gnu-emacs/blobdiff - lisp/startup.el
(input-method-exit-on-first-char):
[gnu-emacs] / lisp / startup.el
index 55a05fb608399487f23ea1099b9385d9b79d9920..f3d4e6d5031d95a76472aa15c3e747b139b4bdde 100644 (file)
@@ -134,7 +134,7 @@ with the contents of the startup message."
   "*Non-nil inhibits the initial startup echo area message.
 Setting this variable takes effect
 only if you do it with the customization buffer
-or it your `.emacs' file contains a line of this form:
+or if your `.emacs' file contains a line of this form:
  (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")
 If your `.emacs' file is byte-compiled, use the following form instead:
  (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\"))
@@ -249,7 +249,7 @@ Emacs never sets this variable itself.")
   "The brand of keyboard you are using.
 This variable is used to define
 the proper function and keypad keys for use under X.  It is used in a
-fashion analogous to the environment value TERM.")
+fashion analogous to the environment variable TERM.")
 
 (defvar window-setup-hook nil
   "Normal hook run to initialize window system display.
@@ -386,6 +386,9 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
       (save-excursion
        (set-buffer (get-buffer "*Messages*"))
        (setq default-directory dir)))
+    ;; For root, preserve owner and group when editing files.
+    (if (equal (user-uid) 0)
+       (setq backup-by-copying-when-mismatch t))
     ;; Look in each dir in load-path for a subdirs.el file.
     ;; If we find one, load it, which will add the appropriate subdirs
     ;; of that dir into load-path,
@@ -468,6 +471,16 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
 (defun command-line ()
   (setq command-line-default-directory default-directory)
 
+  ;; Choose a reasonable location for temporary files.
+  (setq temporary-file-directory
+       (file-name-as-directory
+        (cond ((memq system-type '(ms-dos windows-nt))
+               (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp"))
+              ((memq system-type '(vax-vms axp-vms))
+               (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "SYS$SCRATCH:"))
+              (t
+               (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))))
+
   ;; See if we should import version-control from the environment variable.
   (let ((vc (getenv "VERSION_CONTROL")))
     (cond ((eq vc nil))                        ;don't do anything if not set
@@ -503,8 +516,8 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
     (when (and ctype
               (string-match iso-8859-n-locale-regexp ctype))
       (let (charset (which (match-string 1 ctype)))
-       (if (equal "5" which)
-           (setq which "9"))
+       (if (equal "9" which)
+           (setq which "5"))
        (setq charset (concat "latin-" which))
        (when (string-match "latin-[12345]" charset)
          ;; Set up for this character set.
@@ -743,6 +756,7 @@ If this is nil, no message will be displayed."
 (defun command-line-1 (command-line-args-left)
   (or noninteractive (input-pending-p) init-file-had-error
       (and inhibit-startup-echo-area-message
+          user-init-file
           (or (and (get 'inhibit-startup-echo-area-message 'saved-value)
                    (equal inhibit-startup-echo-area-message
                           (if (string= init-file-user "")
@@ -815,7 +829,7 @@ If this is nil, no message will be displayed."
                       (if (assq 'display (frame-parameters))
                           (progn
                             (insert "\
-The menu bar above is sufficient for basic editing with the mouse.
+The menu bar and scroll bar are sufficient for basic editing with the mouse.
 
 Useful Files menu items:
 Exit Emacs             (or type Control-x followed by Control-c)