Mercurial > hg > xemacs-beta
comparison lisp/custom/wid-browse.el @ 149:538048ae2ab8 r20-3b1
Import from CVS: tag r20-3b1
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:36:16 +0200 |
parents | b980b6286996 |
children | 25f70ba0133c |
comparison
equal
deleted
inserted
replaced
148:f659db2a1f73 | 149:538048ae2ab8 |
---|---|
2 ;; | 2 ;; |
3 ;; Copyright (C) 1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1997 Free Software Foundation, Inc. |
4 ;; | 4 ;; |
5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> | 5 ;; Author: Per Abrahamsen <abraham@dina.kvl.dk> |
6 ;; Keywords: extensions | 6 ;; Keywords: extensions |
7 ;; Version: 1.84 | 7 ;; Version: 1.97 |
8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ | 8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ |
9 | |
10 ;; This file is part of GNU Emacs. | |
11 | |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
13 ;; it under the terms of the GNU General Public License as published by | |
14 ;; the Free Software Foundation; either version 2, or (at your option) | |
15 ;; any later version. | |
16 | |
17 ;; GNU Emacs is distributed in the hope that it will be useful, | |
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 ;; GNU General Public License for more details. | |
21 | |
22 ;; You should have received a copy of the GNU General Public License | |
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the | |
24 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
25 ;; Boston, MA 02111-1307, USA. | |
9 | 26 |
10 ;;; Commentary: | 27 ;;; Commentary: |
11 ;; | 28 ;; |
12 ;; Widget browser. See `widget.el'. | 29 ;; Widget browser. See `widget.el'. |
13 | 30 |
14 ;;; Code: | 31 ;;; Code: |
15 | 32 |
16 (require 'easymenu) | 33 (require 'easymenu) |
17 (require 'custom) | 34 (require 'custom) |
18 (require 'wid-edit) | 35 (require 'wid-edit) |
19 (require 'cl) | 36 (eval-when-compile (require 'cl)) |
20 | 37 |
21 (defgroup widget-browse nil | 38 (defgroup widget-browse nil |
22 "Customization support for browsing widgets." | 39 "Customization support for browsing widgets." |
23 :group 'widgets) | 40 :group 'widgets) |
24 | 41 |
243 (put :children 'widget-keyword-printer 'widget-browse-widgets) | 260 (put :children 'widget-keyword-printer 'widget-browse-widgets) |
244 (put :buttons 'widget-keyword-printer 'widget-browse-widgets) | 261 (put :buttons 'widget-keyword-printer 'widget-browse-widgets) |
245 (put :button 'widget-keyword-printer 'widget-browse-widget) | 262 (put :button 'widget-keyword-printer 'widget-browse-widget) |
246 (put :args 'widget-keyword-printer 'widget-browse-sexps) | 263 (put :args 'widget-keyword-printer 'widget-browse-sexps) |
247 | 264 |
265 ;;; Widget Minor Mode. | |
266 | |
267 (defvar widget-minor-mode nil | |
268 "I non-nil, we are in Widget Minor Mode.") | |
269 (make-variable-buffer-local 'widget-minor-mode) | |
270 | |
271 (defvar widget-minor-mode-map nil | |
272 "Keymap used in Widget Minor Mode.") | |
273 | |
274 (unless widget-minor-mode-map | |
275 (setq widget-minor-mode-map (make-sparse-keymap)) | |
276 (set-keymap-parent widget-minor-mode-map widget-keymap)) | |
277 | |
278 ;;;###autoload | |
279 (defun widget-minor-mode (&optional arg) | |
280 "Togle minor mode for traversing widgets. | |
281 With arg, turn widget mode on if and only if arg is positive." | |
282 (interactive "P") | |
283 (cond ((null arg) | |
284 (setq widget-minor-mode (not widget-minor-mode))) | |
285 ((<= 0 arg) | |
286 (setq widget-minor-mode nil)) | |
287 (t | |
288 (setq widget-minor-mode t))) | |
289 (force-mode-line-update)) | |
290 | |
291 (add-to-list 'minor-mode-alist '(widget-minor-mode " Widget")) | |
292 | |
293 (add-to-list 'minor-mode-map-alist | |
294 (cons 'widget-minor-mode widget-minor-mode-map)) | |
295 | |
248 ;;; The End: | 296 ;;; The End: |
249 | 297 |
250 (provide 'wid-browse) | 298 (provide 'wid-browse) |
251 | 299 |
252 ;; wid-browse.el ends here | 300 ;; wid-browse.el ends here |