(markerp dabbrev--last-abbrev-location)
(marker-position dabbrev--last-abbrev-location)
(or (eq last-command this-command)
- (and (window-minibuffer-p (selected-window))
+ (and (window-minibuffer-p)
(= dabbrev--last-abbrev-location
(point)))))
;; Find a different expansion for the same abbrev as last time.
;; In a minibuffer, search the buffer it was activated from,
;; first after the minibuffer itself. Unless we aren't supposed
;; to search the current buffer either.
- (if (and (window-minibuffer-p (selected-window))
+ (if (and (window-minibuffer-p)
(not dabbrev-search-these-buffers-only))
(setq list
(cons (dabbrev--minibuffer-origin)