unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: az <ujfubvur@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: question concerning overlay before-strings and property	inheritance
Date: Mon, 25 Apr 2011 22:42:14 +0000 (UTC)	[thread overview]
Message-ID: <loom.20110426T003939-813@post.gmane.org> (raw)
In-Reply-To: 83wrii81cm.fsf@gnu.org

> Why should the before-string "inherit" from o2?  

Apologies if my question was asinine, or if I appeared to be
suggesting that the existing behavior was incorrect.  I wasn't--I
was asking if there was, currently, a way to get something like
the behavior I described.

As to motivation: Consider a case in which one is using
before-strings to temporarily annotate bits of code, and using
another set of overlays to highlight stretches of code, where the
intent of the highlighting is such that it meaningfully applies
to the annotation as well as to the code itself.

> If we were to introduce such "inheritance", how would Emacs
> determine from which overlay to "inherit"?

This has already been decided and implemented for mouse-face
properties:

(save-excursion
  (goto-char 1)
  (insert ";; String\n")
  (let ((o (make-overlay 6 7))
        (o2 (make-overlay 4 8)))
    (overlay-put o 'before-string "FOO")
    (overlay-put o2 'mouse-face 'highlight)))





      reply	other threads:[~2011-04-25 22:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-25 20:34 question concerning overlay before-strings and property inheritance az
2011-04-25 21:31 ` Eli Zaretskii
2011-04-25 22:42   ` az [this message]

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=loom.20110426T003939-813@post.gmane.org \
    --to=ujfubvur@gmail.com \
    --cc=help-gnu-emacs@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.
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).