From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.devel Subject: face vs. mouse-face text property Date: Wed, 18 Jan 2012 22:34:32 +0100 Message-ID: <87pqegeluf.fsf@web.de> Reply-To: emacs-devel@gnu.org, michael_heerdegen@web.de NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1326922404 20345 80.91.229.12 (18 Jan 2012 21:33:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 18 Jan 2012 21:33:24 +0000 (UTC) To: Emacs Development Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jan 18 22:33:19 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Rnd88-00077D-KT for ged-emacs-devel@m.gmane.org; Wed, 18 Jan 2012 22:33:16 +0100 Original-Received: from localhost ([::1]:42789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rnd88-0007SY-77 for ged-emacs-devel@m.gmane.org; Wed, 18 Jan 2012 16:33:16 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:60096) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rnd86-0007SS-3r for emacs-devel@gnu.org; Wed, 18 Jan 2012 16:33:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rnd84-0007rY-TQ for emacs-devel@gnu.org; Wed, 18 Jan 2012 16:33:14 -0500 Original-Received: from fmmailgate01.web.de ([217.72.192.221]:38079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rnd84-0007rM-MG for emacs-devel@gnu.org; Wed, 18 Jan 2012 16:33:12 -0500 Original-Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate01.web.de (Postfix) with ESMTP id 971CE1A90C5B7 for ; Wed, 18 Jan 2012 22:33:11 +0100 (CET) Original-Received: from snow ([89.204.155.13]) by smtp.web.de (mrweb002) with ESMTPA (Nemesis) id 0LsQ9o-1Spaaj0Hm4-012LXL; Wed, 18 Jan 2012 22:33:11 +0100 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) X-Provags-ID: V02:K0:zr3gJqGk7R2JonNu85m33gwsxKBJHmcvSNZLFNDSsOD hyHxVQGxpWaoPGv0PnklkSFtRRPYrfpKsSlVGd9U7aOJID5jSO gUhpOukbUxsIPgFB/veSQsnFRtJebM14f3hZ9S0ogsqcKnbtd9 7DPLQpExDZFxpSaeFEunIU8kgai5zztAHCksMy+uGhP/1A69Rm sdEW6DTFTxTFO8kdEm0t0eCQcRSFSZE9/+H8TmwTJw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 217.72.192.221 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:147715 Archived-At: Hello, I recognized that the area highlighted when using a mouse-face is different from that when using the face text property when the propertized string includes newlines. For example, try that: (with-current-buffer (generate-new-buffer "test") (pop-to-buffer (current-buffer)) (let ((o1 (make-overlay (point) (progn (insert "\n\n") (point))))) (overlay-put o1 'face 'highlight)) (insert "\n--\n") (let ((o2 (make-overlay (point) (progn (insert "\n\n") (point))))) (overlay-put o2 'mouse-face 'highlight))) While the first overlay is visible, you see nothing at all when you move the mouse over the second overlay. If you try this: (with-current-buffer (generate-new-buffer "test") (pop-to-buffer (current-buffer)) (let ((o1 (make-overlay (point) (progn (insert "\ntext\n") (point))))) (overlay-put o1 'face 'highlight)) (insert "\n--\n") (let ((o2 (make-overlay (point) (progn (insert "\ntext\n") (point))))) (overlay-put o2 'mouse-face 'highlight))) the first newline in the second overlay gets highlighted when you move the mouse over it, but not the second newline char. My question is: is this a bug, or intended behavior? If it is intended, why, and is there a way to get the mouse highlighting nevertheless work or to override the default behavior? In my scenario, it is important that the mouse-face works also for strings consisting of newlines, to indicate that it's clickable text. Thanks, Michael.