[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ergoemacs-mode b3df015 17/87: Make sure changing local
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ergoemacs-mode b3df015 17/87: Make sure changing local variables doesn't affect save state |
Date: |
Wed, 14 Apr 2021 18:46:59 -0400 (EDT) |
branch: externals/ergoemacs-mode
commit b3df015fa95ee6c2c3e62cf162c03c13dac034b1
Author: Fidler <matthew.fidler@gmail.com>
Commit: Fidler <matthew.fidler@gmail.com>
Make sure changing local variables doesn't affect save state
---
ergoemacs-command-loop.el | 6 ++++--
ergoemacs-component.el | 11 +++++++----
ergoemacs-functions.el | 17 +++++++++++------
ergoemacs-map.el | 3 ++-
ergoemacs-mode.el | 11 ++++++++++-
5 files changed, 34 insertions(+), 14 deletions(-)
diff --git a/ergoemacs-command-loop.el b/ergoemacs-command-loop.el
index d64b9ba..85e485c 100644
--- a/ergoemacs-command-loop.el
+++ b/ergoemacs-command-loop.el
@@ -1142,7 +1142,8 @@ appropriate value based on the COMMAND."
(not ergoemacs-command-loop--minibuffer-unsupported-p))
(when (or (and command (symbolp command) (string-match-p
"^\\(calc\\|math\\)" (symbol-name command)))
(and (stringp command) (string-match-p "^[^:]*:\\(calc\\|math\\)"
command)))
- (set (make-local-variable
'ergoemacs-command-loop--minibuffer-unsupported-p) t))
+ (ergoemacs-save-buffer-state
+ (set (make-local-variable
'ergoemacs-command-loop--minibuffer-unsupported-p) t)))
(ergoemacs-command-loop--minibuffer-supported-p)))
(defun ergoemacs-command-loop-full-p (&optional type)
@@ -1225,7 +1226,8 @@ The properties `point-entered' and `point-left' are
handled by C internals."
(setq last-point cur-point
cur-point (point)))))
(setq disable-point-adjustment nil)
- (set (make-local-variable 'ergoemacs-command-loop--point-motion-last-point)
(point)))
+ (ergoemacs-save-buffer-state
+ (set (make-local-variable 'ergoemacs-command-loop--point-motion-last-point)
(point))))
(defun ergoemacs-command-loop--sync-point ()
"Sometimes the window buffer and selected buffer are out of sync.
diff --git a/ergoemacs-component.el b/ergoemacs-component.el
index 32bf32d..0a1ad4b 100644
--- a/ergoemacs-component.el
+++ b/ergoemacs-component.el
@@ -948,13 +948,16 @@ OBJ is the current object being modified, passed to
(dolist (elt (ergoemacs-component-struct--lookup-hash (or obj
(ergoemacs-theme-components))))
(let ((plist (gethash hook
(ergoemacs-component-struct-hook-plists elt))))
(when (and plist (plist-get plist
:command-loop-unsupported-p))
- (set (make-local-variable
'ergoemacs-command-loop--minibuffer-unsupported-p) t)
+ (ergoemacs-save-buffer-state
+ (set (make-local-variable
'ergoemacs-command-loop--minibuffer-unsupported-p) t))
(throw 'unsupported-p t))))))
(if ergoemacs-component-struct--composed-hook-minibuffer
(push elt ergoemacs-component-struct--composed-hook-minibuffer)
- (set (make-local-variable
'ergoemacs-component-struct--composed-hook-minibuffer)
- (list elt))))
- (set (make-local-variable (car elt)) (make-composed-keymap (cdr elt)
(symbol-value (car elt)))))))
+ (ergoemacs-save-buffer-state
+ (set (make-local-variable
'ergoemacs-component-struct--composed-hook-minibuffer)
+ (list elt)))))
+ (ergoemacs-save-buffer-state
+ (set (make-local-variable (car elt)) (make-composed-keymap (cdr elt)
(symbol-value (car elt))))))))
(defvar ergoemacs-component-struct--create-hooks nil)
(defun ergoemacs-component-struct--create-hooks (&optional obj)
diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index 1011215..4516828 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -249,7 +249,8 @@ When TERMINAL is non-nil, run in a terminal instead of GUI."
(kill-buffer buf)))
(switch-to-buffer-other-window (get-buffer-create "*ergoemacs-clean*"))
(let ((inhibit-read-only t))
- (set (make-local-variable 'ergoemacs-terminal) terminal)
+ (ergoemacs-save-buffer-state
+ (set (make-local-variable 'ergoemacs-terminal) terminal))
(setq default-directory (expand-file-name (file-name-directory
(locate-library "ergoemacs-mode"))))
(delete-region (point-min) (point-max))
(when (or (equal current-prefix-arg '(4))
@@ -296,8 +297,9 @@ The PROCESS is the process where the clean environment is
run."
emacs-exe
(expand-file-name (file-name-directory (locate-library
"ergoemacs-mode")))
ergoemacs-load))
- (set (make-local-variable 'ergoemacs-batch-file)
- (make-temp-file "ergoemacs-clean" nil ".bat"))
+ (ergoemacs-save-buffer-state
+ (set (make-local-variable 'ergoemacs-batch-file)
+ (make-temp-file "ergoemacs-clean" nil ".bat")))
(with-temp-file ergoemacs-batch-file
(insert cmd))
(setq default-directory (file-name-directory ergoemacs-batch-file)))
@@ -2444,15 +2446,18 @@ Sends shell prompt string to process, then turns on
(require 'dirtrack)
(cond
((string-match "cmd\\(proxy\\)?.exe" shell)
- (set (make-local-variable 'dirtrack-list) (list "^\\([a-zA-Z]:.*\\)>"
1))
+ (ergoemacs-save-buffer-state
+ (set (make-local-variable 'dirtrack-list) (list "^\\([a-zA-Z]:.*\\)>"
1)))
(shell-dirtrack-mode -1)
(dirtrack-mode 1))
((string-match "powershell.exe" shell)
- (set (make-local-variable 'dirtrack-list) (list "^PS
\\([a-zA-Z]:.*\\)>" 1))
+ (ergoemacs-save-buffer-state
+ (set (make-local-variable 'dirtrack-list) (list "^PS
\\([a-zA-Z]:.*\\)>" 1)))
(shell-dirtrack-mode -1)
(dirtrack-mode 1))
(t ;; Assume basic abc@host:dir structure
- (set (make-local-variable 'dirtrack-list) (list
"^\\(?:.*?@\\)?\\(?:.*?:\\)?\\(?:[^ ]* \\)? *\\(.*\\) *\\([$#]\\|\\]\\)" 1))
+ (ergoemacs-save-buffer-state
+ (set (make-local-variable 'dirtrack-list) (list
"^\\(?:.*?@\\)?\\(?:.*?:\\)?\\(?:[^ ]* \\)? *\\(.*\\) *\\([$#]\\|\\]\\)" 1)))
(shell-dirtrack-mode -1)
(dirtrack-mode 1))))))
diff --git a/ergoemacs-map.el b/ergoemacs-map.el
index 1c02a02..4c8cc2a 100644
--- a/ergoemacs-map.el
+++ b/ergoemacs-map.el
@@ -1029,7 +1029,8 @@ When INI is non-nil, add conditional maps to
`minor-mode-map-alist'."
(when (equal (ergoemacs (symbol-value elt) :map-key)
(ergoemacs ergoemacs-read-from-minibuffer-map :map-key))
(use-local-map (make-composed-keymap (cdr elt) (current-local-map))))
- (set (make-local-variable (car elt)) (make-composed-keymap (cdr elt)
(symbol-value (car elt)))))
+ (ergoemacs-save-buffer-state
+ (set (make-local-variable (car elt)) (make-composed-keymap (cdr elt)
(symbol-value (car elt))))))
(setq ergoemacs-component-struct--composed-hook-minibuffer nil)))
(setq ergoemacs-map--modify-active-last-overriding-terminal-local-map
overriding-terminal-local-map
ergoemacs-map--modify-active-last-overriding-local-map
overriding-local-map
diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el
index 4a42086..546d70d 100644
--- a/ergoemacs-mode.el
+++ b/ergoemacs-mode.el
@@ -596,7 +596,16 @@ When STORE-P is non-nil, save the tables."
(ergoemacs-timing (intern (format "load-%s" pkg))
(load (symbol-name pkg)))))
-(defcustom ergoemacs-use-unicode-symbols nil
+(require 'unicode-fonts nil t)
+(when (featurep 'unicode-fonts)
+ (require 'persistent-soft nil t)
+ (when (featurep 'persistent-soft)
+ (unicode-fonts-setup)))
+
+
+(defcustom ergoemacs-use-unicode-symbols
+ (and (featurep 'persistent-soft)
+ (featurep 'unicode-fonts))
"Use unicode symbols in display."
:type 'boolean
:group 'ergoemacs-mode)
- [elpa] externals/ergoemacs-mode updated (5450f4d -> f9d6e3f), Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 7ba903e4 04/87: Don't grow mouse commands & set this-command before command is called, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode bcaf49b 03/87: Don't allow infinite recursion on mapkeymap., Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode f12edbb 02/87: Maybe Fix issue #426, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode f10eecc 01/87: Fix overriding keymap. Needs to be expanded., Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 27f60cc 11/87: Will eat commands for self insert like <apps> e t, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode b3df015 17/87: Make sure changing local variables doesn't affect save state,
Stefan Monnier <=
- [elpa] externals/ergoemacs-mode a1dd7a7 09/87: Eat command prefixes that were intercepted by the timer, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode f7a68f6 29/87: Add back Ctrl+Shift+c and Ctrl+Shift+x., Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 59cb758 08/87: Change to an idle timer for more stability, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 07ef724 22/87: Change ergoemacs-override-keymap key bindings., Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode a75a338 07/87: Add ergoemacs start prefix correctly, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode f3dd332 23/87: Revert set-map-list, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 98703c4 27/87: Add Swiper keys. Issue #445, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 01197b3 13/87: Add undefined handling, Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 4a8de51 19/87: The image is created for the current theme., Stefan Monnier, 2021/04/14
- [elpa] externals/ergoemacs-mode 176af55 10/87: Take out message, Stefan Monnier, 2021/04/14