comparison lisp/facemenu.el @ 17073:5e66b1087c94

Change put-text-property with constant args to add-text-properties for efficiency. Suggested by Stavros Macrakis <s.macrakis@opengroup.org>
author Boris Goldowsky <boris@gnu.org>
date Mon, 24 Feb 1997 17:47:07 +0000
parents a0cfcb9f8033
children c2640d101ca9
comparison
equal deleted inserted replaced
17072:b14c67f044a6 17073:5e66b1087c94
358 (defun facemenu-set-invisible (start end) 358 (defun facemenu-set-invisible (start end)
359 "Make the region invisible. 359 "Make the region invisible.
360 This sets the `invisible' text property; it can be undone with 360 This sets the `invisible' text property; it can be undone with
361 `facemenu-remove-special'." 361 `facemenu-remove-special'."
362 (interactive "r") 362 (interactive "r")
363 (put-text-property start end 'invisible t)) 363 (add-text-properties start end '(invisible t)))
364 364
365 ;;;###autoload 365 ;;;###autoload
366 (defun facemenu-set-intangible (start end) 366 (defun facemenu-set-intangible (start end)
367 "Make the region intangible: disallow moving into it. 367 "Make the region intangible: disallow moving into it.
368 This sets the `intangible' text property; it can be undone with 368 This sets the `intangible' text property; it can be undone with
369 `facemenu-remove-special'." 369 `facemenu-remove-special'."
370 (interactive "r") 370 (interactive "r")
371 (put-text-property start end 'intangible t)) 371 (add-text-properties start end '(intangible t)))
372 372
373 ;;;###autoload 373 ;;;###autoload
374 (defun facemenu-set-read-only (start end) 374 (defun facemenu-set-read-only (start end)
375 "Make the region unmodifiable. 375 "Make the region unmodifiable.
376 This sets the `read-only' text property; it can be undone with 376 This sets the `read-only' text property; it can be undone with
377 `facemenu-remove-special'." 377 `facemenu-remove-special'."
378 (interactive "r") 378 (interactive "r")
379 (put-text-property start end 'read-only t)) 379 (add-text-properties start end '(read-only t)))
380 380
381 ;;;###autoload 381 ;;;###autoload
382 (defun facemenu-remove-props (start end) 382 (defun facemenu-remove-props (start end)
383 "Remove all text properties that facemenu added to region." 383 "Remove all text properties that facemenu added to region."
384 (interactive "*r") ; error if buffer is read-only despite the next line. 384 (interactive "*r") ; error if buffer is read-only despite the next line.