GNU bug report logs - #18992
24.4; describe-mode

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> easy-emacs.de>

Date: Sat, 8 Nov 2014 09:18:02 UTC

Severity: wishlist

Tags: notabug, wontfix

Found in version 24.4

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Drew Adams <drew.adams <at> oracle.com>
To: Tassilo Horn <tsdh <at> gnu.org>, Andreas Röhler <andreas.roehler <at> easy-emacs.de>
Cc: 18992 <at> debbugs.gnu.org
Subject: bug#18992: 24.4; describe-mode
Date: Sat, 8 Nov 2014 08:42:12 -0800 (PST)
> > 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))))




This bug report was last modified 5 years and 181 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.