Permalink
Browse files

* rudel-speedbar.el (header): fixed history

  (rudel-speedbar-key-map): updated documentation string
  (rudel-speedbar-menu): renamed Compile -> Subscribed; dummy entry
  for now
  (rudel-find-nearest-file-line):
  (rudel-session::eieio-speedbar-derive-line-path):
  (rudel-session::eieio-speedbar-description):
  (rudel-project::eieio-speedbar-object-buttonname):
  (rudel-project::eieio-speedbar-object-children):
  (rudel-file-find):
  (rudel-create-tag-buttons):
  (rudel-tag-expand):
  (rudel-tag-find): removed; obsolete
  • Loading branch information...
1 parent 49afa07 commit e1ab85ca09bb52bbf50fdba262c4ad29529f82a7 @scymtym committed Dec 21, 2009
Showing with 6 additions and 118 deletions.
  1. +6 −118 rudel-speedbar.el
View
@@ -4,7 +4,7 @@
;;
;; Author: Jan Moringen <scymtym@users.sourceforge.net>
;; Keywords: rudel, collaboration, speedbar
-;; X-RCS: $Id: rudel-speedbar.el,v 1.32 2008/10/10 21:47:28 zappo Exp $
+;; X-RCS: $Id:$
;;
;; This file is part of Rudel.
;;
@@ -28,7 +28,7 @@
;;; History:
;;
-;; 0.1 - Initial revision.
+;; 0.1 - Initial version
;;; Code:
@@ -61,18 +61,20 @@
"Return a string to use as a speedbar button for OBJECT."
(rudel-unique-name this))
+
;;; Speedbar support mode
;;
+
(defun rudel-speedbar-make-map ()
"Make the generic object based speedbar keymap."
(speedbar-make-specialized-keymap))
(defvar rudel-speedbar-key-map
(rudel-speedbar-make-map)
- "A Generic object based speedbar display keymap.")
+ "A generic object based speedbar display keymap.")
(defvar rudel-speedbar-menu
- '([ "Compile" rudel-speedbar-compile-line t])
+ '([ "Subscribe" #'ignore t])
"Menu part in easymenu format used in speedbar while browsing objects.")
(defun rudel-speedbar-toplevel-buttons (dir)
@@ -96,119 +98,5 @@ Argument DIR is the directory from which to derive the list of objects."
(speedbar-change-initial-expansion-list "Collaboration Session")
(speedbar-get-focus))
-;;; Speedbar Project Methods
-;;
-;; (defun rudel-find-nearest-file-line ()
-;; "Go backwards until we find a file."
-;; (save-excursion
-;; (beginning-of-line)
-;; (looking-at "^\\([0-9]+\\):")
-;; (let ((depth (string-to-number (match-string 1))))
-;; (while (not (re-search-forward "[]] [^ ]"
-;; (save-excursion (end-of-line)
-;; (point))
-;; t))
-;; (re-search-backward (format "^%d:" (1- depth)))
-;; (setq depth (1- depth)))
-;; (speedbar-line-token))))
-;;
-;; (defmethod eieio-speedbar-derive-line-path ((obj rudel-session) &optional depth)
-;; "Return the path to OBJ.
-;; Optional DEPTH is the depth we start at."
-;; "session" ;(file-name-directory (oref obj file))
-;; )
-;;
-;; (defmethod eieio-speedbar-derive-line-path ((obj rudel-session) &optional depth)
-;; "Return the path to OBJ.
-;; Optional DEPTH is the depth we start at."
-;; (let ((proj (rudel-target-parent obj)))
-;; ;; Check the type of line we are currently on.
-;; ;; If we are on a child, we need a file name too.
-;; (save-excursion
-;; (let ((lt (speedbar-line-token)))
-;; (if (or (eieio-object-p lt) (stringp lt))
-;; (eieio-speedbar-derive-line-path proj)
-;; ;; a child element is a token. Do some work to get a filename too.
-;; (concat (eieio-speedbar-derive-line-path proj)
-;; (rudel-find-nearest-file-line)))))))
-;;
-;; (defmethod eieio-speedbar-description ((obj rudel-session))
-;; "Provide a speedbar description for OBJ."
-;; "bla") ;(rudel-description obj))
-;;
-;;
-;; (defmethod eieio-speedbar-object-buttonname ((object rudel-project))
-;; "Return a string to use as a speedbar button for OBJECT."
-;; (if (rudel-parent-project object)
-;; (rudel-name object)
-;; (concat (rudel-name object) " " (oref object version))))
-;;
-;;
-;; (defmethod eieio-speedbar-object-children ((this rudel-project))
-;; "Return the list of speedbar display children for THIS."
-;; (condition-case nil
-;; (with-slots (subproj targets) this
-;; (append subproj targets))
-;; (error nil)))
-;;
-;;
-;; ;;; Generic file management for TARGETS
-;; ;;
-;; (defun rudel-file-find (text token indent)
-;; "Find the file TEXT at path TOKEN.
-;; INDENT is the current indentation level."
-;; (speedbar-find-file-in-frame
-;; (expand-file-name token (speedbar-line-directory indent)))
-;; (speedbar-maybee-jump-to-attached-frame))
-;;
-;; (defun rudel-create-tag-buttons (filename indent)
-;; "Create the tag buttons associated with FILENAME at INDENT."
-;; (let* ((lst (speedbar-fetch-dynamic-tags filename)))
-;; ;; if no list, then remove expando button
-;; (if (not lst)
-;; (speedbar-change-expand-button-char ??)
-;; (speedbar-with-writable
-;; ;; We must do 1- because indent was already incremented.
-;; (speedbar-insert-generic-list (1- indent)
-;; lst
-;; 'rudel-tag-expand
-;; 'rudel-tag-find)))))
-;;
-;; (defun rudel-tag-expand (text token indent)
-;; "Expand a tag sublist. Imenu will return sub-lists of specialized tag types.
-;; Etags does not support this feature. TEXT will be the button
-;; string. TOKEN will be the list, and INDENT is the current indentation
-;; level."
-;; (cond ((string-match "+" text) ;we have to expand this file
-;; (speedbar-change-expand-button-char ?-)
-;; (speedbar-with-writable
-;; (save-excursion
-;; (end-of-line) (forward-char 1)
-;; (speedbar-insert-generic-list indent token
-;; 'rudel-tag-expand
-;; 'rudel-tag-find))))
-;; ((string-match "-" text) ;we have to contract this node
-;; (speedbar-change-expand-button-char ?+)
-;; (speedbar-delete-subblock indent))
-;; (t (error "Ooops... not sure what to do")))
-;; (speedbar-center-buffer-smartly))
-;;
-;; (defun rudel-tag-find (text token indent)
-;; "For the tag TEXT in a file TOKEN, goto that position.
-;; INDENT is the current indentation level."
-;; (let ((file (rudel-find-nearest-file-line)))
-;; (speedbar-find-file-in-frame file)
-;; (save-excursion (speedbar-stealthy-updates))
-;; ;; Reset the timer with a new timeout when cliking a file
-;; ;; in case the user was navigating directories, we can cancel
-;; ;; that other timer.
-;; ; (speedbar-set-timer speedbar-update-speed)
-;; (goto-char token)
-;; (run-hooks 'speedbar-visiting-tag-hook)
-;; ;;(recenter)
-;; (speedbar-maybee-jump-to-attached-frame)
-;; ))
-
(provide 'rudel-speedbar)
-
;;; rudel-speedbar.el ends here

0 comments on commit e1ab85c

Please sign in to comment.