emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/android 327c2658ac1: Merge remote-tracking branch 'origin/master


From: Po Lu
Subject: feature/android 327c2658ac1: Merge remote-tracking branch 'origin/master' into feature/android
Date: Tue, 7 Mar 2023 02:26:24 -0500 (EST)

branch: feature/android
commit 327c2658ac1d02202118e4e0e4649496b99285f3
Merge: 44cf1ed7e59 8179555730d
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Merge remote-tracking branch 'origin/master' into feature/android
---
 lisp/emacs-lisp/comp.el      | 10 ++++++----
 lisp/icomplete.el            | 11 +++++++++++
 lisp/progmodes/elisp-mode.el |  3 ++-
 3 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 189a010ffc7..ce81680a226 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -1137,10 +1137,12 @@ with `message'.  Otherwise, log with 
`comp-log-to-buffer'."
           (comp-cstr-to-type-spec mvar)))
 
 (defun comp-prettyformat-insn (insn)
-  (cl-typecase insn
-    (comp-mvar (comp-prettyformat-mvar insn))
-    (atom (prin1-to-string insn))
-    (cons (concat "(" (mapconcat #'comp-prettyformat-insn insn " ") ")"))))
+  (cond
+   ((comp-mvar-p insn)
+    (comp-prettyformat-mvar insn))
+   ((proper-list-p insn)
+    (concat "(" (mapconcat #'comp-prettyformat-insn insn " ") ")"))
+   (t (prin1-to-string insn))))
 
 (defun comp-log-func (func verbosity)
   "Log function FUNC at VERBOSITY.
diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index e0b591739ef..49c0c78fe73 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -420,6 +420,16 @@ if that doesn't produce a completion match."
   "C-."     #'icomplete-forward-completions
   "C-,"     #'icomplete-backward-completions)
 
+(defun icomplete--fido-ccd ()
+  "Make value for `completion-category-defaults' prioritizing `flex'."
+  (cl-loop
+   for (cat . alist) in completion-category-defaults collect
+   `(,cat . ,(cl-loop
+              for entry in alist for (prop . val) = entry
+              if (eq prop 'styles)
+              collect `(,prop . (flex ,@(delq 'flex val)))
+              else collect entry))))
+
 (defun icomplete--fido-mode-setup ()
   "Setup `fido-mode''s minibuffer."
   (when (and icomplete-mode (icomplete-simple-completing-p))
@@ -431,6 +441,7 @@ if that doesn't produce a completion match."
                 icomplete-scroll (not (null icomplete-vertical-mode))
                 completion-styles '(flex)
                 completion-flex-nospace nil
+                completion-category-defaults (icomplete--fido-ccd)
                 completion-ignore-case t
                 read-buffer-completion-ignore-case t
                 read-file-name-completion-ignore-case t)))
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 27e39900830..45e3848362e 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -224,7 +224,8 @@ Use `emacs-lisp-byte-compile-and-load' in combination with
 native compilation."
   (interactive nil emacs-lisp-mode)
   (emacs-lisp--before-compile-buffer)
-  (load (native-compile buffer-file-name)))
+  (when-let ((out (native-compile buffer-file-name)))
+    (load out)))
 
 (defun emacs-lisp-macroexpand ()
   "Macroexpand the form after point.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]