summaryrefslogtreecommitdiff
path: root/lisp/startup.el
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-01-19 14:19:49 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-01-19 14:19:49 -0700
commitba6d9241e8081cc0b82dc683b63f4e1f44b1329f (patch)
tree7cb3ea26fd89eb6b73173d387a8309280219080c /lisp/startup.el
parent600e22e4f7c2de9ef9a23e7325b5ac962ec623f8 (diff)
parent8ed97a8d543b9596166c670212265dabc44aa3d5 (diff)
downloademacs-ba6d9241e8081cc0b82dc683b63f4e1f44b1329f.tar.gz
Merge remote-tracking branch 'origin/master' into athena/unstable
Diffstat (limited to 'lisp/startup.el')
-rw-r--r--lisp/startup.el69
1 files changed, 21 insertions, 48 deletions
diff --git a/lisp/startup.el b/lisp/startup.el
index b6793e0b776..c508af7bb26 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -1,6 +1,6 @@
;;; startup.el --- process Emacs shell arguments -*- lexical-binding: t -*-
-;; Copyright (C) 1985-1986, 1992, 1994-2020 Free Software Foundation,
+;; Copyright (C) 1985-1986, 1992, 1994-2021 Free Software Foundation,
;; Inc.
;; Maintainer: emacs-devel@gnu.org
@@ -633,7 +633,7 @@ It is the default value of the variable `top-level'."
(with-current-buffer "*Messages*"
(messages-buffer-mode)
;; Make it easy to do like "tail -f".
- (set (make-local-variable 'window-point-insertion-type) t)
+ (setq-local window-point-insertion-type t)
;; Give *Messages* the same default-directory as *scratch*,
;; just to keep things predictable.
(setq default-directory (or dir (expand-file-name "~/")))))
@@ -921,7 +921,8 @@ the name of the init-file to load. If this file cannot be
loaded, and ALTERNATE-FILENAME-FUNCTION is non-nil, then it is
called with no arguments and should return the name of an
alternate init-file to load. If LOAD-DEFAULTS is non-nil, then
-load default.el after the init-file.
+load default.el after the init-file, unless `inhibit-default-init'
+is non-nil.
This function sets `user-init-file' to the name of the loaded
init-file, or to a default value if loading is not possible."
@@ -949,10 +950,10 @@ init-file, or to a default value if loading is not possible."
(when (and (eq user-init-file t) alternate-filename-function)
(let ((alt-file (funcall alternate-filename-function)))
- (and (equal (file-name-extension alt-file) "el")
- (setq alt-file (file-name-sans-extension alt-file)))
(unless init-file-name
(setq init-file-name alt-file))
+ (and (equal (file-name-extension alt-file) "el")
+ (setq alt-file (file-name-sans-extension alt-file)))
(load alt-file 'noerror 'nomessage)))
;; If we did not find the user's init file, set
@@ -977,8 +978,8 @@ init-file, or to a default value if loading is not possible."
(sit-for 1))
(setq user-init-file source))))
- (when load-defaults
-
+ (when (and load-defaults
+ (not inhibit-default-init))
;; Prevent default.el from changing the value of
;; `inhibit-startup-screen'.
(let ((inhibit-startup-screen nil))
@@ -1166,12 +1167,12 @@ please check its value")
;; Re-evaluate predefined variables whose initial value depends on
;; the runtime context.
- (let (current-load-list) ; c-r-s may call defvar, and hence LOADHIST_ATTACH
- (setq custom-delayed-init-variables
- ;; Initialize them in the same order they were loaded, in case there
- ;; are dependencies between them.
- (nreverse custom-delayed-init-variables))
- (mapc 'custom-reevaluate-setting custom-delayed-init-variables))
+ (setq custom-delayed-init-variables
+ ;; Initialize them in the same order they were loaded, in case there
+ ;; are dependencies between them.
+ (nreverse custom-delayed-init-variables))
+ (mapc #'custom-reevaluate-setting custom-delayed-init-variables)
+ (setq custom-delayed-init-variables nil)
;; Warn for invalid user name.
(when init-file-user
@@ -1230,18 +1231,7 @@ please check its value")
package-enable-at-startup
(not (bound-and-true-p package--activated))
(catch 'package-dir-found
- (let (dirs)
- (if (boundp 'package-directory-list)
- (setq dirs package-directory-list)
- (dolist (f load-path)
- (and (stringp f)
- (equal (file-name-nondirectory f) "site-lisp")
- (push (expand-file-name "elpa" f) dirs)))
- (push "/usr/share/emacs-snapshot/site-lisp/elpa" dirs))
- (push (if (boundp 'package-user-dir)
- package-user-dir
- (locate-user-emacs-file "elpa"))
- dirs)
+ (let ((dirs (cons package-user-dir package-directory-list)))
(dolist (dir dirs)
(when (file-directory-p dir)
(dolist (subdir (directory-files dir))
@@ -1299,8 +1289,7 @@ please check its value")
(if (or noninteractive emacs-basic-display)
(setq menu-bar-mode nil
tab-bar-mode nil
- tool-bar-mode nil
- no-blinking-cursor t))
+ tool-bar-mode nil))
(frame-initialize))
(when (fboundp 'x-create-frame)
@@ -1309,26 +1298,10 @@ please check its value")
(unless noninteractive
(tool-bar-setup)))
- ;; Turn off blinking cursor if so specified in X resources. This is here
- ;; only because all other settings of no-blinking-cursor are here.
- (unless (or noninteractive
- emacs-basic-display
- (and (memq window-system '(x w32 ns))
- (not (member (x-get-resource "cursorBlink" "CursorBlink")
- '("no" "off" "false" "0")))))
- (setq no-blinking-cursor t))
-
(unless noninteractive
(startup--setup-quote-display)
(setq internal--text-quoting-flag t))
- ;; Re-evaluate again the predefined variables whose initial value
- ;; depends on the runtime context, in case some of them depend on
- ;; the window-system features. Example: blink-cursor-mode.
- (let (current-load-list) ; c-r-s may call defvar, and hence LOADHIST_ATTACH
- (mapc 'custom-reevaluate-setting custom-delayed-init-variables)
- (setq custom-delayed-init-variables nil))
-
(normal-erase-is-backspace-setup-frame)
;; Register default TTY colors for the case the terminal hasn't a
@@ -1384,9 +1357,9 @@ please check its value")
"~/.emacs")))
(lambda ()
(expand-file-name
- "init"
+ "init.el"
startup-init-directory))
- (not inhibit-default-init))
+ t)
(when (and deactivate-mark transient-mark-mode)
(with-current-buffer (window-buffer)
@@ -1510,13 +1483,13 @@ to reading the init file), or afterwards when the user first
opens a graphical frame.
This can set the values of `menu-bar-mode', `tool-bar-mode',
-`tab-bar-mode', and `no-blinking-cursor', as well as the `cursor' face.
+`tab-bar-mode', and `blink-cursor-mode', as well as the `cursor' face.
Changed settings will be marked as \"CHANGED outside of Customize\"."
(let ((no-vals '("no" "off" "false" "0"))
(settings '(("menuBar" "MenuBar" menu-bar-mode nil)
("toolBar" "ToolBar" tool-bar-mode nil)
("scrollBar" "ScrollBar" scroll-bar-mode nil)
- ("cursorBlink" "CursorBlink" no-blinking-cursor t))))
+ ("cursorBlink" "CursorBlink" blink-cursor-mode nil))))
(dolist (x settings)
(if (member (x-get-resource (nth 0 x) (nth 1 x)) no-vals)
(set (nth 2 x) (nth 3 x)))))
@@ -2001,7 +1974,7 @@ splash screen in another window."
(setq buffer-read-only nil)
(erase-buffer)
(setq default-directory command-line-default-directory)
- (set (make-local-variable 'tab-width) 8)
+ (setq-local tab-width 8)
(if pure-space-overflow
(insert pure-space-overflow-message))