all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah Lee <xahlee@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: usability problem of emacs describe-mode
Date: Wed, 25 Feb 2009 11:30:35 -0800 (PST)	[thread overview]
Message-ID: <bf8c3d6f-b6c3-4c71-bce9-4fce8ad5b36f@a12g2000yqm.googlegroups.com> (raw)
In-Reply-To: mailman.1767.1235574258.31690.help-gnu-emacs@gnu.org

On Feb 25, 7:04 am, "Drew Adams" <drew.ad...@oracle.com> 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 “^L” as a horizontal line. Code by Sébastien
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 “^L” 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
∑ http://xahlee.org/

  parent reply	other threads:[~2009-02-25 19:30 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <76fcf833-ad89-44f2-b227-e18295317ca2@p13g2000yqc.googlegroups.com>
2009-02-23 19:14 ` usability problem of emacs describe-mode Zachary Kline
2009-02-23 21:48   ` Xah Lee
2009-02-23 19:27 ` Andreas Politz
2009-02-24 20:36   ` Xah Lee
2009-02-24 23:22     ` Andreas Politz
2009-02-25 19:11       ` Xah Lee
2009-02-23 19:49 ` Tassilo Horn
2009-02-23 21:35 ` Xah Lee
2009-02-24 17:41   ` B. T. Raven
2009-02-24 20:32     ` Xah Lee
2009-02-24 22:48       ` B. T. Raven
2009-02-24 23:31         ` Xah Lee
2009-02-25  8:11   ` Kevin Rodgers
2009-02-25  9:17   ` cmr.Pent
2009-02-25 12:11     ` Sébastien Vauban
2009-02-25 12:58       ` Tassilo Horn
2009-02-25 12:46     ` Tassilo Horn
2009-02-25 15:04     ` Drew Adams
     [not found]     ` <mailman.1767.1235574258.31690.help-gnu-emacs@gnu.org>
2009-02-25 19:30       ` Xah Lee [this message]
2009-02-25 19:50         ` Teemu Likonen
     [not found]           ` <e14cdb27-5dcc-4ad4-93ba-81ed6d938b0b@q9g2000yqc.googlegroups.com>
2009-02-26 19:33             ` Improving Emacs (was: usability problem of emacs describe-mode) Teemu Likonen
2009-03-01 23:34               ` Xah Lee
2009-03-02  5:57                 ` Improving Emacs Teemu Likonen
2009-02-26 18:24         ` usability problem of emacs describe-mode Drew Adams
     [not found]         ` <mailman.1878.1235672676.31690.help-gnu-emacs@gnu.org>
2009-02-27  2:21           ` Giorgos Keramidas
     [not found]           ` <fbf7d92c-ae58-4d1b-83b6-d292df8e95a4@u18g2000pro.googlegroups.com>
2009-02-27  8:44             ` cmr.Pent
2009-02-27  9:56               ` Lennart Borgman
2009-02-27  9:46             ` David Kastrup
2009-02-27 15:56             ` Alan Mackenzie
2009-02-27 20:34               ` Xah Lee
2009-02-27 21:32                 ` David Kastrup
2009-02-27 22:24                 ` Xah Lee
2009-02-27 23:55                 ` Lennart Borgman
2009-02-28  0:58                   ` Lennart Borgman
2009-02-28  8:57       ` Xah Lee
2009-02-28 15:47         ` Drew Adams
     [not found]         ` <mailman.2089.1235836078.31690.help-gnu-emacs@gnu.org>
2009-03-02  1:46           ` Xah Lee
2009-03-02 15:50             ` Drew Adams
     [not found]             ` <mailman.2216.1236009036.31690.help-gnu-emacs@gnu.org>
2009-03-02 21:09               ` Xah Lee
2009-03-02 21:15                 ` Xah Lee
     [not found]   ` <mailman.1728.1235549474.31690.help-gnu-emacs@gnu.org>
2009-02-25 19:13     ` Xah Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf8c3d6f-b6c3-4c71-bce9-4fce8ad5b36f@a12g2000yqm.googlegroups.com \
    --to=xahlee@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.