From f8b68c23c8255b757f0eb8374fe09a1f76436357 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 6 Jul 2013 11:20:29 +0200 Subject: [PATCH] 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'. --- elisp/lilypond-mode.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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) -- 2.39.2