Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplify some code

Just replacing some code with equivalent clearer code.
  • Loading branch information...
commit 7f6753cd39cfefc36f8e0cbf13c2d88b361c3c3d 1 parent 9d73211
@DarwinAwardWinner DarwinAwardWinner authored
Showing with 7 additions and 6 deletions.
  1. +7 −6 ido-ubiquitous.el
View
13 ido-ubiquitous.el
@@ -154,12 +154,13 @@ be used as the value of `completing-read-function'."
hist def inherit-input-method)))))
(defadvice ido-completing-read (around detect-replacing-cr activate)
- (if ido-next-call-replaces-completing-read
- (let ((ido-next-call-replaces-completing-read nil)
- (ido-this-call-replaces-completing-read t))
- ad-do-it)
- (let ((ido-this-call-replaces-completing-read nil))
- ad-do-it)))
+ ;; Determine whether this call to `ido-completing-read' was done
+ ;; through the ido-ubiquitous wrapper `completing-read-ido'.
+ (let* ((ido-this-call-replaces-completing-read ido-next-call-replaces-completing-read)
+ (ido-next-call-replaces-completing-read nil))
+ ad-do-it))
+
+(defadvice ido-completing-read (before handle-default-initial-conflict activate)
(defmacro ido-ubiquitous-disable-in (func)
"Disable ido-ubiquitous in FUNC."
Please sign in to comment.
Something went wrong with that request. Please try again.