From: David Kastrup Date: Sat, 6 Jul 2013 09:20:29 +0000 (+0200) Subject: Issue 3440: Avoid infinite recursion in Emacs' LilyPond-mode for percent in filenames X-Git-Tag: release/2.17.22-1~6 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=f8b68c23c8255b757f0eb8374fe09a1f76436357;p=lilypond.git Issue 3440: Avoid infinite recursion in Emacs' LilyPond-mode for percent in filenames 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'. --- diff --git a/elisp/lilypond-mode.el b/elisp/lilypond-mode.el index d9dcc7be47..be05016071 100644 --- a/elisp/lilypond-mode.el +++ b/elisp/lilypond-mode.el @@ -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)