Mercurial > hg > xemacs-beta
comparison lisp/custom/wid-edit.el @ 118:7d55a9ba150c r20-1b11
Import from CVS: tag r20-1b11
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:24:17 +0200 |
parents | 9f59509498e1 |
children | cca96a509cfe |
comparison
equal
deleted
inserted
replaced
117:578fd4947a72 | 118:7d55a9ba150c |
---|---|
2 ;; | 2 ;; |
3 ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1996, 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.68 | 7 ;; Version: 1.69 |
8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ | 8 ;; X-URL: http://www.dina.kvl.dk/~abraham/custom/ |
9 | 9 |
10 ;;; Commentary: | 10 ;;; Commentary: |
11 ;; | 11 ;; |
12 ;; See `widget.el'. | 12 ;; See `widget.el'. |
23 (eval-and-compile | 23 (eval-and-compile |
24 (autoload 'pp-to-string "pp") | 24 (autoload 'pp-to-string "pp") |
25 (autoload 'Info-goto-node "info") | 25 (autoload 'Info-goto-node "info") |
26 | 26 |
27 (when (string-match "XEmacs" emacs-version) | 27 (when (string-match "XEmacs" emacs-version) |
28 (require 'overlay)) | 28 (condition-case nil |
29 (require 'overlay) | |
30 (error (load-library "x-overlay")))) | |
29 | 31 |
30 (if (string-match "XEmacs" emacs-version) | 32 (if (string-match "XEmacs" emacs-version) |
31 ;; XEmacs spell `intangible' as `atomic'. | 33 ;; XEmacs spell `intangible' as `atomic'. |
32 (defun widget-make-intangible (from to side) | 34 (defun widget-make-intangible (from to side) |
33 "Make text between FROM and TO atomic with regard to movement. | 35 "Make text between FROM and TO atomic with regard to movement. |
451 t) | 453 t) |
452 ((car widget) | 454 ((car widget) |
453 (widget-member (get (car widget) 'widget-type) property)) | 455 (widget-member (get (car widget) 'widget-type) property)) |
454 (t nil))) | 456 (t nil))) |
455 | 457 |
458 ;;;###autoload | |
456 (defun widget-apply (widget property &rest args) | 459 (defun widget-apply (widget property &rest args) |
457 "Apply the value of WIDGET's PROPERTY to the widget itself. | 460 "Apply the value of WIDGET's PROPERTY to the widget itself. |
458 ARGS are passed as extra arguments to the function." | 461 ARGS are passed as extra arguments to the function." |
459 (apply (widget-get widget property) widget args)) | 462 (apply (widget-get widget property) widget args)) |
460 | 463 |
501 (defun widget-glyph-insert (widget tag image) | 504 (defun widget-glyph-insert (widget tag image) |
502 "In WIDGET, insert the text TAG or, if supported, IMAGE. | 505 "In WIDGET, insert the text TAG or, if supported, IMAGE. |
503 IMAGE should either be a glyph, or a name sans extension of an xpm or | 506 IMAGE should either be a glyph, or a name sans extension of an xpm or |
504 xbm file located in `widget-glyph-directory'. | 507 xbm file located in `widget-glyph-directory'. |
505 | 508 |
506 WARNING: If you call this with a glyph, and you want theuser to be | 509 WARNING: If you call this with a glyph, and you want the user to be |
507 able to activate the glyph, make sure it is unique. If you use the | 510 able to activate the glyph, make sure it is unique. If you use the |
508 same glyph for multiple widgets, " | 511 same glyph for multiple widgets, activating any of the glyphs will |
512 cause the last created widget to be activated." | |
509 (cond ((not (and (string-match "XEmacs" emacs-version) | 513 (cond ((not (and (string-match "XEmacs" emacs-version) |
510 widget-glyph-enable | 514 widget-glyph-enable |
511 (fboundp 'make-glyph) | 515 (fboundp 'make-glyph) |
512 image)) | 516 image)) |
513 ;; We don't want or can't use glyphs. | 517 ;; We don't want or can't use glyphs. |