From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: usability problem of emacs describe-mode Date: Wed, 25 Feb 2009 11:30:35 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <76fcf833-ad89-44f2-b227-e18295317ca2@p13g2000yqc.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1235637594 30464 80.91.229.12 (26 Feb 2009 08:39:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 26 Feb 2009 08:39:54 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Feb 26 09:41:08 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lcbnh-0004Gx-2f for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Feb 2009 09:41:01 +0100 Original-Received: from localhost ([127.0.0.1]:59088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LcbmM-0000yt-8F for geh-help-gnu-emacs@m.gmane.org; Thu, 26 Feb 2009 03:39:38 -0500 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!a12g2000yqm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 81 Original-NNTP-Posting-Host: 24.6.175.142 Original-X-Trace: posting.google.com 1235590236 3791 127.0.0.1 (25 Feb 2009 19:30:36 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 25 Feb 2009 19:30:36 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: a12g2000yqm.googlegroups.com; posting-host=24.6.175.142; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:167075 X-Mailman-Approved-At: Thu, 26 Feb 2009 03:36:46 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:62393 Archived-At: On Feb 25, 7:04 am, "Drew Adams" wrote: > > > * Get rid of convention of using ^L (ascii 12) for page break > > > marker. > > > Is there a way to draw a sort of horizontal line for the ASCII 12 > > symbol instead of printing "^L"? I'm talking about X version. > > Yes. > > Code:http://www.emacswiki.org/emacs/pp-c-l.el > Description:http://www.emacswiki.org/emacs/PrettyControlL > > You can customize the appearance. > The screenshot shows the default appearance. Thanks Drew and others. I have currently these code: ;; code by Kevin Rodgers. 2009-02-25 (defun describe-major-mode () "Show inline doc for current major-mode." (interactive) (describe-function major-mode)) ;; display page delimiter =E2=80=9C^L=E2=80=9D as a horizontal line. Code b= y S=C3=A9bastien Vauban. 2009-02-25 (or standard-display-table (setq standard-display-table (make-display-table))) (aset standard-display-table ?\f (vconcat "\n" (make-vector 60 ?-) "^L \n")) ;; Display the =E2=80=9C^L=E2=80=9D page break mark as a horizontal line ;; from http://www.emacswiki.org/emacs/OverlayControlL , 2009-02-25 ;; code by Andre Riemann (add-hook 'after-change-major-mode-hook (lambda () (font-lock-add-keywords nil `((,page-delimiter ;; variable with the regexp (usually "^\f" or "^^L") 0 (prog1 nil ;; don't display ^L (compose-region (match-beginning 0) (match-end 0) "") ;; make an overlay (like in hl-line) (let ((pdl (make-overlay (line-beginning-position) (line-beginning-position 2)))) ;; :background has to be different from the background color ;; gray1 here is just a little different from black (overlay-put pdl 'face '(:underline "gray30" :background "gray1")) (overlay-put pdl 'modification-hooks ;; these arguments are received from modification-hooks '((lambda (overlay after-p begin end &optional length) (delete-overlay overlay)))) (overlay-put pdl 'insert-in-front-hooks '((lambda (overlay after-p begin end &optional length) (delete-overlay overlay)))))) t))))) (haven't tried Drew's PrettyControlL, the Andre code i just happened to tried first) If people think this is a problem, please perhaps file a bug report to FSF. (Alt+x report-emacs-bug) There are many diverse solutions on the web, but they need to become part of emacs out of the box. Xah =E2=88=91 http://xahlee.org/ =E2=98=84