It would appear that some code I wrote in 1997 to use tempo.el in
cc-mode is breaking JDE.  The relevant sections are in a file I have
called cctempo.el (adds boilerplate to new C files, provides some
functionality like jde-javadoc-autodoc-at-line to cc-mode) and uses
tempo-user-elements.  Commenting out one line (indicated below) to avoid
adding to tempo-user-elements make everything work:

;;; ... lots of code omitted....

(defun cctempo:tempo-user-elements (arg)
  "cctempo elements for cc-mode (C/C++)"
  (cond ((eq arg 'user)
         (format "%-20s" (user-full-name)))
        ((eq arg 'ifndef-header)
         (let ((tag (mapconcat '(lambda (arg) arg)
                               (split-string
                                (file-name-nondirectory (buffer-file-name)) 
"[^A-Za-z0-9_]")
                               "_")))
           (format "#ifndef __%s\n#define __%s\n" tag tag)))
        ((eq arg 'endif-header)
         (let ((tag (mapconcat '(lambda (arg) arg)
                               (split-string
                                (file-name-nondirectory (buffer-file-name)) 
"[^A-Za-z0-9_]")
                               "_")))
           (format "#endif /* __%s */\n" tag tag)))
        ((eq arg 'function)
         (let (end)
           (save-excursion
             (end-of-defun)
             (beginning-of-defun)
             (if (not (looking-at "{"))
                 ""
               (backward-sexp)
               ;; Broken for backward, works fine for forward --- why?
               ;; (re-search-backward "\\s_\\sw")
               (skip-chars-backward "\t\n\r ")
               (setq end (point))
               (backward-sexp)
               (buffer-substring (point) end)))))
        ((eq arg 'arglist)
         (let (end)
           (save-excursion
             (end-of-defun)
             (beginning-of-defun)
             (if (not (looking-at "{"))
                 ""
               ;; Broken for backward, works fine for forward --- why?
               ;; (re-search-backward "\\s_\\sw")
               (skip-chars-backward "\t\n\r ")
               (setq end (point))
               (backward-sexp)
               (cctempo:format-arglist 
                (buffer-substring (1+ (point)) (1- end)))))))
        (t "")))

;; ... more code omitted ...

;; adding these break JDE mode jde-javadoc-autodoc-at-line
(add-to-list 'tempo-user-elements 'cctempo:tempo-user-elements)

I'm now trying to read through tempo to figure out why this breaks
things....

regards,

roland
-- 
                       PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD                             RL Enterprises
[EMAIL PROTECTED]                            6818 Madeline Court
[EMAIL PROTECTED]                           Brooklyn, NY 11220

Reply via email to