branch: elpa/gnuplot
commit 536f2c31c7281499205cb3d2780c234a48fd7300
Author: joddie <[email protected]>
Commit: joddie <[email protected]>
Put alias for missing syntax-ppss with the other workarounds
---
gnuplot.el | 25 ++++++++++++-------------
1 file changed, 12 insertions(+), 13 deletions(-)
diff --git a/gnuplot.el b/gnuplot.el
index 9f34377..8b7572b 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -402,6 +402,18 @@ real work."
(defalias 'gnuplot-set-process-query-on-exit-flag
'set-process-query-on-exit-flag)
(defalias 'gnuplot-set-process-query-on-exit-flag
'process-kill-without-query))
+;; Workaround for missing syntax-ppss in XEmacs
+(if (fboundp 'syntax-ppss)
+ (defalias 'gnuplot-syntax-ppss 'syntax-ppss)
+ (defun gnuplot-syntax-ppss (&optional pos)
+ (save-excursion
+ (unless pos (setq pos (point)))
+ (let ((begin
+ (save-excursion
+ (goto-char pos)
+ (gnuplot-point-at-beginning-of-continuation))))
+ (parse-partial-sexp begin pos)))))
+
;;;;
(defconst gnuplot-xemacs-p (string-match "XEmacs" (emacs-version)))
@@ -1914,19 +1926,6 @@ buffers."
(cons continuation-start continuation-end))))
;; Parsing utilities to tell if we are inside a string or comment
-
-;; XEmacs doesn't have syntax-ppss
-(if (featurep 'xemacs)
- (defun gnuplot-syntax-ppss (&optional pos)
- (save-excursion
- (unless pos (setq pos (point)))
- (let ((begin
- (save-excursion
- (goto-char pos)
- (gnuplot-point-at-beginning-of-continuation))))
- (parse-partial-sexp begin pos))))
- (defalias 'gnuplot-syntax-ppss 'syntax-ppss))
-
(defun gnuplot-in-string (&optional where)
"Returns non-nil if the text at WHERE is within a string.