]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 3440: Avoid infinite recursion in Emacs' LilyPond-mode for percent in filenames
authorDavid Kastrup <dak@gnu.org>
Sat, 6 Jul 2013 09:20:29 +0000 (11:20 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 12 Jul 2013 07:42:57 +0000 (09:42 +0200)
When using a file name like "Mazurek D%85browskiego.ly", using C-c C-l
in LilyPond-mode resulted in

let: Variable binding depth exceeds max-specpdl-size

errors.  This fixes the problem by not doing further percent expansion
on the file name in `LilyPond-command-expand'.

elisp/lilypond-mode.el

index d9dcc7be472ae295dd4f9d843e8e506d4a9319e9..be05016071bb46c67686a80c83c8d2a63aad0868 100644 (file)
@@ -624,14 +624,15 @@ Must be the car of an entry in `LilyPond-command-alist'."
               (l (split-file-name file))
               (dir (car l))
               (base (cadr l)))
-         (LilyPond-command-expand
-          (concat (substring string 0 b)
-                  (shell-quote-argument (concat dir base))
-                  (let ((entry (assoc (substring string b e)
-                                      LilyPond-expand-alist)))
-                    (if entry (cdr entry) ""))
-                  (substring string e))
-          file))
+         (concat (substring string 0 b)
+                 (shell-quote-argument (concat dir base))
+                 (LilyPond-command-expand
+                  (concat
+                   (let ((entry (assoc (substring string b e)
+                                       LilyPond-expand-alist)))
+                     (if entry (cdr entry) ""))
+                   (substring string e))
+                  file)))
       string)))
 
 (defun LilyPond-shell-process (name buffer command)