[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: emacs question

From: andersvi
Subject: Re: emacs question
Date: Wed, 10 Sep 2008 18:01:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

(buffer-file-name) returns a string without backquote-escaping the

Heres a replacement (try evalling this somewhere in emacs after
'lilypond-mode is loaded).  Please test before including anywhere.


(defun subst-spc-w-bcksl (lista)                ; what a hack!
  ;; escape 'unescaped' space-characters:
  ;; 'string-to-list
  (let ((a (car lista))
        (b (car (cdr lista))))
    (cond ((null lista) '()) 
          ((and (= a 92) (= b 32))  ; check for already escaped whitespaces
           (cons a (cons b (subst-solo-spc-w-bcksl (cddr lista)))))
          ((= a 32)     ; insert backslash in front of whitespace
           (cons 92 (cons a (subst-solo-spc-w-bcksl (cdr lista)))))
          (t (cons a (subst-solo-spc-w-bcksl (cdr lista)))))))

(defun buffer-file-name-w-escaped-space ()

(defun LilyPond-get-master-file ()
  (or LilyPond-master-file
      ;; our new version of buffer-file-name

reply via email to

[Prev in Thread] Current Thread [Next in Thread]