all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Yu,Gang" <wuhanyugang@gmail.com>
To: "Thien-Thi Nguyen" <ttn@gnuvola.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: help on text-properties
Date: Wed, 6 Jun 2007 17:00:06 +0800	[thread overview]
Message-ID: <48378d570706060200v4ea7b9d2oe6c75e1012f9dbb3@mail.gmail.com> (raw)
In-Reply-To: <87zm3dy2qf.fsf@ambire.localdomain>


[-- Attachment #1.1: Type: text/plain, Size: 1956 bytes --]

Thanks, I get things run now~

(defun show-paren-minibuffer (pair-point pos)
  "show the paren pair in the minibuffer"
  (if (not (pos-visible-in-window-p pair-point))
      (let ((pair-line-number (line-number-at-pos pair-point))
        (pos-line-number (line-number-at-pos pos))
        show-string
        offset)
    (if (not (equal pair-line-number pos-line-number))
        (save-excursion
          (goto-line pair-line-number)
          (setq offset (- pair-point (line-beginning-position)))
          (setq show-string (buffer-substring (line-beginning-position)
(line-end-position)))
          (if (> pos pair-point)
          (add-text-properties offset (+ offset 1) '(fontified t face
highlight) show-string)
        (add-text-properties (- offset 1) offset '(fontified t face
highlight) show-string))
          (if (< (length show-string) 20)
          (setq show-string
            (concat
             (buffer-substring
              (- (line-beginning-position) 30)
              (- (line-beginning-position) 1))
             "\n"
             show-string
             "\n"
             (buffer-substring
              (+ (line-end-position) 1)
              (+ (line-end-position) 30)))))
          (message "%s" show-string))))))

On 6/6/07, Thien-Thi Nguyen <ttn@gnuvola.org> wrote:
>
> () "Yu,Gang" <wuhanyugang@gmail.com>
> () Wed, 6 Jun 2007 13:15:35 +0800
>
>    (set-text-properties offset offset ...)
>
>    How can I sovle the problem?
>
> what is the distance between offset and offset?
> (would be a fine number to count if but "not yet".)
> when an expression paints pictures in thin air,
> can memory alone suffice to record what's there?
> if desire to build is too strong, one reflects,
> it's easy to miss what is wrong, through neglect.
>
> thi
> _______________________________________________
> help-gnu-emacs mailing list
> help-gnu-emacs@gnu.org
> http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
>



-- 
YuGang

[-- Attachment #1.2: Type: text/html, Size: 3643 bytes --]

[-- Attachment #2: Type: text/plain, Size: 152 bytes --]

_______________________________________________
help-gnu-emacs mailing list
help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs

  reply	other threads:[~2007-06-06  9:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1619.1181106948.32220.help-gnu-emacs@gnu.org>
2007-06-06  7:13 ` help on text-properties Thien-Thi Nguyen
2007-06-06  9:00   ` Yu,Gang [this message]
2007-06-06  5:15 Yu,Gang
2007-06-06  8:31 ` Kim F. Storm

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=48378d570706060200v4ea7b9d2oe6c75e1012f9dbb3@mail.gmail.com \
    --to=wuhanyugang@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=ttn@gnuvola.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.