Mercurial > hg > xemacs-beta
comparison lisp/specifier.el @ 3061:fd1acd2f457a
[xemacs-hg @ 2005-11-13 07:39:26 by ben]
fix 'foo -> `foo', `foo.' -> `foo'.
derived.el, frame.el, toolbar.el, glyphs.el, hyper-apropos.el, mouse.el, files.el, specifier.el: Fix uses of `foo'; change 'foo -> `foo', and put punctuation outside
of quotes.
Add comments in specifier.el about needing better and new convenience
functions.
author | ben |
---|---|
date | Sun, 13 Nov 2005 07:39:29 +0000 |
parents | 13a418960a88 |
children | 74b10360eef9 |
comparison
equal
deleted
inserted
replaced
3060:7679bfa253c2 | 3061:fd1acd2f457a |
---|---|
1 ;;; specifier.el --- Lisp interface to specifiers | 1 ;;; specifier.el --- Lisp interface to specifiers |
2 | 2 |
3 ;; Copyright (C) 1997 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1997 Free Software Foundation, Inc. |
4 ;; Copyright (C) 1995, 1996, 2000, 2002 Ben Wing. | 4 ;; Copyright (C) 1995, 1996, 2000, 2002, 2005 Ben Wing. |
5 | 5 |
6 ;; Author: Ben Wing <ben@xemacs.org> | 6 ;; Author: Ben Wing <ben@xemacs.org> |
7 ;; Keywords: internal, dumped | 7 ;; Keywords: internal, dumped |
8 | 8 |
9 ;;; Synched up with: Not in FSF. | 9 ;;; Synched up with: Not in FSF. |
53 ms-tag-set ms-exact-p) | 53 ms-tag-set ms-exact-p) |
54 "Apply MS-FUNC to the specification(s) for MS-LOCALE in MS-SPECIFIER. | 54 "Apply MS-FUNC to the specification(s) for MS-LOCALE in MS-SPECIFIER. |
55 | 55 |
56 If optional MS-LOCALE is a locale, MS-FUNC will be called for that locale. | 56 If optional MS-LOCALE is a locale, MS-FUNC will be called for that locale. |
57 If MS-LOCALE is a locale type, MS-FUNC will be mapped over all locales of that | 57 If MS-LOCALE is a locale type, MS-FUNC will be mapped over all locales of that |
58 type. If MS-LOCALE is 'all or nil, MS-FUNC will be mapped over all locales in | 58 type. If MS-LOCALE is `all' or nil, MS-FUNC will be mapped over all locales in |
59 MS-SPECIFIER. | 59 MS-SPECIFIER. |
60 | 60 |
61 Optional MS-TAG-SET and MS-EXACT-P are as in `specifier-spec-list'. | 61 Optional MS-TAG-SET and MS-EXACT-P are as in `specifier-spec-list'. |
62 Optional MS-MAPARG will be passed to MS-FUNC. | 62 Optional MS-MAPARG will be passed to MS-FUNC. |
63 | 63 |
304 "Add the specification(s) given by VALUE to SPECIFIER in LOCALE. | 304 "Add the specification(s) given by VALUE to SPECIFIER in LOCALE. |
305 | 305 |
306 VALUE may be any of the values accepted by `canonicalize-spec-list', including | 306 VALUE may be any of the values accepted by `canonicalize-spec-list', including |
307 | 307 |
308 -- an instantiator (either a Lisp object which will be returned when the | 308 -- an instantiator (either a Lisp object which will be returned when the |
309 specifier is instanced, or a Lisp object that can be instantiated to | 309 specifier is instantiated, or a Lisp object that can be instantiated to |
310 produce an opaque value: eg, a font name (string) can be used for a font | 310 produce an opaque value: eg, a font name (string) can be used for a font |
311 specifier, but an instance will be a font object) | 311 specifier, but an instance will be a font object) |
312 -- a list of instantiators | 312 -- a list of instantiators |
313 -- a cons of a locale and an instantiator, or of a locale and a list of | 313 -- a cons of a locale and an instantiator, or of a locale and a list of |
314 instantiators | 314 instantiators |
328 that function. | 328 that function. |
329 | 329 |
330 Note that a VALUE of `nil' is either illegal or will be treated as a value of | 330 Note that a VALUE of `nil' is either illegal or will be treated as a value of |
331 `nil'; it does not remove existing specifications. Use `remove-specifier' for | 331 `nil'; it does not remove existing specifications. Use `remove-specifier' for |
332 that. N.B. `remove-specifier' defaults to removing all specifications, not | 332 that. N.B. `remove-specifier' defaults to removing all specifications, not |
333 just the 'global one! | 333 just the `global' one! |
334 | 334 |
335 Warning: this function is inherently heuristic, and should not be relied on to | 335 Warning: this function is inherently heuristic, and should not be relied on to |
336 properly resolve ambiguities, when specifier instantiators can be lists | 336 properly resolve ambiguities, when specifier instantiators can be lists |
337 \(currently, for toolbar specifiers and generic specifiers). In those cases | 337 \(currently, for toolbar specifiers and generic specifiers). In those cases |
338 use either `add-spec-to-specifier' or `add-spec-list-to-specifier'. | 338 use either `add-spec-to-specifier' or `add-spec-list-to-specifier'. |
408 (add-spec-list-to-specifier | 408 (add-spec-list-to-specifier |
409 specifier | 409 specifier |
410 (canonicalize-spec-list nval (specifier-type specifier)) | 410 (canonicalize-spec-list nval (specifier-type specifier)) |
411 how-to-add)))) | 411 how-to-add)))) |
412 value) | 412 value) |
413 | |
414 ;; #### Misnamed and wrong behavior. Should operate on INSTANTIATORS, not | |
415 ;; instances. Need to come up with clean and general functions for | |
416 ;; modifying a specifier. New `specifier-instantiator' may help. | |
417 ;; #### Also need `instantiator-to-instance', a convenient version of | |
418 ;; `specifier-instance-from-inst-list'. | |
413 | 419 |
414 (defun modify-specifier-instances (specifier func &optional args force default | 420 (defun modify-specifier-instances (specifier func &optional args force default |
415 locale tag-set) | 421 locale tag-set) |
416 "Modify all specifications that match LOCALE and TAG-SET by FUNC. | 422 "Modify all specifications that match LOCALE and TAG-SET by FUNC. |
417 | 423 |