Diff for /gforth/gforth.el between versions 1.51 and 1.52

version 1.51, 2001/06/17 16:13:50 version 1.52, 2001/06/19 14:49:23
Line 528  PARSED-TYPE specifies what kind of text Line 528  PARSED-TYPE specifies what kind of text
   
 ;;; imenu support  ;;; imenu support
 ;;;  ;;;
   (defvar forth-defining-words 
     '("VARIABLE" "CONSTANT" "2VARIABLE" "2CONSTANT" "FVARIABLE" "FCONSTANT"
      "USER" "VALUE" "field" "end-struct" "VOCABULARY" "CREATE" ":" "CODE"
      "DEFER" "ALIAS")
     "List of words, that define the following word.\
    Used for imenu index generation")
   
    
 (defun forth-next-definition-starter ()  (defun forth-next-definition-starter ()
   (progn    (progn
     (let* ((regexp (car forth-compiled-defining-words))      (let* ((pos (re-search-forward forth-defining-words-regexp (point-max) t)))
            (pos (re-search-forward regexp (point-max) t)))  
       (message "regexp: %s pos:%s" regexp pos)  
       (if pos        (if pos
           (if (or (text-property-not-all (match-beginning 0) (match-end 0)             (if (or (text-property-not-all (match-beginning 0) (match-end 0) 
                                           'forth-parsed nil)                                           'forth-parsed nil)
                    (text-property-not-all (match-beginning 0) (match-end 0)                    (text-property-not-all (match-beginning 0) (match-end 0)
                                           'forth-state nil))                                            'forth-state nil)) 
               (forth-next-definition-starter)                (forth-next-definition-starter)
             t)              t)
         nil))))          nil))))
   
 (defun forth-create-index ()  (defun forth-create-index ()
   (let* ((defwords     (let* ((forth-defining-words-regexp 
           (forth-filter (lambda (word)             (concat "\\<\\(" (regexp-opt forth-defining-words) "\\)\\>"))
                           (and (eq (nth 1 word) 'definition-starter)  
                                (> (length word) 3)))  
                         forth-words))  
          (forth-compiled-defining-words (forth-compile-wordlist defwords))  
          (index nil))           (index nil))
     (goto-char (point-min))      (goto-char (point-min))
     (while (forth-next-definition-starter)      (while (forth-next-definition-starter)
       (if (looking-at "[ \t]*\\([^ \t\n]+\\)")        (if (looking-at "[ \t]*\\([^ \t\n]+\\)")
           (setq index (cons (cons (match-string 1) (point)) index))))            (setq index (cons (cons (match-string 1) (point)) index))))
     (message "index: %s" index)  
     index))      index))
   
   (require 'speedbar)
 (speedbar-add-supported-extension ".fs")  (speedbar-add-supported-extension ".fs")
 (speedbar-add-supported-extension ".fb")  (speedbar-add-supported-extension ".fb")
   
Line 990  exceeds 64 characters." Line 992  exceeds 64 characters."
   
 (defun forth-find-tag (tagname &optional next-p regexp-p)  (defun forth-find-tag (tagname &optional next-p regexp-p)
   (interactive (find-tag-interactive "Find tag: "))    (interactive (find-tag-interactive "Find tag: "))
   ;  (when (not regexp-p)
   ;      (setq tagname (concat "^\\(" (regexp-opt (list tagname)) 
   ;                           "\\)$"))
   ;      (setq regexp-p t))
   (switch-to-buffer    (switch-to-buffer
    (find-tag-noselect (concat " " tagname " ") next-p regexp-p)))     (find-tag-noselect (concat " " tagname " ") next-p regexp-p)))
   

Removed from v.1.51  
changed lines
  Added in v.1.52


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>