diff lisp/progmodes/c-mode.el @ 24447:8309f6535486

(c-outline-level): Bind buffer-invisibility-spec.
author Dave Love <fx@gnu.org>
date Sat, 06 Mar 1999 19:07:47 +0000
parents 42e8acda5021
children 4a181ea97251
line wrap: on
line diff
--- a/lisp/progmodes/c-mode.el	Sat Mar 06 19:06:40 1999 +0000
+++ b/lisp/progmodes/c-mode.el	Sat Mar 06 19:07:47 1999 +0000
@@ -390,9 +390,11 @@
   (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