diff options
Diffstat (limited to 'lisp/forms.el')
-rw-r--r-- | lisp/forms.el | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/lisp/forms.el b/lisp/forms.el index 3f9f1c9980f..8974f99ef57 100644 --- a/lisp/forms.el +++ b/lisp/forms.el @@ -168,10 +168,9 @@ ;; modified (using text-property `read-only'). ;; Also, the read-write fields are shown using a ;; distinct face, if possible. -;; As of emacs 19.29, the `intangible' text property -;; is used to prevent moving into read-only fields. -;; This variable defaults to t if running Emacs 19 or -;; later with text properties. +;; The `intangible' text property is used to +;; prevent moving into read-only fields. +;; This variable defaults to t. ;; The default face to show read-write fields is ;; copied from face `region'. ;; @@ -363,8 +362,7 @@ This variable is for use by the filter routines only. The contents may NOT be modified.") (defcustom forms-use-text-properties t - "Non-nil means: use text properties. -Defaults to t if this Emacs is capable of handling text properties." + "Non-nil means to use text properties. " :group 'forms :type 'boolean) @@ -504,12 +502,9 @@ Commands: Equivalent keys in read-only mode: (setq forms-new-record-filter nil) (setq forms-modified-record-filter nil) - ;; If running Emacs 19 under X, setup faces to show read-only and - ;; read-write fields. - (if (fboundp 'make-face) - (progn - (make-local-variable 'forms-ro-face) - (make-local-variable 'forms-rw-face))) + ;; Setup faces to show read-only and read-write fields. + (make-local-variable 'forms-ro-face) + (make-local-variable 'forms-rw-face) ;; eval the buffer, should set variables ;;(message "forms: processing control file...") @@ -609,16 +604,14 @@ Commands: Equivalent keys in read-only mode: (setq forms--mode-setup t) ;; Copy desired faces to the actual variables used by the forms formatter. - (if (fboundp 'make-face) + (make-local-variable 'forms--ro-face) + (make-local-variable 'forms--rw-face) + (if forms-read-only (progn - (make-local-variable 'forms--ro-face) - (make-local-variable 'forms--rw-face) - (if forms-read-only - (progn - (setq forms--ro-face forms-ro-face) - (setq forms--rw-face forms-ro-face)) - (setq forms--ro-face forms-ro-face) - (setq forms--rw-face forms-rw-face)))) + (setq forms--ro-face forms-ro-face) + (setq forms--rw-face forms-ro-face)) + (setq forms--ro-face forms-ro-face) + (setq forms--rw-face forms-rw-face)) ;; Make more local variables. (make-local-variable 'forms--file-buffer) |