Ok, I researched a little more, and found out that
line-beginning-position is a GNU emacs function that doesn't exist in
XEmacs, and that the GNU emacs function takes an optional parameter. So,
jde-bug's definition of this function is wrong. 

I patched jde-bug.el to use the same function definition as
emacs-wiki.el, and everything seems to be fine. No more errors.

Patch attached.

On Tue, 2002-10-29 at 09:40, Daniel Serodio wrote:
> Well, I've found some more info on this error. emacs-wiki defines a
> line-beginning-position function with 1 optional argument, and jde-bug
> defines a function with the same name but no arguments.
> 
> In emacs-wiki.el:
> 
> (unless (fboundp 'line-beginning-position)
>   (defsubst line-beginning-position (&optional N)
>     (save-excursion (beginning-of-line N) (point))))
> 
> In jde-bug.el:
> 
> (when jde-xemacsp
>   (defun line-beginning-position ()
>     (point-at-bol))
>   (defun line-end-position ()
>     (point-at-eol)))
> 
> How can I solve this conflict? Thanks for any help.
> 
> On Mon, 2002-10-28 at 15:29, Daniel Serodio wrote:
> > Hi! I'm a long-time user of JDEE, and I've just downloaded emacs-wiki.el
> > 
> > When I first called 'emacs-wiki-find-file', I got an error. So I
> > launched XEmacs with -vanilla, and tried again. No error this time. So I
> > commented out all of my .emacs and began uncommenting line-by-line to
> > find where the problem was. To my surprise, it is caused by JDEE!
> > 
> > I can use emacs-wiki ok, but when I (require 'jde), I get the following
> > error:
> > 
> > (warning/warning) Error caught in `font-lock-pre-idle-hook':
> > (wrong-number-of-arguments line-beginning-position 1)
> > 
> > Is anyone able to use emacs-wiki with jde "require'd"?
> > 
> > -- 
> > []'s
> > Daniel Serodio
> -- 
> []'s
> Daniel Serodio
-- 
[]'s
Daniel Serodio
--- jde-bug.el.orig     Tue Oct 29 09:46:05 2002
+++ jde-bug.el  Tue Oct 29 09:47:42 2002
@@ -39,10 +39,12 @@
 (require 'jde-dbs)
 
 (when jde-xemacsp
-  (defun line-beginning-position ()
-    (point-at-bol))
-  (defun line-end-position ()
-    (point-at-eol)))
+  (unless (fboundp 'line-end-position)
+    (defsubst line-end-position (&optional N)
+      (save-excursion (end-of-line N) (point))))
+  (unless (fboundp 'line-beginning-position)
+    (defsubst line-beginning-position (&optional N)
+      (save-excursion (beginning-of-line N) (point)))))
 
 (defgroup jde-bug nil
   "JDEbug General Options"
@@ -2814,4 +2816,4 @@
 ;;
 ;; Revision 1.1  1999/08/10 09:59:59  paulk
 ;; Initial revision
-;;
\ No newline at end of file
+;;

Reply via email to