emacs-devel
[Top][All Lists]
Advanced

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

Re: keymap in yank-excluded-properties


From: Tak Ota
Subject: Re: keymap in yank-excluded-properties
Date: Fri, 23 Aug 2002 16:04:27 -0700 (PDT)

Fri, 23 Aug 2002 18:29:49 -0400: "Stefan Monnier" <monnier+gnu/address@hidden> 
wrote:

> > > [BTW, if it's decided that this _is_ a good feature, please call the
> > > property something like `yank-preserved-properties' (actually I'm rather
> > > fond of `yankable-properties') and make it a list of property names or t.]
> > 
> > Sorry that the diff makes the change look complicated but what I
> > proposed was an introduction of a new text property
> > `yank-preserve-all-properties' instead of a new variable
> > `yankable-properties' that holds properties to preserve.  The actual
> 
> Miles didn't propose a variable.  He just suggested a more general
> property with a different name and which includes yours as a special case.

I see.  Thanks for correcting my understanding.  That makes sense.  So
in case of table the value of `yankable-properties' property should be
like (keymap)?  That is a good idea I think.  The implementation
probably is a bit more elaborate than what I proposed though.

> Use the -b and -w switches to diff to make the diff more human
> readable (and a bit less computer-usable, but it's OK in this case).

Yes, it looks much better.  Thanks.

*** ../../pure/emacs-21.3.50/lisp/subr.el       Fri Aug  2 21:26:30 2002
--- subr.el     Fri Aug 23 13:54:44 2002
***************
*** 1415,1420 ****
--- 1415,1421 ----
  (defun remove-yank-excluded-properties (start end)
    "Remove `yank-excluded-properties' between START and END positions.
  Replaces `category' properties with their defined properties."
+   (unless (text-property-any start end 'yank-preserve-all-properties t)
      (let ((inhibit-read-only t))
        ;; Replace any `category' property with the properties it stands for.
        (unless (memq yank-excluded-properties '(t nil))
***************
*** 1435,1441 ****
      (if (eq yank-excluded-properties t)
        (set-text-properties start end nil)
        (remove-list-of-text-properties start end
!                                     yank-excluded-properties))))
  
  (defun insert-for-yank (&rest strings)
    "Insert STRINGS at point, stripping some text properties.
--- 1436,1442 ----
        (if (eq yank-excluded-properties t)
          (set-text-properties start end nil)
        (remove-list-of-text-properties start end
!                                       yank-excluded-properties)))))
  
  (defun insert-for-yank (&rest strings)
    "Insert STRINGS at point, stripping some text properties.

-Tak




reply via email to

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