summaryrefslogtreecommitdiff
path: root/elisp/geiser-syntax.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-02 23:01:17 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-03-02 23:01:17 +0100
commita4358aa381d45b1c05bea5c8545a108a7bc20123 (patch)
tree37aed4c0f492d70300426f0210cd163763da3e07 /elisp/geiser-syntax.el
parent0085c16dc3add5722e86c738c0ff1fa969183d86 (diff)
downloadgeiser-a4358aa381d45b1c05bea5c8545a108a7bc20123.tar.gz
geiser-a4358aa381d45b1c05bea5c8545a108a7bc20123.tar.bz2
Autodoc enhancements:
* Use argument names from guile-procedures.txt when available. * Highlihgt #:opt with a face of its own.
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r--elisp/geiser-syntax.el12
1 files changed, 7 insertions, 5 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index e050503..01dd151 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -83,12 +83,14 @@
(when (not (eq (char-after (point)) ?\())
(skip-syntax-backward "-<>")
(delete-region (point) (point-max)))
- (let ((pps (parse-partial-sexp (point-min) (point))))
- (when (nth 8 pps) ;; inside a comment or string
- (delete-region (nth 8 pps) (point-max))))
+ (let ((p (nth 8 (syntax-ppss))))
+ (when p ;; inside a comment or string
+ (let ((str (nth 3 (syntax-ppss))))
+ (delete-region p (point-max))
+ (when str (insert "XXXpointXXX")))))
(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 ?. ?@ ?, ?\' ?\` ?\#))
+ ((memq (char-after (1- (point))) (list ?. ?@ ?, ?\' ?\` ?\# ?\\))
(skip-syntax-backward "^-(")
(delete-region (point) (point-max))
t))
@@ -101,7 +103,7 @@
(defsubst geiser-syntax--get-partial-sexp ()
(unless (zerop (nth 0 (syntax-ppss)))
(let* ((end (if (eq (char-after (point)) ?\() (1+ (point))
- (save-excursion (skip-syntax-forward "^-()") (point))))
+ (save-excursion (skip-syntax-forward "^-\"<>()") (point))))
(begin (save-excursion (beginning-of-defun) (point))))
(geiser-syntax--complete-partial-sexp (current-buffer) begin end))))