Mercurial > emacs
comparison lisp/speedbar.el @ 23372:64e80b07376b
(speedbar-frame-mode): Check if cfx or cfy is a list, and make sure it
gets evalled to a number. Also verify that set-frame-name fn exists
before calling it.
(speedbar-initial-expansion-list-name): Remove customization since it
is not useful in this case.
author | Eric M. Ludlam <zappo@gnu.org> |
---|---|
date | Sun, 04 Oct 1998 13:00:45 +0000 |
parents | a1bd0f4f73e1 |
children | 4182d24c6d9f |
comparison
equal
deleted
inserted
replaced
23371:9808edcd3c95 | 23372:64e80b07376b |
---|---|
3 ;;; Copyright (C) 1996, 97, 98 Free Software Foundation | 3 ;;; Copyright (C) 1996, 97, 98 Free Software Foundation |
4 | 4 |
5 ;; Author: Eric M. Ludlam <zappo@gnu.org> | 5 ;; Author: Eric M. Ludlam <zappo@gnu.org> |
6 ;; Version: 0.7.2c | 6 ;; Version: 0.7.2c |
7 ;; Keywords: file, tags, tools | 7 ;; Keywords: file, tags, tools |
8 ;; X-RCS: $Id: speedbar.el,v 1.15 1998/09/12 13:58:46 zappo Exp $ | 8 ;; X-RCS: $Id: speedbar.el,v 1.16 1998/09/18 09:21:27 schwab Exp zappo $ |
9 | 9 |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 | 11 |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 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 | 13 ;; it under the terms of the GNU General Public License as published by |
265 directory to use passed in as the first parameter, and a 0 as the | 265 directory to use passed in as the first parameter, and a 0 as the |
266 second parameter. The 0 indicates the uppermost indentation level. | 266 second parameter. The 0 indicates the uppermost indentation level. |
267 They must assume that the cursor is at the position where they start | 267 They must assume that the cursor is at the position where they start |
268 inserting buttons.") | 268 inserting buttons.") |
269 | 269 |
270 (defcustom speedbar-initial-expansion-list-name "files" | 270 (defvar speedbar-initial-expansion-list-name "files" |
271 "A symbol name representing the expansion list to use. | 271 "A symbol name representing the expansion list to use. |
272 The expansion list `speedbar-initial-expansion-mode-alist' contains | 272 The expansion list `speedbar-initial-expansion-mode-alist' contains |
273 the names and associated functions to use for buttons in speedbar." | 273 the names and associated functions to use for buttons in speedbar.") |
274 :group 'speedbar | |
275 :type '(radio (const :tag "File Directories" "files") | |
276 (const "buffers") | |
277 (const "quick buffers") | |
278 )) | |
279 | 274 |
280 (defvar speedbar-previously-used-expansion-list-name "files" | 275 (defvar speedbar-previously-used-expansion-list-name "files" |
281 "Save the last expansion list method. | 276 "Save the last expansion list method. |
282 This is used for returning to a previous expansion list method when | 277 This is used for returning to a previous expansion list method when |
283 the user is done with the current expansion list.") | 278 the user is done with the current expansion list.") |
1005 (make-frame params) | 1000 (make-frame params) |
1006 (let ((x-pointer-shape x-pointer-top-left-arrow) | 1001 (let ((x-pointer-shape x-pointer-top-left-arrow) |
1007 (x-sensitive-text-pointer-shape | 1002 (x-sensitive-text-pointer-shape |
1008 x-pointer-hand2)) | 1003 x-pointer-hand2)) |
1009 (make-frame params))))) | 1004 (make-frame params))))) |
1005 (if (listp cfx) (setq cfx (eval cfx))) | |
1006 (if (listp cfy) (setq cfx (eval cfy))) | |
1010 (if (and window-system (not (eq window-system 'pc))) | 1007 (if (and window-system (not (eq window-system 'pc))) |
1011 (set-frame-position frame | 1008 (set-frame-position frame |
1012 ;; Decide which side to put it | 1009 ;; Decide which side to put it |
1013 ;; on. 200 is just a buffer | 1010 ;; on. 200 is just a buffer |
1014 ;; for the left edge of the | 1011 ;; for the left edge of the |
1027 ;; Get the buffer to play with | 1024 ;; Get the buffer to play with |
1028 (speedbar-mode) | 1025 (speedbar-mode) |
1029 (select-frame speedbar-frame) | 1026 (select-frame speedbar-frame) |
1030 (switch-to-buffer speedbar-buffer) | 1027 (switch-to-buffer speedbar-buffer) |
1031 (set-window-dedicated-p (selected-window) t)) | 1028 (set-window-dedicated-p (selected-window) t)) |
1032 (if (or (null window-system) (eq window-system 'pc)) | 1029 (if (and (or (null window-system) (eq window-system 'pc)) |
1030 (fboundp 'set-frame-name)) | |
1033 (progn | 1031 (progn |
1034 (select-frame speedbar-frame) | 1032 (select-frame speedbar-frame) |
1035 (set-frame-name "Speedbar"))) | 1033 (set-frame-name "Speedbar"))) |
1036 (speedbar-set-timer speedbar-update-speed))))) | 1034 (speedbar-set-timer speedbar-update-speed))))) |
1037 | 1035 |