summaryrefslogtreecommitdiff
path: root/lisp/progmodes/glasses.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/glasses.el')
-rw-r--r--lisp/progmodes/glasses.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/glasses.el b/lisp/progmodes/glasses.el
index f760ccf3686..c7b05873369 100644
--- a/lisp/progmodes/glasses.el
+++ b/lisp/progmodes/glasses.el
@@ -243,7 +243,8 @@ CATEGORY is the overlay category. If it is nil, use the `glasses' category."
(when glasses-separate-parentheses-p
(goto-char beg)
(while (re-search-forward "[a-zA-Z]_*\\((\\)" end t)
- (unless (glasses-parenthesis-exception-p (point-at-bol) (match-end 1))
+ (unless (glasses-parenthesis-exception-p (line-beginning-position)
+ (match-end 1))
(glasses-make-overlay (match-beginning 1) (match-end 1)
'glasses-parenthesis))))))))
@@ -282,7 +283,8 @@ recognized according to the current value of the variable `glasses-separator'."
(when glasses-separate-parentheses-p
(goto-char (point-min))
(while (re-search-forward "[a-zA-Z]_*\\( \\)(" nil t)
- (unless (glasses-parenthesis-exception-p (point-at-bol) (1+ (match-end 1)))
+ (unless (glasses-parenthesis-exception-p (line-beginning-position)
+ (1+ (match-end 1)))
(replace-match "" t nil nil 1)))))))
;; nil must be returned to allow use in write file hooks
nil)