From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#20385: [PATCH] Support curved quotes in doc strings Date: Wed, 20 May 2015 05:22:00 +0300 Message-ID: <555BEFC8.3080307@yandex.ru> References: <1429555155-4695-1-git-send-email-eggert@cs.ucla.edu> <5552FDAC.4080004@cs.ucla.edu> <55534080.6010400@yandex.ru> <555369FD.30701@cs.ucla.edu> <5553D12F.7000809@yandex.ru> <5554155E.70000@cs.ucla.edu> <55547DC6.3090509@yandex.ru> <5555A4ED.8090500@cs.ucla.edu> <55562BB0.2010605@yandex.ru> <555640E9.4060203@cs.ucla.edu> <55564460.4020208@yandex.ru> <55566196.40105@cs.ucla.edu> <55566990.8020506@yandex.ru> <555686B7.60808@cs.ucla.edu> <55568B3E.5040704@yandex.ru> <5556A205.3040503@cs.ucla.edu> <5556FF7E.8070006@yandex.ru> <555BC6F6.8020305@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1432089450 6890 80.91.229.3 (20 May 2015 02:37:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 May 2015 02:37:30 +0000 (UTC) To: Paul Eggert , 20385@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 20 04:37:20 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Yutsl-0001NO-2J for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 May 2015 04:37:19 +0200 Original-Received: from localhost ([::1]:49607 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yutsk-0005HP-9U for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 May 2015 22:37:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yutse-0005HC-Es for bug-gnu-emacs@gnu.org; Tue, 19 May 2015 22:37:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yutex-00037n-BH for bug-gnu-emacs@gnu.org; Tue, 19 May 2015 22:23:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yutex-00037X-3s for bug-gnu-emacs@gnu.org; Tue, 19 May 2015 22:23:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Yutew-0003w4-Lr for bug-gnu-emacs@gnu.org; Tue, 19 May 2015 22:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 May 2015 02:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20385 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 20385-submit@debbugs.gnu.org id=B20385.143208853115052 (code B ref 20385); Wed, 20 May 2015 02:23:02 +0000 Original-Received: (at 20385) by debbugs.gnu.org; 20 May 2015 02:22:11 +0000 Original-Received: from localhost ([127.0.0.1]:50483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yute6-0003ui-A3 for submit@debbugs.gnu.org; Tue, 19 May 2015 22:22:10 -0400 Original-Received: from mail-wg0-f51.google.com ([74.125.82.51]:34623) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yute3-0003uU-VV for 20385@debbugs.gnu.org; Tue, 19 May 2015 22:22:08 -0400 Original-Received: by wghq2 with SMTP id q2so37380672wgh.1 for <20385@debbugs.gnu.org>; Tue, 19 May 2015 19:22:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=QUJonf9aBiIjY+nRhk9rUDsFzjCdHy/DWkJ6pATuhNs=; b=yz9IUPF2FrS+Fdp5u5SI/jXdsAMd8Ohm1su+M3uDgev7G8qGDhroXJVvm1vZRmasVC 2P7R7iuRH04R+/yIVz55F3DEAjPqdHPTptE+qZlHWQfDki793W9yFaa0OAbfmQQ+2yho Jlv5F+mPo1PNQH56QPw6FG1CNlW+uz4J3EeWmCDykSGvxSkImQX303uVs9lFGmaL3QbR WWXix4AQ/PQjJ8sPkhiuJezis/Sf3ZbcpNbbuNUGL9NrwgeiJBl4e6zQH1TkJMjeUery j5HGxQKFCy9izLoT0jJ/5eSxZuzuJTntfLF4f1WBeuN3vmTCFxk6Xo/ETWnWs1RPzyqW 788g== X-Received: by 10.194.76.73 with SMTP id i9mr61046748wjw.149.1432088522405; Tue, 19 May 2015 19:22:02 -0700 (PDT) Original-Received: from [192.168.1.2] ([82.102.93.54]) by mx.google.com with ESMTPSA id u6sm24358929wjy.13.2015.05.19.19.22.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 May 2015 19:22:02 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 In-Reply-To: <555BC6F6.8020305@cs.ucla.edu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:102970 Archived-At: On 05/20/2015 02:27 AM, Paul Eggert wrote: > OK, I tried that, but it didn't work for me. The attached patch works > much of the time, but it causes annoying glitches on the screen (for an > example see attached, created by "emacs -Q" and 'C-h b'; note the red > color glitch after the double-quote). That's how a string is highlighted. :) You can press C-u C-x = to see which face is used there. So apparently, font-lock-add-keywords turns on font-lock-mode, and since it's never set up in help-mode otherwise, syntactic fontification is used (and " is a string delimiter in the standard syntax table). Adding this (t is the key) before the call resolves that: (setq font-lock-defaults '(nil t)) But in a major mode, I think you're expected to apply all font-lock settings via setting font-lock-defaults, not by using font-lock-add-keywords (the format of keywords is the same). > Even if I ignore the glitches, I found it disconcerting that the "wrong" > characters were used to display text characters (or, from another point > of view, that the buffer's contents were "wrong" compared to what was on > the screen). That shouldn't matter much in a read-only buffer... > So I'm inclined to do something less tricky, e.g., simply > replace characters in the *Help* buffer before displaying the buffer. I > plan to look into that next. ...but indeed, this approach could be the simpler one.