diff options
| author | Richard M. Stallman | 1997-06-18 07:07:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-06-18 07:07:57 +0000 |
| commit | 42a3e6fa48bd1e309d4ba8c1b6fdc13fe89833db (patch) | |
| tree | 1a98dd520bb159b64d8dc8b80291b8183ab0a31f | |
| parent | 32884eab96afc437fb152d5baf6fc09f72bc2d9d (diff) | |
| download | emacs-42a3e6fa48bd1e309d4ba8c1b6fdc13fe89833db.tar.gz emacs-42a3e6fa48bd1e309d4ba8c1b6fdc13fe89833db.zip | |
Customize.
(command-line): Translate iso-8859-9 into latin-5.
(command-line-1): Recognize setting inhibit-startup-echo-area-message
with customization buffer.
| -rw-r--r-- | lisp/startup.el | 121 |
1 files changed, 77 insertions, 44 deletions
diff --git a/lisp/startup.el b/lisp/startup.el index b5fa0b5ef01..43a53071c36 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -116,25 +116,38 @@ | |||
| 116 | 116 | ||
| 117 | (setq top-level '(normal-top-level)) | 117 | (setq top-level '(normal-top-level)) |
| 118 | 118 | ||
| 119 | (defvar command-line-processed nil "t once command line has been processed") | 119 | (defvar command-line-processed nil |
| 120 | "Non-nil once command line has been processed") | ||
| 120 | 121 | ||
| 121 | (defvar inhibit-startup-message nil | 122 | (defgroup initialization nil |
| 123 | "Emacs start-up procedure" | ||
| 124 | :group 'internal) | ||
| 125 | |||
| 126 | (defcustom inhibit-startup-message nil | ||
| 122 | "*Non-nil inhibits the initial startup message. | 127 | "*Non-nil inhibits the initial startup message. |
| 123 | This is for use in your personal init file, once you are familiar | 128 | This is for use in your personal init file, once you are familiar |
| 124 | with the contents of the startup message.") | 129 | with the contents of the startup message." |
| 130 | :type 'boolean | ||
| 131 | :group 'initialization) | ||
| 125 | 132 | ||
| 126 | (defvar inhibit-startup-echo-area-message nil | 133 | (defcustom inhibit-startup-echo-area-message nil |
| 127 | "*Non-nil inhibits the initial startup echo area message. | 134 | "*Non-nil inhibits the initial startup echo area message. |
| 128 | Inhibition takes effect only if your `.emacs' file contains | 135 | Setting this variable takes effect |
| 129 | a line of this form: | 136 | only if you do it with the customization buffer |
| 137 | or it your `.emacs' file contains a line of this form: | ||
| 130 | (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\") | 138 | (setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\") |
| 131 | If your `.emacs' file is byte-compiled, use the following form instead: | 139 | If your `.emacs' file is byte-compiled, use the following form instead: |
| 132 | (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")) | 140 | (eval '(setq inhibit-startup-echo-area-message \"YOUR-USER-NAME\")) |
| 133 | Thus, someone else using a copy of your `.emacs' file will see | 141 | Thus, someone else using a copy of your `.emacs' file will see |
| 134 | the startup message unless he personally acts to inhibit it.") | 142 | the startup message unless he personally acts to inhibit it." |
| 143 | :type '(choice (const :tag "Don't inhibit") | ||
| 144 | (string :tag "Enter your user name, to inhibit")) | ||
| 145 | :group 'initialization) | ||
| 135 | 146 | ||
| 136 | (defvar inhibit-default-init nil | 147 | (defcustom inhibit-default-init nil |
| 137 | "*Non-nil inhibits loading the `default' library.") | 148 | "*Non-nil inhibits loading the `default' library." |
| 149 | :type 'boolean | ||
| 150 | :group 'initialization) | ||
| 138 | 151 | ||
| 139 | (defvar command-switch-alist nil | 152 | (defvar command-switch-alist nil |
| 140 | "Alist of command-line switches. | 153 | "Alist of command-line switches. |
| @@ -243,10 +256,12 @@ fashion analogous to the environment value TERM.") | |||
| 243 | Emacs runs this hook after processing the command line arguments and loading | 256 | Emacs runs this hook after processing the command line arguments and loading |
| 244 | the user's init file.") | 257 | the user's init file.") |
| 245 | 258 | ||
| 246 | (defvar initial-major-mode 'lisp-interaction-mode | 259 | (defcustom initial-major-mode 'lisp-interaction-mode |
| 247 | "Major mode command symbol to use for the initial *scratch* buffer.") | 260 | "Major mode command symbol to use for the initial *scratch* buffer." |
| 261 | :type 'command | ||
| 262 | :group 'initialization) | ||
| 248 | 263 | ||
| 249 | (defvar init-file-user nil | 264 | (defcustom init-file-user nil |
| 250 | "Identity of user whose `.emacs' file is or was read. | 265 | "Identity of user whose `.emacs' file is or was read. |
| 251 | The value is nil if `-q' or `--no-init-file' was specified, | 266 | The value is nil if `-q' or `--no-init-file' was specified, |
| 252 | meaning do not load any init file. | 267 | meaning do not load any init file. |
| @@ -260,9 +275,11 @@ evaluates to the name of the directory where the `.emacs' file was | |||
| 260 | looked for. | 275 | looked for. |
| 261 | 276 | ||
| 262 | Setting `init-file-user' does not prevent Emacs from loading | 277 | Setting `init-file-user' does not prevent Emacs from loading |
| 263 | `site-start.el'. The only way to do that is to use `--no-site-file'.") | 278 | `site-start.el'. The only way to do that is to use `--no-site-file'." |
| 279 | :type '(choice (const :tag "none" nil) string) | ||
| 280 | :group 'initialization) | ||
| 264 | 281 | ||
| 265 | (defvar site-run-file "site-start" | 282 | (defcustom site-run-file "site-start" |
| 266 | "File containing site-wide run-time initializations. | 283 | "File containing site-wide run-time initializations. |
| 267 | This file is loaded at run-time before `~/.emacs'. It contains inits | 284 | This file is loaded at run-time before `~/.emacs'. It contains inits |
| 268 | that need to be in place for the entire site, but which, due to their | 285 | that need to be in place for the entire site, but which, due to their |
| @@ -275,24 +292,30 @@ Put them in `default.el' instead, so that users can more easily | |||
| 275 | override them. Users can prevent loading `default.el' with the `-q' | 292 | override them. Users can prevent loading `default.el' with the `-q' |
| 276 | option or by setting `inhibit-default-init' in their own init files, | 293 | option or by setting `inhibit-default-init' in their own init files, |
| 277 | but inhibiting `site-start.el' requires `--no-site-file', which | 294 | but inhibiting `site-start.el' requires `--no-site-file', which |
| 278 | is less convenient.") | 295 | is less convenient." |
| 296 | :type 'string | ||
| 297 | :group 'initialization) | ||
| 279 | 298 | ||
| 280 | (defconst iso-8859-n-locale-regexp "8859[-_]?\\([1-5]\\)" | 299 | (defconst iso-8859-n-locale-regexp "8859[-_]?\\([1-49]\\)" |
| 281 | "Regexp that specifies when to enable an ISO 8859-N character set. | 300 | "Regexp that specifies when to enable an ISO 8859-N character set. |
| 282 | We do that if this regexp matches the locale name | 301 | We do that if this regexp matches the locale name |
| 283 | specified by the LC_ALL, LC_CTYPE and LANG environment variables. | 302 | specified by the LC_ALL, LC_CTYPE and LANG environment variables. |
| 284 | The paren group in the regexp should match the specific character | 303 | The paren group in the regexp should match the specific character |
| 285 | set number, N.") | 304 | set number, N.") |
| 286 | 305 | ||
| 287 | (defvar mail-host-address nil | 306 | (defcustom mail-host-address nil |
| 288 | "*Name of this machine, for purposes of naming users.") | 307 | "*Name of this machine, for purposes of naming users." |
| 308 | :type '(choice (const nil) string) | ||
| 309 | :group 'mail) | ||
| 289 | 310 | ||
| 290 | (defvar user-mail-address nil | 311 | (defcustom user-mail-address nil |
| 291 | "*Full mailing address of this user. | 312 | "*Full mailing address of this user. |
| 292 | This is initialized based on `mail-host-address', | 313 | This is initialized based on `mail-host-address', |
| 293 | after your init file is read, in case it sets `mail-host-address'.") | 314 | after your init file is read, in case it sets `mail-host-address'." |
| 315 | :type 'string | ||
| 316 | :group 'mail) | ||
| 294 | 317 | ||
| 295 | (defvar auto-save-list-file-prefix | 318 | (defcustom auto-save-list-file-prefix |
| 296 | (if (eq system-type 'ms-dos) | 319 | (if (eq system-type 'ms-dos) |
| 297 | "~/_s" ; MS-DOS cannot have initial dot, and allows only 8.3 names | 320 | "~/_s" ; MS-DOS cannot have initial dot, and allows only 8.3 names |
| 298 | "~/.saves-") | 321 | "~/.saves-") |
| @@ -301,7 +324,9 @@ This is used after reading your `.emacs' file to initialize | |||
| 301 | `auto-save-list-file-name', by appending Emacs's pid and the system name, | 324 | `auto-save-list-file-name', by appending Emacs's pid and the system name, |
| 302 | if you have not already set `auto-save-list-file-name' yourself. | 325 | if you have not already set `auto-save-list-file-name' yourself. |
| 303 | Set this to nil if you want to prevent `auto-save-list-file-name' | 326 | Set this to nil if you want to prevent `auto-save-list-file-name' |
| 304 | from being initialized.") | 327 | from being initialized." |
| 328 | :type 'string | ||
| 329 | :group 'auto-save) | ||
| 305 | 330 | ||
| 306 | (defvar init-file-debug nil) | 331 | (defvar init-file-debug nil) |
| 307 | 332 | ||
| @@ -424,14 +449,16 @@ from being initialized.") | |||
| 424 | (let ((string (getenv "LC_CTYPE"))) | 449 | (let ((string (getenv "LC_CTYPE"))) |
| 425 | (and (not (equal string "")) string)) | 450 | (and (not (equal string "")) string)) |
| 426 | (let ((string (getenv "LANG"))) | 451 | (let ((string (getenv "LANG"))) |
| 427 | (and (not (equal string "")) string)))) | 452 | (and (not (equal string "")) string))))) |
| 428 | charset) | ||
| 429 | (when (and ctype | 453 | (when (and ctype |
| 430 | (string-match iso-8859-n-locale-regexp ctype)) | 454 | (string-match iso-8859-n-locale-regexp ctype)) |
| 431 | (setq charset (concat "latin-" (match-string 1 ctype))) | 455 | (let (charset (which (match-string 1 ctype))) |
| 432 | ;; Set up for this character set in multibyte mode. | 456 | (if (equal "5" which) |
| 433 | (if (string-match "latin-[12345]" charset) | 457 | (setq which "9")) |
| 434 | (set-language-environment charset)) | 458 | (setq charset (concat "latin-" which)) |
| 459 | ;; Set up for this character set in multibyte mode. | ||
| 460 | (if (string-match "latin-[12345]" charset) | ||
| 461 | (set-language-environment charset))) | ||
| 435 | ;; These two lines are ok for any Latin-N character set, | 462 | ;; These two lines are ok for any Latin-N character set, |
| 436 | ;; as long as the terminal displays it. | 463 | ;; as long as the terminal displays it. |
| 437 | (require 'disp-table) | 464 | (require 'disp-table) |
| @@ -647,25 +674,31 @@ from being initialized.") | |||
| 647 | (defun command-line-1 (command-line-args-left) | 674 | (defun command-line-1 (command-line-args-left) |
| 648 | (or noninteractive (input-pending-p) init-file-had-error | 675 | (or noninteractive (input-pending-p) init-file-had-error |
| 649 | (and inhibit-startup-echo-area-message | 676 | (and inhibit-startup-echo-area-message |
| 650 | (let ((buffer (get-buffer-create " *temp*"))) | 677 | (or (and (get 'inhibit-startup-echo-area-message 'saved-value) |
| 651 | (prog1 | 678 | (equal inhibit-startup-echo-area-message |
| 652 | (condition-case nil | ||
| 653 | (save-excursion | ||
| 654 | (set-buffer buffer) | ||
| 655 | (insert-file-contents user-init-file) | ||
| 656 | (re-search-forward | ||
| 657 | (concat | ||
| 658 | "([ \t\n]*setq[ \t\n]+" | ||
| 659 | "inhibit-startup-echo-area-message[ \t\n]+" | ||
| 660 | (regexp-quote | ||
| 661 | (prin1-to-string | ||
| 662 | (if (string= init-file-user "") | 679 | (if (string= init-file-user "") |
| 663 | (user-login-name) | 680 | (user-login-name) |
| 664 | init-file-user))) | 681 | init-file-user))) |
| 665 | "[ \t\n]*)") | 682 | ;; Wasn't set with custom; see if .emacs has a setq. |
| 666 | nil t)) | 683 | (let ((buffer (get-buffer-create " *temp*"))) |
| 667 | (error nil)) | 684 | (prog1 |
| 668 | (kill-buffer buffer)))) | 685 | (condition-case nil |
| 686 | (save-excursion | ||
| 687 | (set-buffer buffer) | ||
| 688 | (insert-file-contents user-init-file) | ||
| 689 | (re-search-forward | ||
| 690 | (concat | ||
| 691 | "([ \t\n]*setq[ \t\n]+" | ||
| 692 | "inhibit-startup-echo-area-message[ \t\n]+" | ||
| 693 | (regexp-quote | ||
| 694 | (prin1-to-string | ||
| 695 | (if (string= init-file-user "") | ||
| 696 | (user-login-name) | ||
| 697 | init-file-user))) | ||
| 698 | "[ \t\n]*)") | ||
| 699 | nil t)) | ||
| 700 | (error nil)) | ||
| 701 | (kill-buffer buffer))))) | ||
| 669 | (message (if (eq (key-binding "\C-h\C-p") 'describe-project) | 702 | (message (if (eq (key-binding "\C-h\C-p") 'describe-project) |
| 670 | "For information about the GNU Project and its goals, type C-h C-p." | 703 | "For information about the GNU Project and its goals, type C-h C-p." |
| 671 | (substitute-command-keys | 704 | (substitute-command-keys |