Subject: bug#20260: 24.4.1; Triple-clicking selects and deselects the line in weird situations

From: Vasilij Schneidermann <[email-masked]>
Date: Wed, 8 Apr 2015 12:41:06 +0200

The patch does indeed fix the test case for me, but the real use case
stays unchanged.

Meanwhile, I've found a way to make the test case pass on 24.4,
let-binding `deactivate-mark`:

(defun repro-filter (fun beg end delete)
  (let ((string (funcall fun beg end delete))
	deactivate-mark)
    (with-temp-buffer
      (insert "."))
    string))

(with-current-buffer (get-buffer-create "*Bug*")
  (set (make-local-variable 'filter-buffer-substring-functions)
       '(repro-filter))
  (insert "Hello, World!\n")
  (pop-to-buffer (current-buffer)))

This change makes triple-clicking "World" in the *Bug* buffer no longer
deselect it.  Why it is needed in 24.4, but not in 24.3 is beyond my
understanding of Emacs.