I added this snippet to my prj.el  some of you might find it usefull, tho it
isn't working quite right.

(defun geoffs-jde-tab()
  "Inteligent tabbing in JDE"
  (interactive)
  (let* ((keys (recent-keys)) // this stolen from pc-keys....
         (len (length keys))
         (key1 (if (> len 0) (elt keys (- len 1)) nil))
         (key2 (if (> len 1) (elt keys (- len 2)) nil))
         (key3 (if (> len 2) (elt keys (- len 3)) nil))
         (key-equal-1 (eq key1 key2))
         (key-equal-2 (and key-equal-1 (eq key2 key3))))
    (cond ;(key-equal-2 (call-interactively 'dabbrev-expand))
          (key-equal-1 (call-interactively 'jde-complete-at-point))
          (t (call-interactively 'c-indent-command)))
    )
  )
(provide 'geoffs-jde-tab)
(define-key jde-mode-map [tab] 'geoffs-jde-tab)


The original idea was that the first time you hit [tab] it would indent,
the second time would call jde-complete-at-point.
the third time would call dabbr-expand (or hippie-expand).

For some reason dabbr-expand/hippie-expand seem to work fine the first time
they are called, but then screw up majorly the second time.  It works fine
when I map hippie-expand to [f3].

I know I'm calling jde-complete-at-point as I get "No completion at this
point." and "Can't find any declaration..." messages.  Unfortunately, I
can't ever get it to complete anything. (even using C-c,C-v,C-.)   Has
anyone had any luck with jde-complete-at-point?

Any help/ideas would be appreciated.


        -Geoff

Reply via email to