From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#45857: 28.0.50; Not possible to set package-user-dir in early-init.el Date: Tue, 19 Jan 2021 12:11:57 -0500 Message-ID: References: <83o8hrbbv6.fsf@gnu.org> <83h7njb6a5.fsf@gnu.org> <835z3ybpsj.fsf@gnu.org> <83k0se9hw2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1529"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: ola.x.nilsson@axis.com, 45913-done@debbugs.gnu.org, 45857-done@debbugs.gnu.org, 30994-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jan 19 18:31:09 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1uqR-0000Ao-Ba for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jan 2021 18:31:07 +0100 Original-Received: from localhost ([::1]:38468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l1uqQ-00014v-C1 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jan 2021 12:31:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56242) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l1uYx-0002Pr-IY for bug-gnu-emacs@gnu.org; Tue, 19 Jan 2021 12:13:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39920) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l1uYx-0005gX-AY for bug-gnu-emacs@gnu.org; Tue, 19 Jan 2021 12:13:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l1uYx-0001Es-6Q for bug-gnu-emacs@gnu.org; Tue, 19 Jan 2021 12:13:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Jan 2021 17:13:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45857 X-GNU-PR-Package: emacs Original-Received: via spool by 45857-done@debbugs.gnu.org id=D45857.16110763294645 (code D ref 45857); Tue, 19 Jan 2021 17:13:03 +0000 Original-Received: (at 45857-done) by debbugs.gnu.org; 19 Jan 2021 17:12:09 +0000 Original-Received: from localhost ([127.0.0.1]:51458 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1uY5-0001Cl-9U for submit@debbugs.gnu.org; Tue, 19 Jan 2021 12:12:09 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25215) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1uY1-0001C7-Qr; Tue, 19 Jan 2021 12:12:07 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 11A80809A7; Tue, 19 Jan 2021 12:12:00 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5353D805F4; Tue, 19 Jan 2021 12:11:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1611076318; bh=DWwzP8btQWt0C8JZSXZYfbeymIF19gh40k5BkTjxvRQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=o/SDHF8iQac1yqS895ibLr+JH756Wp0BCMA3UPpCsUfVWWfOAiBDOBTzPVWpk4rIv RkoWdmBnxO5EkMYHHQWZLyDIleHUEcWMSJOLXkVe7WT/bVv4jRG96nmbpqfty8zZku +xjX9fXyterFIsWPTD4ojnrnjJ3GOLuXnRTw+Sv1HBYnrQ29xTBpN/+/Cc1EcXq3Lt YcWHhQU7wFaMGOlz2+IdVfCW1U/yzQjspwl88xBZRlbIGP6cKuZMf+iDScaD58Ghso SPqL/msGOpsY8J8WWqEjRAKXI9Jx02DWbeKVoPQBeGaZIHF4FWqf9z8WVVdXGgE9Y3 1CKj1VvRS3s7g== Original-Received: from alfajor (unknown [45.72.224.181]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0E344120177; Tue, 19 Jan 2021 12:11:58 -0500 (EST) In-Reply-To: (Stefan Monnier's message of "Fri, 15 Jan 2021 23:52:29 -0500") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:198182 Archived-At: > Maybe some time in the future this need will re-appear at which point we > may want to introduce some fancier system to control which var is > initialized when, but I think for now the patch below is > a better solution. Pushed, Stefan > > Stefan > > > 2021-01-15 Stefan Monnier > > * lisp/startup.el: Fix bug#45857, bug#30994, and bug#45913. > > (command-line): Don't re-evaluate the `custom-delayed-init-variables` > a second time after reading the `early-init.el` file. > (x-apply-session-resources): Set `blink-cursor-mode` rather than > `no-blinking-cursor`. > > * lisp/frame.el (blink-cursor-start): Turn `blink-cursor-mode` off > if `blink-cursor-mode` was set to nil. > (blink-cursor-mode): Default to it being enabled regardless of > `window-system`. > > > diff --git a/lisp/frame.el b/lisp/frame.el > index e2d7f21a49..06aab269dd 100644 > --- a/lisp/frame.el > +++ b/lisp/frame.el > @@ -2552,13 +2552,15 @@ blink-cursor-start > This starts the timer `blink-cursor-timer', which makes the cursor blink > if appropriate. It also arranges to cancel that timer when the next > command starts, by installing a pre-command hook." > - (when (null blink-cursor-timer) > + (cond > + ((null blink-cursor-mode) (blink-cursor-mode -1)) > + ((null blink-cursor-timer) > ;; Set up the timer first, so that if this signals an error, > ;; blink-cursor-end is not added to pre-command-hook. > (setq blink-cursor-blinks-done 1) > (blink-cursor--start-timer) > (add-hook 'pre-command-hook #'blink-cursor-end) > - (internal-show-cursor nil nil))) > + (internal-show-cursor nil nil)))) > > (defun blink-cursor-timer-function () > "Timer function of timer `blink-cursor-timer'." > @@ -2637,9 +2639,8 @@ blink-cursor-mode > terminals, cursor blinking is controlled by the terminal." > :init-value (not (or noninteractive > no-blinking-cursor > - (eq system-type 'ms-dos) > - (not (display-blink-cursor-p)))) > - :initialize 'custom-initialize-delay > + (eq system-type 'ms-dos))) > + :initialize #'custom-initialize-delay > :group 'cursor > :global t > (blink-cursor-suspend) > diff --git a/lisp/startup.el b/lisp/startup.el > index 552802a38d..7011fbf458 100644 > --- a/lisp/startup.el > +++ b/lisp/startup.el > @@ -1172,6 +1172,7 @@ command-line > ;; 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 > @@ -1301,12 +1302,6 @@ command-line > (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. > - (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 > @@ -1487,13 +1482,13 @@ x-apply-session-resources > 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)))))