all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: "Tassilo Horn" <tsdh@gnu.org>,
	"Andreas Röhler" <andreas.roehler@easy-emacs.de>
Cc: 18992@debbugs.gnu.org
Subject: bug#18992: 24.4; describe-mode
Date: Sat, 8 Nov 2014 08:42:12 -0800 (PST)	[thread overview]
Message-ID: <351f43ff-d3cc-4c04-bd8a-49723c316782@default> (raw)
In-Reply-To: <62c84c79-4884-4b65-b419-0e37f96102e1@default>

> > However, in contrast to major-modes, minor mode names tend to be
> > much longer, so we can get some long lines like:
> >
> > Global-Edit-Server-Edit minor mode (`global-edit-server-edit-
> > mode'; no indicator):
> 
> Yes, that violates *Help* conventions.  It is better to use this
> (or similar): ...

Actually, we should do similarly for the major mode, even if major
mode names (including `mode-name') *tend* to be shorter.  It is good
behavior for functions printing unknown stuff to *Help* to ensure
that lines are not too long, when possible.

Something like this:

(princ " mode")
(let* ((mode       major-mode)
       (file-name  (find-lisp-object-file-name mode nil)))
  (when file-name
    (princ (concat " defined in `"
                   (file-name-nondirectory file-name) "'"))
    (with-current-buffer standard-output ; Hyperlink to library.
      (save-excursion (re-search-backward "`\\([^`']+\\)'" nil t)
                      (help-xref-button 1 'help-function-def
                                        mode file-name))))
  (with-current-buffer standard-output
    (insert (format " (`%s'):\n" mode))
    (save-excursion
      (fill-region-as-paragraph
        (line-beginning-position 0) (line-end-position 0) nil t t))))





  reply	other threads:[~2014-11-08 16:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-08  9:16 bug#18992: 24.4; describe-mode Andreas Röhler
2014-11-08 14:34 ` Tassilo Horn
2014-11-08 15:54   ` Andreas Röhler
2014-11-08 16:35     ` Drew Adams
2014-11-08 15:57   ` Drew Adams
2014-11-08 16:42     ` Drew Adams [this message]
2019-12-05 11:35   ` Stefan Kangas
2020-01-15  2:01     ` Stefan Kangas

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=351f43ff-d3cc-4c04-bd8a-49723c316782@default \
    --to=drew.adams@oracle.com \
    --cc=18992@debbugs.gnu.org \
    --cc=andreas.roehler@easy-emacs.de \
    --cc=tsdh@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.