emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/progmodes/gud.el


From: Nick Roberts
Subject: [Emacs-diffs] Changes to emacs/lisp/progmodes/gud.el
Date: Mon, 15 Sep 2003 15:14:01 -0400

Index: emacs/lisp/progmodes/gud.el
diff -c emacs/lisp/progmodes/gud.el:1.6 emacs/lisp/progmodes/gud.el:1.7
*** emacs/lisp/progmodes/gud.el:1.6     Mon Sep  1 11:45:35 2003
--- emacs/lisp/progmodes/gud.el Mon Sep 15 15:14:00 2003
***************
*** 2817,2824 ****
        (save-match-data
          (let ((cplist (append gud-jdb-sourcepath gud-jdb-classpath))
                (fbuffer (get-file-buffer f))
!               class-found)
            (setq f (file-name-sans-extension (file-truename f)))
            ;; Search through classpath list for an entry that is
            ;; contained in f
            (while (and cplist (not class-found))
--- 2817,2829 ----
        (save-match-data
          (let ((cplist (append gud-jdb-sourcepath gud-jdb-classpath))
                (fbuffer (get-file-buffer f))
!               syntax-symbol syntax-point class-found)
            (setq f (file-name-sans-extension (file-truename f)))
+           ;; Syntax-symbol returns the symbol of the *first* element
+           ;; in the syntactical analysis result list, syntax-point
+           ;; returns the buffer position of same
+           (fset 'syntax-symbol (lambda (x) (c-langelem-sym (car x))))
+           (fset 'syntax-point (lambda (x) (c-langelem-pos (car x))))
            ;; Search through classpath list for an entry that is
            ;; contained in f
            (while (and cplist (not class-found))
***************
*** 2841,2857 ****
                    ;; with the 'topmost-intro symbol, there may be
                    ;; nested classes...
                    (while (not (eq 'topmost-intro
!                                   (car (car (c-guess-basic-syntax)))))
                      ;; Check if the current position c-syntactic
                      ;; analysis has 'inclass
                      (setq syntax (c-guess-basic-syntax))
                      (while
!                         (and (not (eq 'inclass (car (car syntax))))
                               (cdr syntax))
                        (setq syntax (cdr syntax)))
!                     (if (eq 'inclass (car (car syntax)))
                          (progn
!                           (goto-char (cdr (car syntax)))
                            ;; Now we're at the beginning of a class
                            ;; definition.  Find class name
                            (looking-at
--- 2846,2862 ----
                    ;; with the 'topmost-intro symbol, there may be
                    ;; nested classes...
                    (while (not (eq 'topmost-intro
!                                   (syntax-symbol (c-guess-basic-syntax))))
                      ;; Check if the current position c-syntactic
                      ;; analysis has 'inclass
                      (setq syntax (c-guess-basic-syntax))
                      (while
!                         (and (not (eq 'inclass (syntax-symbol syntax)))
                               (cdr syntax))
                        (setq syntax (cdr syntax)))
!                     (if (eq 'inclass (syntax-symbol syntax))
                          (progn
!                           (goto-char (syntax-point syntax))
                            ;; Now we're at the beginning of a class
                            ;; definition.  Find class name
                            (looking-at
***************
*** 2860,2868 ****
                                  (append (list (match-string-no-properties 1))
                                          nclass)))
                        (setq syntax (c-guess-basic-syntax))
!                       (while (and (not (cdr (car syntax))) (cdr syntax))
                          (setq syntax (cdr syntax)))
!                       (goto-char (cdr (car syntax)))
                        ))
                    (string-match (concat (car nclass) "$") class-found)
                    (setq class-found
--- 2865,2873 ----
                                  (append (list (match-string-no-properties 1))
                                          nclass)))
                        (setq syntax (c-guess-basic-syntax))
!                       (while (and (not (syntax-point syntax)) (cdr syntax))
                          (setq syntax (cdr syntax)))
!                       (goto-char (syntax-point syntax))
                        ))
                    (string-match (concat (car nclass) "$") class-found)
                    (setq class-found




reply via email to

[Prev in Thread] Current Thread [Next in Thread]