comparison lisp/modes/hideif.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents 56c54cf7c5b6
children 929b76928fce
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
136 (define-key hide-ifdef-mode-submap "s" 'show-ifdefs) 136 (define-key hide-ifdef-mode-submap "s" 'show-ifdefs)
137 (define-key hide-ifdef-mode-submap "\C-d" 'hide-ifdef-block) 137 (define-key hide-ifdef-mode-submap "\C-d" 'hide-ifdef-block)
138 (define-key hide-ifdef-mode-submap "\C-s" 'show-ifdef-block) 138 (define-key hide-ifdef-mode-submap "\C-s" 'show-ifdef-block)
139 139
140 (define-key hide-ifdef-mode-submap "\C-q" 'hide-ifdef-toggle-read-only) 140 (define-key hide-ifdef-mode-submap "\C-q" 'hide-ifdef-toggle-read-only)
141 (let ((where (where-is-internal 'toggle-read-only nil t))) 141 (let ((where (where-is-internal 'toggle-read-only '(keymap) t)))
142 (if where 142 (if where
143 (define-key hide-ifdef-mode-submap 143 (define-key hide-ifdef-mode-submap
144 where 144 where
145 'hide-ifdef-toggle-outside-read-only))) 145 'hide-ifdef-toggle-outside-read-only)))
146 ) 146 )
166 ;(or (assq 'hide-ifdef-mode minor-mode-alist) 166 ;(or (assq 'hide-ifdef-mode minor-mode-alist)
167 ; (setq minor-mode-alist 167 ; (setq minor-mode-alist
168 ; (cons '(hide-ifdef-mode " Ifdef") 168 ; (cons '(hide-ifdef-mode " Ifdef")
169 ; minor-mode-alist))) 169 ; minor-mode-alist)))
170 ;; XEmacs: do it right. 170 ;; XEmacs: do it right.
171 ;;;don't ###autoload because of startup code doesn't define the map 171 ;;;###autoload
172 (add-minor-mode 'hide-ifdef-mode " Ifdef" hide-ifdef-mode-map) 172 (add-minor-mode 'hide-ifdef-mode " Ifdef")
173 173
174 ;; fix c-mode syntax table so we can recognize whole symbols. 174 ;; fix c-mode syntax table so we can recognize whole symbols.
175 (defvar hide-ifdef-syntax-table 175 (defvar hide-ifdef-syntax-table
176 (copy-syntax-table c-mode-syntax-table) 176 (copy-syntax-table c-mode-syntax-table)
177 "Syntax table used for tokenizing #if expressions.") 177 "Syntax table used for tokenizing #if expressions.")