From: "Drew Adams" <drew.adams@oracle.com>
To: <emacs-devel@gnu.org>
Subject: RE: patch to fill overlong lines in `describe-key'
Date: Mon, 11 Feb 2008 22:18:32 -0800 [thread overview]
Message-ID: <003501c86d3f$183e9160$405a908d@us.oracle.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 403 bytes --]
I mistakenly sent the wrong patch for help-fns.el. I sent a patch that added
command `describe-option' and such - something unrelated. Attached are
updated patches wrt today's CVS.
And here's a change log entry:
2008-02-11 Drew Adams <drew.adams@oracle.com>
* help.el (describe-key): Joined some split lines to facilitate
filling.
* help-fns.el (describe-function-1): Fill text of overlong lines.
[-- Attachment #2: help-fns-2008-02-11.patch --]
[-- Type: application/octet-stream, Size: 3225 bytes --]
diff -c -w help-fns-CVS-2008-02-11.el help-fns-patched-2008-02-11.el
*** help-fns-CVS-2008-02-11.el Mon Feb 11 14:23:56 2008
--- help-fns-patched-2008-02-11.el Mon Feb 11 14:28:46 2008
***************
*** 269,275 ****
(symbol-function real-function)
function))
file-name string
! (beg (if (commandp def) "an interactive " "a ")))
(setq string
(cond ((or (stringp def) (vectorp def))
"a keyboard macro")
--- 269,276 ----
(symbol-function real-function)
function))
file-name string
! (beg (if (commandp def) "an interactive " "a "))
! (pt1 (with-current-buffer (help-buffer) (point))))
(setq string
(cond ((or (stringp def) (vectorp def))
"a keyboard macro")
***************
*** 358,365 ****
(re-search-backward "`\\([^`']+\\)'" nil t)
(help-xref-button 1 'help-function-def real-function file-name))))
(princ ".")
! (terpri)
(when (commandp function)
(if (and (eq function 'self-insert-command)
(eq (key-binding "a") 'self-insert-command)
(eq (key-binding "b") 'self-insert-command)
--- 359,370 ----
(re-search-backward "`\\([^`']+\\)'" nil t)
(help-xref-button 1 'help-function-def real-function file-name))))
(princ ".")
! (with-current-buffer (help-buffer)
! (fill-region-as-paragraph (save-excursion (goto-char pt1) (forward-line 0) (point))
! (point)))
! (terpri)(terpri)
(when (commandp function)
+ (let ((pt2 (with-current-buffer (help-buffer) (point))))
(if (and (eq function 'self-insert-command)
(eq (key-binding "a") 'self-insert-command)
(eq (key-binding "b") 'self-insert-command)
***************
*** 379,385 ****
(princ "'"))
(when keys
! (princ (if remapped " which is bound to " "It is bound to "))
;; If lots of ordinary text characters run this command,
;; don't mention them one by one.
(if (< (length non-modified-keys) 10)
--- 384,390 ----
(princ "'"))
(when keys
! (princ (if remapped ", which is bound to " "It is bound to "))
;; If lots of ordinary text characters run this command,
;; don't mention them one by one.
(if (< (length non-modified-keys) 10)
***************
*** 393,399 ****
(princ "many ordinary text characters"))))
(when (or remapped keys non-modified-keys)
(princ ".")
! (terpri)))))
(let* ((arglist (help-function-arglist def))
(doc (documentation function))
(usage (help-split-fundoc doc function)))
--- 398,406 ----
(princ "many ordinary text characters"))))
(when (or remapped keys non-modified-keys)
(princ ".")
! (terpri))))
! (with-current-buffer (help-buffer) (fill-region-as-paragraph pt2 (point)))
! (terpri)))
(let* ((arglist (help-function-arglist def))
(doc (documentation function))
(usage (help-split-fundoc doc function)))
Diff finished. Mon Feb 11 14:29:35 2008
[-- Attachment #3: help-2008-02-11.patch --]
[-- Type: application/octet-stream, Size: 2164 bytes --]
diff -c -w help-CVS-2008-02-11.el help-patched-2008-02-11.el
*** help-CVS-2008-02-11.el Mon Feb 11 14:34:04 2008
--- help-patched-2008-02-11.el Mon Feb 11 14:45:52 2008
***************
*** 745,752 ****
(with-help-window (help-buffer)
(princ (help-key-description key untranslated))
(princ (format "\
! %s runs the command %S
! which is "
mouse-msg defn))
(describe-function-1 defn)
(when up-event
--- 745,751 ----
(with-help-window (help-buffer)
(princ (help-key-description key untranslated))
(princ (format "\
! %s runs the command %S, which is "
mouse-msg defn))
(describe-function-1 defn)
(when up-event
***************
*** 757,768 ****
----------------- up-event %s----------------
! <%S>%s%s runs the command %S
! which is "
(if mouse-1-tricky "(short click) " "")
ev-type mouse-msg
(if mouse-1-remapped
! " is remapped to <mouse-2>\nwhich" "")
defn-up))
(describe-function-1 defn-up))
(unless (or (null defn-up-tricky)
--- 756,766 ----
----------------- up-event %s----------------
! <%S>%s%s runs the command %S, which is "
(if mouse-1-tricky "(short click) " "")
ev-type mouse-msg
(if mouse-1-remapped
! " is remapped to <mouse-2>, which" "")
defn-up))
(describe-function-1 defn-up))
(unless (or (null defn-up-tricky)
***************
*** 773,780 ****
----------------- up-event (long click) ----------------
Pressing <%S>%s for longer than %d milli-seconds
! runs the command %S
! which is "
ev-type mouse-msg
mouse-1-click-follows-link
defn-up-tricky))
--- 771,777 ----
----------------- up-event (long click) ----------------
Pressing <%S>%s for longer than %d milli-seconds
! runs the command %S, which is "
ev-type mouse-msg
mouse-1-click-follows-link
defn-up-tricky))
Diff finished. Mon Feb 11 14:46:11 2008
next reply other threads:[~2008-02-12 6:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-12 6:18 Drew Adams [this message]
2008-02-12 7:11 ` patch to fill overlong lines in `describe-key' Bastien
-- strict thread matches above, loose matches on Subject: below --
2008-01-03 19:59 Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='003501c86d3f$183e9160$405a908d@us.oracle.com' \
--to=drew.adams@oracle.com \
--cc=emacs-devel@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).