Commit c1677234 authored by Stefan Monnier's avatar Stefan Monnier
Browse files

* lisp/mpc.el (mpc-reorder): Don't bother splitting the "active" elements

to the first part if they're the same as the selection.
parent 9e6adaec
2014-08-12 Stefan Monnier <monnier@iro.umontreal.ca>
* mpc.el (mpc-reorder): Don't bother splitting the "active"s elements
to the first part if they're the same as the selection.
2014-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org> 2014-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
   
* image-mode.el (image-transform-reset): New command and menu item. * image-mode.el (image-transform-reset): New command and menu item.
...@@ -2080,9 +2085,9 @@ ...@@ -2080,9 +2085,9 @@
2014-05-30 Alan Mackenzie <acm@muc.de> 2014-05-30 Alan Mackenzie <acm@muc.de>
   
Guard (looking-at "\\s!") from XEmacs. Guard (looking-at "\\s!") from XEmacs.
* progmodes/cc-engine.el (c-state-pp-to-literal): add guard form. * progmodes/cc-engine.el (c-state-pp-to-literal): Add guard form.
   
2014-05-30 Ken Olum <kdo@cosmos.phy.tufts.edu> (tiny change) 2014-05-30 Ken Olum <kdo@cosmos.phy.tufts.edu>
   
* mail/rmail.el (rmail-delete-forward, rmail-delete-backward): * mail/rmail.el (rmail-delete-forward, rmail-delete-backward):
The argument COUNT is now optional, to be more backward-compatible. The argument COUNT is now optional, to be more backward-compatible.
......
...@@ -1624,7 +1624,7 @@ Return non-nil if a selection was deactivated." ...@@ -1624,7 +1624,7 @@ Return non-nil if a selection was deactivated."
(setq active (setq active
(if (listp active) (mpc-intersection active vals) vals)))) (if (listp active) (mpc-intersection active vals) vals))))
(when (and (listp active)) (when (listp active)
;; Remove the selections if they are all in conflict with ;; Remove the selections if they are all in conflict with
;; other constraints. ;; other constraints.
(let ((deactivate t)) (let ((deactivate t))
...@@ -1638,8 +1638,14 @@ Return non-nil if a selection was deactivated." ...@@ -1638,8 +1638,14 @@ Return non-nil if a selection was deactivated."
(setq selection nil) (setq selection nil)
(mapc 'delete-overlay mpc-select) (mapc 'delete-overlay mpc-select)
(setq mpc-select nil) (setq mpc-select nil)
(mpc-tagbrowser-all-select))))) (mpc-tagbrowser-all-select))))
;; Don't bother splitting the "active" elements to the first part if
;; they're the same as the selection.
(when (equal (sort (copy-sequence active) #'string-lessp)
(sort (copy-sequence selection) #'string-lessp))
(setq active 'all)))
;; FIXME: This `mpc-sort' takes a lot of time. Maybe we should ;; FIXME: This `mpc-sort' takes a lot of time. Maybe we should
;; be more clever and presume the buffer is mostly sorted already. ;; be more clever and presume the buffer is mostly sorted already.
(mpc-sort (if (listp active) active)) (mpc-sort (if (listp active) active))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment