summaryrefslogtreecommitdiff
path: root/lisp/progmodes/c-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/progmodes/c-mode.el')
-rw-r--r--lisp/progmodes/c-mode.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/progmodes/c-mode.el b/lisp/progmodes/c-mode.el
index ab9cf8dc992..1d3c241c96f 100644
--- a/lisp/progmodes/c-mode.el
+++ b/lisp/progmodes/c-mode.el
@@ -390,9 +390,11 @@ if that value is non-nil."
(run-hooks 'c-mode-hook))
(defun c-outline-level ()
- (save-excursion
- (skip-chars-forward "\t ")
- (current-column)))
+ ;; This so that `current-column' DTRT in otherwise-hidden text.
+ (let (buffer-invisibility-spec)
+ (save-excursion
+ (skip-chars-forward "\t ")
+ (current-column))))
;; This is used by indent-for-comment
;; to decide how much to indent a comment in C code