aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-03-06 00:48:46 +0000
committerStefan Monnier2005-03-06 00:48:46 +0000
commita3194d032da47473c0e3741b4616cb63353258b4 (patch)
tree79fe2b455b9f1e3245ec2da5d4ee66cb6604778d
parente52125457734ea56ffa1e7f0a14fde1d3fc75d53 (diff)
downloademacs-a3194d032da47473c0e3741b4616cb63353258b4.tar.gz
emacs-a3194d032da47473c0e3741b4616cb63353258b4.zip
(command-line): Use it for temporary-file-directory,
small-emporary-file-directory, auto-save-file-name-transforms, blink-cursor-mode, and normal-erase-is-backspace.
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/startup.el52
2 files changed, 20 insertions, 43 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f10a15936b5..8e9345f5cfe 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,16 @@
12005-03-05 Stefan Monnier <monnier@iro.umontreal.ca> 12005-03-05 Stefan Monnier <monnier@iro.umontreal.ca>
2 2
3 * simple.el (normal-erase-is-backspace): Define default value.
4
5 * custom.el (custom-theme-set-variables): Remove unused var `immediate'.
6 (custom-reevaluate-setting): Simple function to handle
7 variables that are defined before their default value can really
8 be computed.
9
10 * startup.el (command-line): Use it for temporary-file-directory,
11 small-emporary-file-directory, auto-save-file-name-transforms,
12 blink-cursor-mode, and normal-erase-is-backspace.
13
3 * font-lock.el (font-lock-fontify-keywords-region): Ensure forward 14 * font-lock.el (font-lock-fontify-keywords-region): Ensure forward
4 progress, even with buggy anchored keywords. 15 progress, even with buggy anchored keywords.
5 16
diff --git a/lisp/startup.el b/lisp/startup.el
index 1c5616f8823..49a5d88e75e 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1,7 +1,7 @@
1;;; startup.el --- process Emacs shell arguments 1;;; startup.el --- process Emacs shell arguments
2 2
3;; Copyright (C) 1985, 86, 92, 94, 95, 96, 97, 98, 99, 2000, 01, 02, 2004 3;; Copyright (C) 1985, 1986, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
4;; Free Software Foundation, Inc. 4;; 2001, 2002, 2004, 2005 Free Software Foundation, Inc.
5 5
6;; Maintainer: FSF 6;; Maintainer: FSF
7;; Keywords: internal 7;; Keywords: internal
@@ -565,22 +565,9 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
565 (setq command-line-default-directory default-directory) 565 (setq command-line-default-directory default-directory)
566 566
567 ;; Choose a reasonable location for temporary files. 567 ;; Choose a reasonable location for temporary files.
568 (setq temporary-file-directory 568 (custom-reevaluate-setting 'temporary-file-directory)
569 (file-name-as-directory 569 (custom-reevaluate-setting 'small-emporary-file-directory)
570 (cond ((memq system-type '(ms-dos windows-nt)) 570 (custom-reevaluate-setting 'auto-save-file-name-transforms)
571 (or (getenv "TEMP") (getenv "TMPDIR") (getenv "TMP") "c:/temp"))
572 ((memq system-type '(vax-vms axp-vms))
573 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "SYS$SCRATCH:"))
574 (t
575 (or (getenv "TMPDIR") (getenv "TMP") (getenv "TEMP") "/tmp")))))
576 (setq small-temporary-file-directory
577 (if (eq system-type 'ms-dos)
578 (getenv "TMPDIR")))
579 (setq auto-save-file-name-transforms
580 (list (list (car (car auto-save-file-name-transforms))
581 ;; Don't put "\\2" inside expand-file-name, since
582 ;; it will be transformed to "/2" on DOS/Windows.
583 (concat temporary-file-directory "\\2") t)))
584 571
585 ;; See if we should import version-control from the environment variable. 572 ;; See if we should import version-control from the environment variable.
586 (let ((vc (getenv "VERSION_CONTROL"))) 573 (let ((vc (getenv "VERSION_CONTROL")))
@@ -742,35 +729,14 @@ or `CVS', and any subdirectory that contains a file named `.nosearch'."
742 (tool-bar-mode 1)) 729 (tool-bar-mode 1))
743 730
744 ;; Can't do this init in defcustom because the relevant variables 731 ;; Can't do this init in defcustom because the relevant variables
745 ;; are not set. If you make any changes to the `or' form below, 732 ;; are not set.
746 ;; you should also change the corresponding expression in the 733 (custom-reevaluate-setting 'blink-cursor-mode)
747 ;; defcustom in frame.el, or Custom will be badly confused. 734 (custom-reevaluate-setting 'normal-erase-is-backspace)
748 (unless (or noninteractive
749 no-blinking-cursor
750 (eq system-type 'ms-dos)
751 (not (memq window-system '(x w32))))
752 (blink-cursor-mode 1))
753
754 (unless noninteractive
755 ;; DOS/Windows systems have a PC-type keyboard which has both
756 ;; <delete> and <backspace> keys.
757 (when (or (memq system-type '(ms-dos windows-nt))
758 (and (memq window-system '(x))
759 (fboundp 'x-backspace-delete-keys-p)
760 (x-backspace-delete-keys-p))
761 ;; If the terminal Emacs is running on has erase char
762 ;; set to ^H, use the Backspace key for deleting
763 ;; backward and, and the Delete key for deleting forward.
764 (and (null window-system)
765 (eq tty-erase-char 8)))
766 (setq-default normal-erase-is-backspace t)
767 (normal-erase-is-backspace-mode 1)))
768 735
769 (unless (or noninteractive 736 (unless (or noninteractive
770 emacs-quick-startup 737 emacs-quick-startup
771 (not (display-graphic-p)) 738 (not (display-graphic-p))
772 (not (fboundp 'x-show-tip))) 739 (not (fboundp 'x-show-tip)))
773 (setq-default tooltip-mode t)
774 (tooltip-mode 1)) 740 (tooltip-mode 1))
775 741
776 ;; Register default TTY colors for the case the terminal hasn't a 742 ;; Register default TTY colors for the case the terminal hasn't a
@@ -1751,5 +1717,5 @@ normal otherwise."
1751 (setq file (replace-match "/" t t file))) 1717 (setq file (replace-match "/" t t file)))
1752 file)) 1718 file))
1753 1719
1754;;; arch-tag: 7e294698-244d-4758-984b-4047f887a5db 1720;; arch-tag: 7e294698-244d-4758-984b-4047f887a5db
1755;;; startup.el ends here 1721;;; startup.el ends here