;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;;
;;;; LilyPond is free software: you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
(define editor-command-template-alist
'(("emacs" . "emacsclient --no-wait +%(line)s:%(column)s %(file)s || (emacs +%(line)s:%(column)s %(file)s&)")
(define editor-command-template-alist
'(("emacs" . "emacsclient --no-wait +%(line)s:%(column)s %(file)s || (emacs +%(line)s:%(column)s %(file)s&)")
- (if (string-match "%\\(file\\)s" editor)
- editor
- (string-append editor " %(file)s"))
- (if (string-match (caar alist) editor)
- (cdar alist)
- (get-command-template (cdr alist) editor))))
+ (if (string-match "%\\(file\\)s" editor)
+ editor
+ (string-append editor " %(file)s"))
+ (if (string-match (caar alist) editor)
+ (cdar alist)
+ (get-command-template (cdr alist) editor))))
- (template (get-command-template editor-command-template-alist editor))
- (command
- (re-sub "%\\(file\\)s" (format #f "~S" file-name)
- (re-sub "%\\(line\\)s" (format #f "~a" line)
- (re-sub "%\\(char\\)s" (format #f "~a" char)
- (re-sub
- "%\\(column\\)s" (format #f "~a" column)
- (slashify template)))))))
+ (template (get-command-template editor-command-template-alist editor))
+ (command
+ (re-sub "%\\(file\\)s" (format #f "~S" file-name)
+ (re-sub "%\\(line\\)s" (format #f "~a" line)
+ (re-sub "%\\(char\\)s" (format #f "~a" char)
+ (re-sub
+ "%\\(column\\)s" (format #f "~a" column)
+ (slashify template)))))))