;;; semantic/analyze/debug.el --- Debug the analyzer
-;;; Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+;;; Copyright (C) 2008-2015 Free Software Foundation, Inc.
;; Author: Eric M. Ludlam <zappo@gnu.org>
(let ((pentry (nth idx pf))
(ptentry (nth idx pft)))
(if (or (stringp pentry) (not ptentry))
- ;; Found someting ok. stop
+ ;; Found something ok. Stop.
(setq stop t)
(setq idx (1+ idx)))))
;; We found the first non-tag entry. What is the situation?
(semanticdb-file-table-object fileinner t))))
(cond ((not fileinner)
(setq unknown (1+ unknown)))
- ((number-or-marker-p (oref tableinner pointmax))
+ ((and tableinner (number-or-marker-p (oref tableinner pointmax)))
(setq ok (1+ ok)))
(t
(setq unparsed (1+ unparsed))))))
(set-marker orig-buffer (point) (current-buffer))
;; Get a buffer ready.
(with-current-buffer "*Help*"
- (toggle-read-only -1)
- (goto-char (point-min))
- (set (make-local-variable 'semantic-analyzer-debug-orig) orig-buffer)
- ;; First, add do-in buttons to recommendations.
- (while (re-search-forward "^\\s-*M-x \\(\\(\\w\\|\\s_\\)+\\) " nil t)
- (let ((fcn (match-string 1)))
- (when (not (fboundp (intern-soft fcn)))
- (error "Help Err: Can't find %s" fcn))
- (end-of-line)
- (insert " ")
- (insert-button "[ Do It ]"
- 'mouse-face 'custom-button-pressed-face
- 'do-fcn fcn
- 'action `(lambda (arg)
- (let ((M semantic-analyzer-debug-orig))
- (set-buffer (marker-buffer M))
- (goto-char M))
- (call-interactively (quote ,(intern-soft fcn))))
- )
- ))
+ (let ((inhibit-read-only t))
+ (goto-char (point-min))
+ (set (make-local-variable 'semantic-analyzer-debug-orig) orig-buffer)
+ ;; First, add do-in buttons to recommendations.
+ (while (re-search-forward "^\\s-*M-x \\(\\(\\w\\|\\s_\\)+\\) " nil t)
+ (let ((fcn (match-string 1)))
+ (when (not (fboundp (intern-soft fcn)))
+ (error "Help Err: Can't find %s" fcn))
+ (end-of-line)
+ (insert " ")
+ (insert-button "[ Do It ]"
+ 'mouse-face 'custom-button-pressed-face
+ 'do-fcn fcn
+ 'action `(lambda (arg)
+ (let ((M semantic-analyzer-debug-orig))
+ (set-buffer (marker-buffer M))
+ (goto-char M))
+ (call-interactively (quote ,(intern-soft fcn))))))))
;; Do something else?
-
;; Clean up the mess
- (toggle-read-only 1)
- (set-buffer-modified-p nil)
- )))
+ (set-buffer-modified-p nil))))
(provide 'semantic/analyze/debug)
-;; arch-tag: 943db1e5-47e6-4bec-9989-78ebfadf0358
;;; semantic/analyze/debug.el ends here