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

Re: deleting text in FRED windows



>IS there a way to delete text so that the memory it occupies
>is guaranteed to be reclaimed, ie, to delete it WITHOUT putting it
>on the kill ring or adding an UNDO entry for it (and preferebly, 
>not putting it in the Clipboard either)? 
>
>Though its not my preferred method, I assume that deleting a window
>DOES delete its contents irretrievably.

MCL does not have any keys bound to a function that will do
what you want. Making one yourself is easy:

(defun ed-delete-selection-silently (self)
  (multiple-value-bind (b e) (selection-range self)
    (unless (eql b e)
      (let ((buf (fred-buffer self)))
        (buffer-delete buf b e)))))

(def-fred-command (:control :meta #\w) ed-delete-selection-silently)


You may want to bind this to a different key or make it a menu item.