~ubuntu-branches/ubuntu/maverick/ess/maverick

« back to all changes in this revision

Viewing changes to lisp/ess-toolbar.el

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2009-06-08 15:19:01 UTC
  • mfrom: (1.3.7 upstream) (3.2.2 squeeze)
  • mto: This revision was merged to the branch mainline in revision 13.
  • Revision ID: james.westby@ubuntu.com-20090608151901-e9d962umor8bh2cn
* New upstream version released today

* etc/config.guess: Switched to current version /usr/share/misc/config.guess

* debian/control enhancements suggested by Debian bugreport #529914
* debian/control: Increased Standards-Version: to 3.8.1
* debian/control: Added Homepage: fields
* debian/compat: Increased to level 7, increaded Build-Depends accordingly
* debian/rules: Use dh_prep in cleaning step

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;;; ess-toolbar.el --- Support for a toolbar in ESS.
2
2
 
3
 
;; Copyright (C) 1997--2004 A.J. Rossini, Rich M. Heiberger, Martin
 
3
;; Copyright (C) 1997--2009 A.J. Rossini, Rich M. Heiberger, Martin
4
4
;;      Maechler, Kurt Hornik, Rodney Sparapani, and Stephen Eglen.
5
5
 
6
6
;; Original Author: Stephen Eglen
7
 
;; Created: 06 May 2004
 
7
;; Created: 2004-05-06
 
8
;; Revised: 2009-03-16
8
9
;; Maintainers: ESS-core <ESS-core@stat.math.ethz.ch>
9
10
 
10
11
;; This file is part of ESS
11
12
 
12
 
;; GPL --> see beginning of ./ess-site.el
 
13
;; This file is free software; you can redistribute it and/or modify
 
14
;; it under the terms of the GNU General Public License as published by
 
15
;; the Free Software Foundation; either version 2, or (at your option)
 
16
;; any later version.
 
17
 
 
18
;; This file is distributed in the hope that it will be useful,
 
19
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
21
;; GNU General Public License for more details.
 
22
 
 
23
;; You should have received a copy of the GNU General Public License
 
24
;; along with GNU Emacs; see the file COPYING.  If not, write to
 
25
;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
13
26
 
14
27
;;; Commentary:
15
28
 
39
52
;; that will make the toolbar code more portable.  So, for now the
40
53
;; code should be regarded as proof of concept.
41
54
 
42
 
;; Also, I think the CVS GNU Emacs now has tool-bar support for the
43
 
;; Mac OS X.
44
 
 
45
 
;;; Code:
 
55
;; 2009-03-16: toolbar code in Emacs 23 has changed slightly to 22,
 
56
;; and presumably once Emacs 22 is no longer supported, this code can
 
57
;; be cleaned up a bit (i.e. no need to set load-path.)
46
58
 
47
59
(defgroup ess-toolbar nil
48
60
  "ESS: toolbar support."
139
151
          (copy-keymap tool-bar-map)))
140
152
  (let ((tool-bar-map ess-toolbar)
141
153
        (load-path (list ess-icon-directory)))
142
 
 
143
 
    ;; icons are found by examining load-path; hence by temporarily setting
144
 
    ;; load-path to our icons directory, they will be found.
 
154
    ;; in Emacs 22, icons are found by examining load-path, bound here
 
155
    ;; whereas Emacs 23 seems to want them in image-load-path, set at the
 
156
    ;; bottom of this file.
145
157
    (mapc 'ess-add-icon-emacs ess-toolbar-items)))
146
158
 
147
159
(defun ess-add-icon-emacs (x)
227
239
         ))
228
240
      ))
229
241
 
 
242
;; Following needed for Emacs 23, not Emacs 22 (nor XEmacs).
 
243
(when (boundp 'image-load-path)
 
244
    (add-to-list 'image-load-path ess-icon-directory))
 
245
 
230
246
(provide 'ess-toolbar)