From: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: confusing info in C-u C-x =
Date: Mon, 21 Nov 2005 09:56:45 +0100 [thread overview]
Message-ID: <43818BCD.1010105@gmx.at> (raw)
You could try the following patch:
*** descr-text.el Sat Nov 5 20:44:24 2005
--- descr-text.el Mon Nov 21 08:50:36 2005
***************
*** 144,160 ****
(goto-char (point-min)))))
;;;###autoload
! (defun describe-text-properties (pos &optional output-buffer)
"Describe widgets, buttons, overlays and text properties at POS.
Interactively, describe them for the character after point.
If optional second argument OUTPUT-BUFFER is non-nil,
insert the output into that buffer, and don't initialize or clear it
! otherwise."
(interactive "d")
(if (>= pos (point-max))
(error "No character follows specified position"))
(if output-buffer
! (describe-text-properties-1 pos output-buffer)
(if (not (or (text-properties-at pos) (overlays-at pos)))
(message "This is plain text.")
(let ((buffer (current-buffer))
--- 144,162 ----
(goto-char (point-min)))))
;;;###autoload
! (defun describe-text-properties (pos &optional output-buffer overlay-bounds)
"Describe widgets, buttons, overlays and text properties at POS.
Interactively, describe them for the character after point.
If optional second argument OUTPUT-BUFFER is non-nil,
insert the output into that buffer, and don't initialize or clear it
! otherwise.
! Optional third argument OVERLAY-BOUNDS is a list of start and end
! positions of overlays as produced by `describe-char'."
(interactive "d")
(if (>= pos (point-max))
(error "No character follows specified position"))
(if output-buffer
! (describe-text-properties-1 pos output-buffer overlay-bounds)
(if (not (or (text-properties-at pos) (overlays-at pos)))
(message "This is plain text.")
(let ((buffer (current-buffer))
***************
*** 171,177 ****
(describe-text-mode)
(goto-char (point-min))))))))
! (defun describe-text-properties-1 (pos output-buffer)
(let* ((properties (text-properties-at pos))
(overlays (overlays-at pos))
(wid-field (get-char-property pos 'field))
--- 173,179 ----
(describe-text-mode)
(goto-char (point-min))))))))
! (defun describe-text-properties-1 (pos output-buffer &optional overlay-bounds)
(let* ((properties (text-properties-at pos))
(overlays (overlays-at pos))
(wid-field (get-char-property pos 'field))
***************
*** 205,212 ****
(widget-insert "There are " (format "%d" (length overlays))
" overlays here:\n"))
(dolist (overlay overlays)
! (widget-insert " From " (format "%d" (overlay-start overlay))
! " to " (format "%d" (overlay-end overlay)) "\n")
(describe-property-list (overlay-properties overlay)))
(widget-insert "\n"))
;; Text properties
--- 207,222 ----
(widget-insert "There are " (format "%d" (length overlays))
" overlays here:\n"))
(dolist (overlay overlays)
! (if overlay-bounds
! (progn
! ;; OVERLAY-BOUNDS must be a list of the bounds of all overlays
! ;; at some "original" position. The overlays at POS are one
! ;; character wide replicas of the overlays at that position.
! (widget-insert " From " (format "%d" (caar overlay-bounds))
! " to " (format "%d" (cdar overlay-bounds)) "\n")
! (setq overlay-bounds (cdr overlay-bounds)))
! (widget-insert " From " (format "%d" (overlay-start overlay))
! " to " (format "%d" (overlay-end overlay)) "\n"))
(describe-property-list (overlay-properties overlay)))
(widget-insert "\n"))
;; Text properties
***************
*** 458,463 ****
--- 468,476 ----
(multibyte-p enable-multibyte-characters)
(overlays (mapcar #'(lambda (o) (overlay-properties o))
(overlays-at pos)))
+ (overlay-bounds ; Make list of start and end positions of overlays
+ (mapcar #'(lambda (o) (cons (overlay-start o) (overlay-end o)))
+ (nreverse (overlays-at pos))))
item-list max-width unicode)
(if (or (< char 256)
***************
*** 718,724 ****
(insert "\nSee the variable `reference-point-alist' for "
"the meaning of the rule.\n"))
! (describe-text-properties pos (current-buffer))
(describe-text-mode)))))
(defalias 'describe-char-after 'describe-char)
--- 731,737 ----
(insert "\nSee the variable `reference-point-alist' for "
"the meaning of the rule.\n"))
! (describe-text-properties pos (current-buffer) overlay-bounds)
(describe-text-mode)))))
(defalias 'describe-char-after 'describe-char)
next reply other threads:[~2005-11-21 8:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-21 8:56 martin rudalics [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-11-20 19:35 confusing info in C-u C-x = martin rudalics
2005-11-20 9:55 Werner LEMBERG
2005-11-20 15:16 ` Andreas Schwab
2005-11-21 7:35 ` Juri Linkov
2005-12-08 1:49 ` Kenichi Handa
2005-12-09 9:57 ` Juri Linkov
2005-12-09 15:07 ` Kim F. Storm
2005-12-09 21:15 ` Richard M. Stallman
2005-12-09 23:52 ` Juri Linkov
2005-12-10 16:18 ` Richard M. Stallman
2005-12-11 0:46 ` Juri Linkov
2005-12-10 22:50 ` Kim F. Storm
2005-12-11 0:55 ` Juri Linkov
2005-12-11 16:49 ` Richard M. Stallman
2005-11-20 23:21 ` Richard M. Stallman
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=43818BCD.1010105@gmx.at \
--to=rudalics@gmx.at \
--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).