branch: externals/ergoemacs-mode commit f9d6e3f7d99b877a63fa6f5ab61e6ba05a7075c8 Author: Matthew Fidler <514778+mattfid...@users.noreply.github.com> Commit: Matthew Fidler <514778+mattfid...@users.noreply.github.com>
Bring over some more emacs mainatiner fixes --- ergoemacs-macros.el | 26 +++++++++++++------------- ergoemacs-map-properties.el | 4 ++-- ergoemacs-mode.el | 2 +- ergoemacs-test.el | 2 +- ergoemacs-translate.el | 3 ++- 5 files changed, 19 insertions(+), 18 deletions(-) diff --git a/ergoemacs-macros.el b/ergoemacs-macros.el index 9d87bee..1305dba 100644 --- a/ergoemacs-macros.el +++ b/ergoemacs-macros.el @@ -852,29 +852,29 @@ When arg1 can be a property. The following properties are supported: (arg3 (nth 2 args)) (arg4 (nth 3 args))) (cond - ((and arg1 (symbolp arg1) (eq arg1 :w32-long-file-name)) + ((eq arg1 :w32-long-file-name) (if (fboundp 'w32-long-file-name) `(w32-long-file-name ,@(cdr args)) `nil)) - ((and arg1 (symbolp arg1) (eq arg1 :w32-shell-open-files)) + ((eq arg1 :w32-shell-open-files) (if (fboundp 'w32-shell-execute) `(dolist (f-path ,@(cdr args)) (w32-shell-execute "open" (replace-regexp-in-string "/" "\\" f-path t t))) `nil)) - ((and arg1 (symbolp arg1) (eq arg1 :w32-shell-execute)) + ((eq arg1 :w32-shell-execute) (if (fboundp 'w32-shell-execute) `(w32-shell-execute ,@(cdr args)) `nil)) - ((and arg1 (symbolp arg1) (eq arg1 :reset-prefix)) + ((eq arg1 :reset-prefix) (if (<= 25 emacs-major-version) `(prefix-command-preserve-state) `(reset-this-command-lengths))) - ((and arg1 (symbolp arg1) (eq arg1 :set-selection)) + ((eq arg1 :set-selection) (if (<= 25 emacs-major-version) `(gui-set-selection ,@(cdr args)) `(x-set-selection ,@(cdr args)))) - ((and arg1 (symbolp arg1) (eq arg1 :width)) + ((eq arg1 :width) `(ergoemacs-mode--eval-width ,arg2)) ((and arg1 (symbolp arg1) (eq arg1 :mode-if) arg2) `(ergoemacs-mode-line--if ,arg2 ,arg3 ,arg4)) @@ -884,7 +884,7 @@ When arg1 can be a property. The following properties are supported: `(ergoemacs-mode-line--sep 'right ,@(cdr args))) ((and arg1 (symbolp arg1) (memq arg1 '(:sep-left :separator-left))) `(ergoemacs-mode-line--sep 'left ,@(cdr args))) - ((and arg1 (symbolp arg1) (eq arg1 :custom-p) (symbolp arg2)) + ((eq arg1 :custom-p) (symbolp arg2) (if (fboundp 'custom-variable-p) `(custom-variable-p ,arg2) `(user-variable-p ,arg2))) @@ -894,13 +894,13 @@ When arg1 can be a property. The following properties are supported: `(ergoemacs-command-loop--spinner-display ,@(cdr args))) ((and arg1 (symbolp arg1) (eq arg1 :define-key) arg2 arg3) `(ergoemacs-translate--define-key ,arg2 ,arg3 ,arg4)) - ((and arg1 (symbolp arg1) (eq arg1 :ignore-global-changes-p) (not arg2) (not arg3)) + ((eq arg1 :ignore-global-changes-p) (not arg2) (not arg3) `(ergoemacs-map-properties--ignore-global-changes-p)) - ((and arg1 (symbolp arg1) (eq arg1 :user-before) (not arg2) (not arg3)) + ((eq arg1 :user-before) (not arg2) (not arg3) `(ergoemacs-map-properties--before-ergoemacs)) - ((and arg1 (symbolp arg1) (eq arg1 :user-after) (not arg2) (not arg3)) + ((eq arg1 :user-after) (not arg2) (not arg3) `(ergoemacs-map-properties--before-ergoemacs t)) - ((and arg1 (symbolp arg1) (eq arg1 :modal-p)) + ((eq arg1 :modal-p) `(ergoemacs-command-loop--modal-p)) ((and arg1 (symbolp arg1) (eq arg1 :combine) arg2 arg3) `(ergoemacs-command-loop--combine ,arg2 ,arg3)) @@ -909,9 +909,9 @@ When arg1 can be a property. The following properties are supported: ((and arg1 (symbolp arg1) (eq arg1 :modifier-desc) arg2) `(mapconcat #'ergoemacs-key-description--modifier ,arg2 "")) - ((and arg1 (symbolp arg1) (eq arg1 :current-version)) + ((eq arg1 :current-version) `(ergoemacs-theme--get-version)) - ((and arg1 (symbolp arg1) (eq arg1 :current-theme)) + ((eq arg1 :current-theme) `(or (and ergoemacs-theme (stringp ergoemacs-theme) ergoemacs-theme) (and ergoemacs-theme (symbolp ergoemacs-theme) (symbol-name ergoemacs-theme)) "standard")) diff --git a/ergoemacs-map-properties.el b/ergoemacs-map-properties.el index 9d5bcc2..bee84a5 100644 --- a/ergoemacs-map-properties.el +++ b/ergoemacs-map-properties.el @@ -561,7 +561,7 @@ These keymaps are saved in `ergoemacs-map-properties--hook-map-hash'." (unless (equal icicle-search-key-prefix "\M-s\M-s") (ergoemacs :define-key new-map icicle-search-key-prefix icicle-search-map)) (when (and (boundp 'icicle-top-level-key-bindings) (custom-variable-p 'icicle-top-level-key-bindings)) - (setq standard (eval (car (get 'icicle-top-level-key-bindings 'standard-value)))) + (setq standard (eval (car (get 'icicle-top-level-key-bindings 'standard-value)) t)) ;; After determine if anything has changed... ;; Lifted partially from icicles (dolist (key-def icicle-top-level-key-bindings) @@ -569,7 +569,7 @@ These keymaps are saved in `ergoemacs-map-properties--hook-map-hash'." (setq key (car key-def) command (cadr key-def) condition (car (cddr key-def))) - (when (eval condition) + (when (eval condition t) (if (symbolp key) (icicle-remap key command new-map (current-global-map)) (ergoemacs :define-key new-map key command)))))) diff --git a/ergoemacs-mode.el b/ergoemacs-mode.el index a0caa1a..38e0307 100644 --- a/ergoemacs-mode.el +++ b/ergoemacs-mode.el @@ -785,7 +785,7 @@ not be useful. However instead of using (defun ergoemacs-load-aliases () "Load aliases defined in `ergoemacs-aliases'." (dolist (x ergoemacs-aliases) - (eval (macroexpand `(defalias ',(nth 0 x) ',(nth 1 x)))))) + (eval (macroexpand `(defalias ',(nth 0 x) ',(nth 1 x))) t))) (autoload 'ergoemacs-component "ergoemacs-macros") (autoload 'ergoemacs-theme-component "ergoemacs-macros") diff --git a/ergoemacs-test.el b/ergoemacs-test.el index 912ba25..9298018 100644 --- a/ergoemacs-test.el +++ b/ergoemacs-test.el @@ -1825,7 +1825,7 @@ hash appropriaetly." 0.05 nil (lambda() (throw 'found-key (mapcar (lambda(key) (if (consp key) - (key-binding (eval key)) + (key-binding (eval key t)) (key-binding key))) ',keys))))) ,minibuffer-call) diff --git a/ergoemacs-translate.el b/ergoemacs-translate.el index bf740a2..0770c0a 100644 --- a/ergoemacs-translate.el +++ b/ergoemacs-translate.el @@ -753,7 +753,8 @@ When NAME is a symbol, setup the translation function for the symbol." " while completing a key sequence.")) (define-obsolete-variable-alias ',(intern (concat "ergoemacs-" name-str "-translation-local-map")) ',(intern (concat "ergoemacs-translate--" name-str "-map")) - "Ergoemacs-v5.16")))) + "Ergoemacs-v5.16"))) + t) (ergoemacs-map-properties--label-map (intern (concat "ergoemacs-translate--" name-str "-map")) t) (ergoemacs (symbol-value (intern (concat "ergoemacs-translate--" name-str "-map"))) :only-local-modifications-p t) ;;