From: "Zoltan Kemenczy" <kemenczy@rogers.com>
Subject: Re: gud.el - jdb support update to work with updated cc-mode
Date: Sat, 13 Sep 2003 20:14:23 -0400 [thread overview]
Message-ID: <001001c37a55$26c15880$0701a8c0@rim.net> (raw)
This is a smaller patch and more correct since it ignores whitespace
differences relative to gud.el in CVS
My apologies...
Regards, Zoltan
diff -w -u ~/b/emacs/emacs/lisp/progmodes/gud.el ~/local/lisp-cvs/gud.el
--- /zoltan/b/emacs/emacs/lisp/progmodes/gud.el Mon Sep 1 11:45:35 2003
+++ /zoltan/local/lisp-cvs/gud.el Sat Sep 13 19:48:53 2003
@@ -2817,8 +2817,13 @@
(save-match-data
(let ((cplist (append gud-jdb-sourcepath gud-jdb-classpath))
(fbuffer (get-file-buffer f))
- class-found)
+ 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,17 +2846,17 @@
;; with the 'topmost-intro symbol, there may be
;; nested classes...
(while (not (eq 'topmost-intro
- (car (car (c-guess-basic-syntax)))))
+ (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 (car (car syntax))))
+ (and (not (eq 'inclass (syntax-symbol syntax)))
(cdr syntax))
(setq syntax (cdr syntax)))
- (if (eq 'inclass (car (car syntax)))
+ (if (eq 'inclass (syntax-symbol syntax))
(progn
- (goto-char (cdr (car syntax)))
+ (goto-char (syntax-point syntax))
;; Now we're at the beginning of a class
;; definition. Find class name
(looking-at
@@ -2860,9 +2865,9 @@
(append (list (match-string-no-properties
1))
nclass)))
(setq syntax (c-guess-basic-syntax))
- (while (and (not (cdr (car syntax))) (cdr syntax))
+ (while (and (not (syntax-point syntax)) (cdr syntax))
(setq syntax (cdr syntax)))
- (goto-char (cdr (car syntax)))
+ (goto-char (syntax-point syntax))
))
(string-match (concat (car nclass) "$") class-found)
(setq class-found
next reply other threads:[~2003-09-14 0:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-14 0:14 Zoltan Kemenczy [this message]
2003-09-15 19:13 ` gud.el - jdb support update to work with updated cc-mode Nick Roberts
[not found] <E19ZyfW-0006ae-4m@fencepost.gnu.org>
2003-07-08 23:31 ` [kemenczy@rogers.com: cc-engine:c-guess-basic-syntax related problem in latest CVS] Martin Stjernholm
2003-07-10 2:08 ` Zoltan Kemenczy
2003-07-16 21:13 ` Martin Stjernholm
2003-09-14 0:07 ` gud.el - jdb support update to work with updated cc-mode Zoltan Kemenczy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001001c37a55$26c15880$0701a8c0@rim.net' \
--to=kemenczy@rogers.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.