* 23.0.50; find-library scan-error "Unbalanced parenthesis"
@ 2008-01-24 0:07 Lennart Borgman (gmail)
2008-01-24 7:59 ` martin rudalics
0 siblings, 1 reply; 2+ messages in thread
From: Lennart Borgman (gmail) @ 2008-01-24 0:07 UTC (permalink / raw)
To: emacs-pretest-bug
Here is a simple bug - I believe. I get the error
error: (scan-error "Unbalanced parentheses" 344 1)
from find-libary
To reproduce do
emacs -Q
Paste these lines in the scratch buffer
;;(add-to-list 'load-path "c:/DL/emacs/org-5.13h/org-5.13h/")
;;(require 'org-install)
Place cursor at beginning of second line and do
M-x find-library RET
In GNU Emacs 23.0.50.1 (i386-mingw-nt5.1.2600)
of 2008-01-21
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: 23.0.50; find-library scan-error "Unbalanced parenthesis"
2008-01-24 0:07 23.0.50; find-library scan-error "Unbalanced parenthesis" Lennart Borgman (gmail)
@ 2008-01-24 7:59 ` martin rudalics
0 siblings, 0 replies; 2+ messages in thread
From: martin rudalics @ 2008-01-24 7:59 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: emacs-pretest-bug
[-- Attachment #1: Type: text/plain, Size: 912 bytes --]
> Here is a simple bug - I believe. I get the error
>
> error: (scan-error "Unbalanced parentheses" 344 1)
>
> from find-libary
>
> To reproduce do
>
> emacs -Q
>
> Paste these lines in the scratch buffer
>
> ;;(add-to-list 'load-path "c:/DL/emacs/org-5.13h/org-5.13h/")
> ;;(require 'org-install)
>
> Place cursor at beginning of second line and do
>
> M-x find-library RET
The bug occurs (also) because `function-called-at-point' is a misnomer.
`find-tag-default' is allowed to return a symbol somewhere on the
current line. `find-library' assumes that the "require" is right there
at point and tries to get out of a non-existent list.
You can reproduce a similar bug by putting point on the "require" in the
top-level string below when invoking `find-library':
"require 'org-install"
Hence there is a bug with `find-library' itself. Let's wrap this in a
simple `condition-case'.
[-- Attachment #2: find-func.patch --]
[-- Type: text/plain, Size: 1013 bytes --]
*** find-func.el.~1.83.~ Wed Oct 31 13:39:44 2007
--- find-func.el Thu Jan 24 08:51:58 2008
***************
*** 195,205 ****
(let* ((path (cons (or find-function-source-path load-path)
(find-library-suffixes)))
(def (if (eq (function-called-at-point) 'require)
! (save-excursion
! (backward-up-list)
! (forward-char)
! (backward-sexp -2)
! (thing-at-point 'symbol))
(thing-at-point 'symbol))))
(when def
(setq def (and (locate-file-completion def path 'test) def)))
--- 195,207 ----
(let* ((path (cons (or find-function-source-path load-path)
(find-library-suffixes)))
(def (if (eq (function-called-at-point) 'require)
! (condition-case nil
! (save-excursion
! (backward-up-list)
! (forward-char)
! (backward-sexp -2)
! (thing-at-point 'symbol))
! (error nil))
(thing-at-point 'symbol))))
(when def
(setq def (and (locate-file-completion def path 'test) def)))
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-01-24 7:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-24 0:07 23.0.50; find-library scan-error "Unbalanced parenthesis" Lennart Borgman (gmail)
2008-01-24 7:59 ` martin rudalics
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).