comparison lisp/delsel.el @ 18840:c8c67c398475

(delete-selection-mode): Add custom-loads property.
author Richard M. Stallman <rms@gnu.org>
date Thu, 17 Jul 1997 21:59:31 +0000
parents 1a455d8dfa7c
children 73871027b629
comparison
equal deleted inserted replaced
18839:1405083241e8 18840:c8c67c398475
65 (delete-selection-mode (or value 0))) 65 (delete-selection-mode (or value 0)))
66 :initialize 'custom-initialize-default 66 :initialize 'custom-initialize-default
67 :type 'boolean 67 :type 'boolean
68 :group 'editing-basics 68 :group 'editing-basics
69 :require 'delsel) 69 :require 'delsel)
70 ;; Force loading of this file in order to customize delete-selection-mode.
71 (put 'delete-selection-mode 'custom-loads '(delsel))
70 72
71 ;; Since the above autoloaded option contains a `:set' form, this file would 73 ;; This is the standard way mechanism to put the mode into effect
72 ;; get loaded from loaddefs.el. We can use the above `:initialize' keyword, 74 ;; if delete-selection-mode has already been set to t
73 ;; and the below `when' form, to the prevent automatic loading of this file, or 75 ;; when this file is loaded.
74 ;; an `:initialize' keyword of the form:
75 ;;
76 ;; :initialize (lambda (symbol value)
77 ;; (if value
78 ;; (delete-selection-mode t)
79 ;; (custom-initialize-default symbol nil))
80 ;;
81 ;; We choose the former as it is the general mechanism for such toggle options.
82 (when delete-selection-mode 76 (when delete-selection-mode
83 (delete-selection-mode t)) 77 (delete-selection-mode t))
84 78
85 (defun delete-active-region (&optional killp) 79 (defun delete-active-region (&optional killp)
86 (if killp 80 (if killp