[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help on text-properties

From: Yu,Gang
Subject: Re: help on text-properties
Date: Wed, 6 Jun 2007 17:00:06 +0800

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))
    (if (not (equal pair-line-number pos-line-number))
          (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
              (- (line-beginning-position) 30) 
              (- (line-beginning-position) 1))
              (+ (line-end-position) 1)
              (+ (line-end-position) 30)))))
          (message "%s" show-string))))))

On 6/6/07, Thien-Thi Nguyen <address@hidden> wrote:
() "Yu,Gang" <address@hidden>
() 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.

help-gnu-emacs mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]