Mercurial > emacs
annotate lisp/ezimage.el @ 110523:a5ad4f188e19
Synch Semantic to CEDET 1.0.
Move CEDET ChangeLog entries to new file lisp/cedet/ChangeLog.
* semantic.el (semantic-version): Update to 2.0.
(semantic-mode-map): Add "," and "m" bindings.
(navigate-menu): Update.
* semantic/symref.el (semantic-symref-calculate-rootdir):
New function.
(semantic-symref-detect-symref-tool): Use it.
* semantic/symref/grep.el (semantic-symref-grep-shell): New var.
(semantic-symref-perform-search): Use it. Calculate root dir with
semantic-symref-calculate-rootdir.
(semantic-symref-derive-find-filepatterns): Improve error message.
* semantic/symref/list.el
(semantic-symref-results-mode-map): New bindings.
(semantic-symref-auto-expand-results): New option.
(semantic-symref-results-dump): Obey auto-expand.
(semantic-symref-list-expand-all, semantic-symref-regexp)
(semantic-symref-list-contract-all)
(semantic-symref-list-map-open-hits)
(semantic-symref-list-update-open-hits)
(semantic-symref-list-create-macro-on-open-hit)
(semantic-symref-list-call-macro-on-open-hits): New functions.
(semantic-symref-list-menu-entries)
(semantic-symref-list-menu): New vars.
(semantic-symref-list-map-open-hits): Move cursor to beginning of
match before calling the mapped function.
* semantic/doc.el
(semantic-documentation-comment-preceeding-tag): Do nothing if the
mode doesn't provide comment-start-skip.
* semantic/scope.el
(semantic-analyze-scope-nested-tags-default): Strip duplicates.
(semantic-analyze-scoped-inherited-tag-map): Take the tag we are
looking for as part of the scoped tags list.
* semantic/html.el (semantic-default-html-setup): Add
senator-step-at-tag-classes.
* semantic/decorate/include.el
(semantic-decoration-on-unknown-includes): Change light bgcolor.
(semantic-decoration-on-includes-highlight-default): Check that
the include tag has a postion.
* semantic/complete.el (semantic-collector-local-members):
(semantic-complete-read-tag-local-members)
(semantic-complete-jump-local-members): New class and functions.
(semantic-complete-self-insert): Save excursion before completing.
* semantic/analyze/complete.el
(semantic-analyze-possible-completions-default): If no completions
are found, return the raw by-name-only completion list. Add FLAGS
arguments. Add support for 'no-tc (type constraint) and
'no-unique, or no stripping duplicates.
(semantic-analyze-possible-completions-default): Add FLAGS arg.
* semantic/util-modes.el
(semantic-stickyfunc-show-only-functions-p): New option.
(semantic-stickyfunc-fetch-stickyline): Don't show stickytext for
the very first line in a buffer.
* semantic/util.el (semantic-hack-search)
(semantic-recursive-find-nonterminal-by-name)
(semantic-current-tag-interactive): Deleted.
(semantic-describe-buffer): Fix expand-nonterminal. Add
lex-syntax-mods, type relation separator char, and command
separation char.
(semantic-sanity-check): Only message if called interactively.
* semantic/tag.el (semantic-tag-deep-copy-one-tag): Copy the
:filename property and the tag position.
* semantic/lex-spp.el (semantic-lex-spp-lex-text-string):
Add recursion limit.
* semantic/imenu.el (semantic-imenu-bucketize-type-members):
Make this buffer local, not the obsoleted variable.
* semantic/idle.el: Add breadcrumbs support.
(semantic-idle-summary-current-symbol-info-default)
(semantic-idle-tag-highlight)
(semantic-idle-completion-list-default): Use
semanticdb-without-unloaded-file-searches for speed, and to
conform to the controls that specify if the idle timer is supposed
to be parsing unparsed includes.
(semantic-idle-symbol-highlight-face)
(semantic-idle-symbol-maybe-highlight): Rename from *-summary-*.
Callers changed.
(semantic-idle-work-parse-neighboring-files-flag): Default to nil.
(semantic-idle-work-update-headers-flag): New var.
(semantic-idle-work-for-one-buffer): Use it.
(semantic-idle-local-symbol-highlight): Rename from
semantic-idle-tag-highlight.
(semantic-idle-truncate-long-summaries): New option.
* semantic/ia.el (semantic-ia-cache)
(semantic-ia-get-completions): Deleted. Callers changed.
(semantic-ia-show-variants): New command.
(semantic-ia-show-doc): If doc is empty, don't make a temp buffer.
(semantic-ia-show-summary): If there isn't anything to show, say so.
* semantic/grammar.el (semantic-grammar-create-package):
Save the buffer even in batch mode.
* semantic/fw.el
(semanticdb-without-unloaded-file-searches): New macro.
* semantic/dep.el (semantic-dependency-find-file-on-path):
Fix case dereferencing ede-object when it is a list.
* semantic/db-typecache.el (semanticdb-expand-nested-tag)
(semanticdb-typecache-faux-namespace): New functions.
(semanticdb-typecache-file-tags)
(semanticdb-typecache-merge-streams): Use them.
(semanticdb-typecache-file-tags): When deriving tags from a file,
give the mode a chance to monkey with the tag copy.
(semanticdb-typecache-find-default): Wrap find in save-excursion.
(semanticdb-typecache-find-by-name-helper): Merge found names down.
* semantic/db-global.el
(semanticdb-enable-gnu-global-in-buffer): Don't show messages if
GNU Global is not available and we don't want to throw an error.
* semantic/db-find.el (semanticdb-find-result-nth-in-buffer):
When trying to normalize the tag to a buffer, don't error if
set-buffer method doesn't exist.
* semantic/db-file.el (semanticdb-save-db): Simplify msg.
* semantic/db.el (semanticdb-refresh-table): If forcing a
refresh on a file not in a buffer, use semantic-find-file-noselect
and delete the buffer after use.
(semanticdb-current-database-list): When calculating root via
hooks, force it through true-filename and skip the list of
possible roots.
* semantic/ctxt.el (semantic-ctxt-imported-packages): New.
* semantic/analyze/debug.el
(semantic-analyzer-debug-insert-tag): Reset standard output to
current buffer.
(semantic-analyzer-debug-global-symbol)
(semantic-analyzer-debug-missing-innertype): Change "prefix" to
"symbol" in messages.
* semantic/analyze/refs.el: (semantic-analyze-refs-impl)
(semantic-analyze-refs-proto): When calculating value, make sure
the found tag is 'similar' to the originating tag.
(semantic--analyze-refs-find-tags-with-parent): Attempt to
identify matches via imported symbols of parents.
(semantic--analyze-refs-full-lookup-with-parents): Do a deep
search during the brute search.
* semantic/analyze.el
(semantic-analyze-find-tag-sequence-default): Be robust to
calculated scopes being nil.
* semantic/bovine/c.el (semantic-c-describe-environment): Add
project macro symbol array.
(semantic-c-parse-lexical-token): Add recursion limit.
(semantic-ctxt-imported-packages, semanticdb-expand-nested-tag):
New overrides.
(semantic-expand-c-tag-namelist): Split a full type from a typedef
out to its own tag.
(semantic-expand-c-tag-namelist): Do not split out a typedef'd
inline type if it is an anonymous type.
(semantic-c-reconstitute-token): Use the optional initializers as
a clue that some function is probably a constructor. When
defining the type of these constructors, split the parent name,
and use only the class part, if applicable.
* semantic/bovine/c-by.el:
* semantic/wisent/python-wy.el: Regenerate.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sat, 18 Sep 2010 22:49:54 -0400 |
parents | 1d1d5d9bd884 |
children | 376148b31b5e |
rev | line source |
---|---|
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
1 ;;; ezimage --- Generalized Image management |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
2 |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
3 ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, |
106815 | 4 ;; 2008, 2009, 2010 Free Software Foundation, Inc. |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
5 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
6 ;; Author: Eric M. Ludlam <zappo@gnu.org> |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
7 ;; Keywords: file, tags, tools |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
8 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
9 ;; This file is part of GNU Emacs. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
10 |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79721
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
12 ;; it under the terms of the GNU General Public License as published by |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79721
diff
changeset
|
13 ;; the Free Software Foundation, either version 3 of the License, or |
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79721
diff
changeset
|
14 ;; (at your option) any later version. |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
15 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
16 ;; GNU Emacs is distributed in the hope that it will be useful, |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
19 ;; GNU General Public License for more details. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
20 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
21 ;; You should have received a copy of the GNU General Public License |
94678
ee5932bf781d
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
79721
diff
changeset
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
23 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
24 ;;; Commentary: |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
25 ;; |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
26 ;; A few routines for placing an image over text that will work for any |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
27 ;; Emacs implementation without error. When images are not supported, then |
72966 | 28 ;; they are just not displayed. |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
29 ;; |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
30 ;; The idea is that gui buffers (trees, buttons, etc) will have text |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
31 ;; representations of the GUI elements. These routines will replace the text |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
32 ;; with an image when images are available. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
33 ;; |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
34 ;; This file requires the `image' package if it is available. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
35 |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
36 (condition-case nil ; for older XEmacs |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
37 (require 'image) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
38 (error nil)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
39 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
40 ;;; Code: |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
41 (defcustom ezimage-use-images (if (featurep 'xemacs) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
42 (and (fboundp 'make-image-specifier) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
43 window-system) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
44 (and (display-images-p) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
45 (image-type-available-p 'xpm))) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
46 "Non-nil means ezimage should display icons." |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
47 :group 'ezimage |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
48 :version "21.1" |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
49 :type 'boolean) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
50 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
51 ;;; Create our own version of defimage |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
52 (eval-and-compile |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
53 |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
54 (if (featurep 'emacs) |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
55 (progn |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
56 (defmacro defezimage (variable imagespec docstring) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
57 "Define VARIABLE as an image if `defimage' is not available. |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
58 IMAGESPEC is the image data, and DOCSTRING is documentation for the image." |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
59 `(progn |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
60 (defimage ,variable ,imagespec ,docstring) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
61 (put (quote ,variable) 'ezimage t))) |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
62 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
63 ;; This hack is for the ezimage install which has an icons direcory for |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
64 ;; the default icons to be used. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
65 ;; (add-to-list 'load-path |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
66 ;; (concat (file-name-directory |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
67 ;; (locate-library "ezimage.el")) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
68 ;; "icons")) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
69 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
70 ) |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
71 |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
72 ;; XEmacs. |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
73 (if (not (fboundp 'make-glyph)) |
68562
26cf94e56f83
(ezimage-mail, ezimage-object-out-of-date, ezimage-insert-image-button-maybe,
Juanma Barranquero <lekktu@gmail.com>
parents:
66608
diff
changeset
|
74 |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
75 (defmacro defezimage (variable imagespec docstring) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
76 "Don't bother loading up an image... |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
77 Argument VARIABLE is the variable to define. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
78 Argument IMAGESPEC is the list defining the image to create. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
79 Argument DOCSTRING is the documentation for VARIABLE." |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
80 `(defvar ,variable nil ,docstring)) |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
81 |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
82 (defun ezimage-find-image-on-load-path (image) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
83 "Find the image file IMAGE on the load path." |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
84 (let ((l (cons |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
85 ;; In XEmacs, try the data directory first (for an |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
86 ;; install in XEmacs proper.) Search the load |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
87 ;; path next (for user installs) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
88 (locate-data-directory "ezimage") |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
89 load-path)) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
90 (r nil)) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
91 (while (and l (not r)) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
92 (if (file-exists-p (concat (car l) "/" image)) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
93 (setq r (concat (car l) "/" image)) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
94 (if (file-exists-p (concat (car l) "/icons/" image)) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
95 (setq r (concat (car l) "/icons/" image)) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
96 )) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
97 (setq l (cdr l))) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
98 r)) |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
99 |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
100 (defun ezimage-convert-emacs21-imagespec-to-xemacs (spec) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
101 "Convert the Emacs21 image SPEC into an XEmacs image spec. |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
102 The Emacs 21 spec is what I first learned, and is easy to convert." |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
103 (let* ((sl (car spec)) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
104 (itype (nth 1 sl)) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
105 (ifile (nth 3 sl))) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
106 (vector itype ':file (ezimage-find-image-on-load-path ifile)))) |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
107 |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
108 (defmacro defezimage (variable imagespec docstring) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
109 "Define VARIABLE as an image if `defimage' is not available. |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
110 IMAGESPEC is the image data, and DOCSTRING is documentation for the image." |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
111 `(progn |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
112 (defvar ,variable |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
113 ;; The Emacs21 version of defimage looks just like the XEmacs image |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
114 ;; specifier, except that it needs a :type keyword. If we line |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
115 ;; stuff up right, we can use this cheat to support XEmacs specifiers. |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
116 (condition-case nil |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
117 (make-glyph |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
118 (make-image-specifier |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
119 (ezimage-convert-emacs21-imagespec-to-xemacs (quote ,imagespec))) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
120 'buffer) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
121 (error nil)) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
122 ,docstring) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
123 (put ',variable 'ezimage t))) |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
124 |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
125 ))) |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
126 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
127 (defezimage ezimage-directory |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
128 ((:type xpm :file "ezimage/dir.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
129 "Image used for empty directories.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
130 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
131 (defezimage ezimage-directory-plus |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
132 ((:type xpm :file "ezimage/dir-plus.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
133 "Image used for closed directories with stuff in them.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
134 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
135 (defezimage ezimage-directory-minus |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
136 ((:type xpm :file "ezimage/dir-minus.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
137 "Image used for open directories with stuff in them.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
138 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
139 (defezimage ezimage-page-plus |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
140 ((:type xpm :file "ezimage/page-plus.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
141 "Image used for closed files with stuff in them.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
142 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
143 (defezimage ezimage-page-minus |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
144 ((:type xpm :file "ezimage/page-minus.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
145 "Image used for open files with stuff in them.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
146 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
147 (defezimage ezimage-page |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
148 ((:type xpm :file "ezimage/page.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
149 "Image used for files with nothing interesting in it.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
150 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
151 (defezimage ezimage-tag |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
152 ((:type xpm :file "ezimage/tag.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
153 "Image used for tags.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
154 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
155 (defezimage ezimage-tag-plus |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
156 ((:type xpm :file "ezimage/tag-plus.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
157 "Image used for closed tag groups.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
158 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
159 (defezimage ezimage-tag-minus |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
160 ((:type xpm :file "ezimage/tag-minus.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
161 "Image used for open tags.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
162 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
163 (defezimage ezimage-tag-gt |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
164 ((:type xpm :file "ezimage/tag-gt.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
165 "Image used for closed tags (with twist arrow).") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
166 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
167 (defezimage ezimage-tag-v |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
168 ((:type xpm :file "ezimage/tag-v.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
169 "Image used for open tags (with twist arrow).") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
170 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
171 (defezimage ezimage-tag-type |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
172 ((:type xpm :file "ezimage/tag-type.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
173 "Image used for tags that represent a data type.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
174 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
175 (defezimage ezimage-box-plus |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
176 ((:type xpm :file "ezimage/box-plus.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
177 "Image of a closed box.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
178 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
179 (defezimage ezimage-box-minus |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
180 ((:type xpm :file "ezimage/box-minus.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
181 "Image of an open box.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
182 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
183 (defezimage ezimage-mail |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
184 ((:type xpm :file "ezimage/mail.xpm" :ascent center)) |
68562
26cf94e56f83
(ezimage-mail, ezimage-object-out-of-date, ezimage-insert-image-button-maybe,
Juanma Barranquero <lekktu@gmail.com>
parents:
66608
diff
changeset
|
185 "Image of an envelope.") |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
186 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
187 (defezimage ezimage-checkout |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
188 ((:type xpm :file "ezimage/checkmark.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
189 "Image representing a checkmark. For files checked out of a VC.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
190 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
191 (defezimage ezimage-object |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
192 ((:type xpm :file "ezimage/bits.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
193 "Image representing bits (an object file.)") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
194 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
195 (defezimage ezimage-object-out-of-date |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
196 ((:type xpm :file "ezimage/bitsbang.xpm" :ascent center)) |
68562
26cf94e56f83
(ezimage-mail, ezimage-object-out-of-date, ezimage-insert-image-button-maybe,
Juanma Barranquero <lekktu@gmail.com>
parents:
66608
diff
changeset
|
197 "Image representing bits with a ! in it. (An out of data object file.)") |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
198 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
199 (defezimage ezimage-label |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
200 ((:type xpm :file "ezimage/label.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
201 "Image used for label prefix.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
202 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
203 (defezimage ezimage-lock |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
204 ((:type xpm :file "ezimage/lock.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
205 "Image of a lock. Used for Read Only, or private.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
206 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
207 (defezimage ezimage-unlock |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
208 ((:type xpm :file "ezimage/unlock.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
209 "Image of an unlocked lock.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
210 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
211 (defezimage ezimage-key |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
212 ((:type xpm :file "ezimage/key.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
213 "Image of a key.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
214 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
215 (defezimage ezimage-document-tag |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
216 ((:type xpm :file "ezimage/doc.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
217 "Image used to indicate documentation available.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
218 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
219 (defezimage ezimage-document-plus |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
220 ((:type xpm :file "ezimage/doc-plus.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
221 "Image used to indicate closed documentation.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
222 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
223 (defezimage ezimage-document-minus |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
224 ((:type xpm :file "ezimage/doc-minus.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
225 "Image used to indicate open documentation.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
226 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
227 (defezimage ezimage-info-tag |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
228 ((:type xpm :file "ezimage/info.xpm" :ascent center)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
229 "Image used to indicate more information available.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
230 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
231 (defvar ezimage-expand-image-button-alist |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
232 '( |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
233 ;; here are some standard representations |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
234 ("<+>" . ezimage-directory-plus) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
235 ("<->" . ezimage-directory-minus) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
236 ("< >" . ezimage-directory) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
237 ("[+]" . ezimage-page-plus) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
238 ("[-]" . ezimage-page-minus) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
239 ("[?]" . ezimage-page) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
240 ("[ ]" . ezimage-page) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
241 ("{+}" . ezimage-box-plus) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
242 ("{-}" . ezimage-box-minus) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
243 ;; Some vaguely representitive entries |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
244 ("*" . ezimage-checkout) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
245 ("#" . ezimage-object) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
246 ("!" . ezimage-object-out-of-date) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
247 ("%" . ezimage-lock) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
248 ) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
249 "List of text and image associations.") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
250 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
251 (defun ezimage-insert-image-button-maybe (start length &optional string) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
252 "Insert an image button based on text starting at START for LENGTH chars. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
253 If buttontext is unknown, just insert that text. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
254 If we have an image associated with it, use that image. |
68562
26cf94e56f83
(ezimage-mail, ezimage-object-out-of-date, ezimage-insert-image-button-maybe,
Juanma Barranquero <lekktu@gmail.com>
parents:
66608
diff
changeset
|
255 Optional argument STRING is a string upon which to add text properties." |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
256 (when ezimage-use-images |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
257 (let* ((bt (buffer-substring start (+ length start))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
258 (a (assoc bt ezimage-expand-image-button-alist))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
259 ;; Regular images (created with `insert-image' are intangible |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
260 ;; which (I suppose) make them more compatible with XEmacs 21. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
261 ;; Unfortunatly, there is a giant pile o code dependent on the |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
262 ;; underlying text. This means if we leave it tangible, then I |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
263 ;; don't have to change said giant piles o code. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
264 (if (and a (symbol-value (cdr a))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
265 (ezimage-insert-over-text (symbol-value (cdr a)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
266 start |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
267 (+ start (length bt)))))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
268 string) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
269 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
270 (defun ezimage-image-over-string (string &optional alist) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
271 "Insert over the text in STRING an image found in ALIST. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
272 Return STRING with properties applied." |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
273 (if ezimage-use-images |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
274 (let ((a (assoc string alist))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
275 (if (and a (symbol-value (cdr a))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
276 (ezimage-insert-over-text (symbol-value (cdr a)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
277 0 (length string) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
278 string) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
279 string)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
280 string)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
281 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
282 (defun ezimage-insert-over-text (image start end &optional string) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
283 "Place IMAGE over the text between START and END. |
68562
26cf94e56f83
(ezimage-mail, ezimage-object-out-of-date, ezimage-insert-image-button-maybe,
Juanma Barranquero <lekktu@gmail.com>
parents:
66608
diff
changeset
|
284 Assumes the image is part of a GUI and can be clicked on. |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
285 Optional argument STRING is a string upon which to add text properties." |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
286 (when ezimage-use-images |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
287 (add-text-properties start end |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
288 (if (featurep 'xemacs) |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
289 (list 'end-glyph image |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
290 'rear-nonsticky (list 'display) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
291 'invisible t |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
292 'detachable t) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
293 (list 'display image |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
294 'rear-nonsticky (list 'display))) |
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
295 string)) |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
296 string) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
297 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
298 (defun ezimage-image-association-dump () |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
299 "Dump out the current state of the Ezimage image alist. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
300 See `ezimage-expand-image-button-alist' for details." |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
301 (interactive) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
302 (with-output-to-temp-buffer "*Ezimage Images*" |
105994
009383a57ce8
* x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
303 (with-current-buffer "*Ezimage Images*" |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
304 (goto-char (point-max)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
305 (insert "Ezimage image cache.\n\n") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
306 (let ((start (point)) (end nil)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
307 (insert "Image\tText\tImage Name") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
308 (setq end (point)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
309 (insert "\n") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
310 (put-text-property start end 'face 'underline)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
311 (let ((ia ezimage-expand-image-button-alist)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
312 (while ia |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
313 (let ((start (point))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
314 (insert (car (car ia))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
315 (insert "\t") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
316 (ezimage-insert-image-button-maybe start |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
317 (length (car (car ia)))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
318 (insert (car (car ia)) "\t" (format "%s" (cdr (car ia))) "\n")) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
319 (setq ia (cdr ia))))))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
320 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
321 (defun ezimage-image-dump () |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
322 "Dump out the current state of the Ezimage image alist. |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
323 See `ezimage-expand-image-button-alist' for details." |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
324 (interactive) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
325 (with-output-to-temp-buffer "*Ezimage Images*" |
105994
009383a57ce8
* x-dnd.el (x-dnd-maybe-call-test-function):
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
100908
diff
changeset
|
326 (with-current-buffer "*Ezimage Images*" |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
327 (goto-char (point-max)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
328 (insert "Ezimage image cache.\n\n") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
329 (let ((start (point)) (end nil)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
330 (insert "Image\tImage Name") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
331 (setq end (point)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
332 (insert "\n") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
333 (put-text-property start end 'face 'underline)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
334 (let ((ia (ezimage-all-images))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
335 (while ia |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
336 (let ((start (point))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
337 (insert "cm") |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
338 (ezimage-insert-over-text (symbol-value (car ia)) start (point)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
339 (insert "\t" (format "%s" (car ia)) "\n")) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
340 (setq ia (cdr ia))))))) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
341 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
342 (defun ezimage-all-images () |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
343 "Return a list of all variables containing ez images." |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
344 (let ((ans nil)) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
345 (mapatoms (lambda (sym) |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
346 (if (get sym 'ezimage) (setq ans (cons sym ans))))) |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
347 (setq ans (sort ans (lambda (a b) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
348 (string< (symbol-name a) (symbol-name b))))) |
95072
a2ec715aefb4
(ezimage-use-images): Drop support for Emacs < 21 and simplify initial value.
Glenn Morris <rgm@gnu.org>
parents:
94678
diff
changeset
|
349 ans)) |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
350 |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
351 (provide 'ezimage) |
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
352 |
65779 | 353 ;; arch-tag: d4ea2d93-3c7a-4cb3-b5a6-c1b9178183aa |
65752
12e5c2513853
* speedbar.el: New version 1.0pre3.
Chong Yidong <cyd@stupidchicken.com>
parents:
diff
changeset
|
354 ;;; sb-image.el ends here |