From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: confusing info in C-u C-x = Date: Mon, 21 Nov 2005 09:56:45 +0100 Message-ID: <43818BCD.1010105@gmx.at> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1132564333 23569 80.91.229.2 (21 Nov 2005 09:12:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 Nov 2005 09:12:13 +0000 (UTC) Cc: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 21 10:12:07 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Ee7iT-0006vL-Hi for ged-emacs-devel@m.gmane.org; Mon, 21 Nov 2005 10:12:01 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ee7iS-0008Ns-JV for ged-emacs-devel@m.gmane.org; Mon, 21 Nov 2005 04:12:00 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Ee7YL-0004PZ-K2 for emacs-devel@gnu.org; Mon, 21 Nov 2005 04:01:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Ee7YJ-0004Mh-Tk for emacs-devel@gnu.org; Mon, 21 Nov 2005 04:01:32 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Ee7YH-0004MI-IY for emacs-devel@gnu.org; Mon, 21 Nov 2005 04:01:31 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1Ee7YG-000658-Uv for emacs-devel@gnu.org; Mon, 21 Nov 2005 04:01:29 -0500 Original-Received: (qmail invoked by alias); 21 Nov 2005 09:01:27 -0000 Original-Received: from N744P024.adsl.highway.telekom.at (EHLO [62.47.36.248]) [62.47.36.248] by mail.gmx.net (mp015) with SMTP; 21 Nov 2005 10:01:27 +0100 X-Authenticated: #14592706 User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: de-DE, de, en-us, en Original-To: wl@gnu.org X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46397 Archived-At: 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)