diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-03 01:05:12 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-03-03 01:05:12 +0100 |
commit | f09c34f2749d223760654d3b5d0934a042d176b1 (patch) | |
tree | 54c8aa20a97cb932595d54bb914c11f8b2713fcc /elisp/geiser-syntax.el | |
parent | ef1fcb91a47ef570f71b240aaf2a6ec529c9eb6e (diff) | |
download | geiser-guile-f09c34f2749d223760654d3b5d0934a042d176b1.tar.gz geiser-guile-f09c34f2749d223760654d3b5d0934a042d176b1.tar.bz2 |
Highlight also #:key in autodoc.
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r-- | elisp/geiser-syntax.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index 01dd151..f0148e2 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -76,6 +76,8 @@ (forward-sexp arg) (delete-region p (point)))) +(defconst geiser-syntax--placeholder (format "___%s___" (random 100))) + (defun geiser-syntax--complete-partial-sexp (buffer begin end) (geiser-syntax--with-buffer (erase-buffer) @@ -87,14 +89,14 @@ (when p ;; inside a comment or string (let ((str (nth 3 (syntax-ppss)))) (delete-region p (point-max)) - (when str (insert "XXXpointXXX"))))) + (when str (insert geiser-syntax--placeholder))))) (when (cond ((eq (char-after (1- (point))) ?\)) (geiser-syntax--del-sexp -1) t) ((eq (char-after (point)) ?\() (delete-region (point) (point-max)) t) ((memq (char-after (1- (point))) (list ?. ?@ ?, ?\' ?\` ?\# ?\\)) (skip-syntax-backward "^-(") (delete-region (point) (point-max)) t)) - (insert "XXXpointXX")) + (insert geiser-syntax--placeholder)) (let ((depth (nth 0 (parse-partial-sexp (point-min) (point))))) (unless (zerop depth) (insert (make-string depth ?\))))) (when (< (point-min) (point)) |