Jeba Bhaskaran <[EMAIL PROTECTED]> writes:

> Hello Ole,
>  I copied your code to my init.el file and getting the
> following error when trying to use the method ( called
> by M-x jde-indent-complete):
>
> Signaling: (void-function mark-or-region-active)
>   (mark-or-region-active)
>   (if (mark-or-region-active) (indent-region (mark)
> (point) nil) (if (save-excursion ... ...)
> (indent-for-tab-command) (if ... ... ...)))
>   (lambda nil "A special indent/complete function. I
> calls three different\nfunctions depending on
> context:\n\n- The region is active:\n        reindent
> the region.\n\n- The point is in front of the text on
> this line:\n        try to reindent the line. \n\n-
> The point is directly after a dot character (\".\") or
> in/at\n   the end of a word starting with a dot:\n    
>    call `jde-complete'\n\n- Otherwise:\n        call
> `hippie-expand'\n" (interactive) (if
> (mark-or-region-active) (indent-region ... ... nil)
> (if ... ... ...)))()
>   call-interactively(jde-indent-complete)
>   command-execute(jde-indent-complete t)
>   execute-extended-command(nil)
>   call-interactively(execute-extended-command)
>

Oops, you need this as well:

(or (boundp 'running-xemacs)
    (defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version)))

;; unify region checking
(if running-xemacs
    (defun mark-or-region-active ()
      "check if the region is currenty active"
      zmacs-region-active-p)
  (defun mark-or-region-active ()
    "check if the region is currenty active"
    mark-active)
  )

-- 
Ole Arndt                     http://www.sugarshark.com
-------------------------------------------------------
Any sufficiently advanced bug is indistinguishable from a feature.
                -- Rich Kulawiec

Reply via email to