emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/widen-less db79bc2 1/3: Remove prog-widen


From: Dmitry Gutov
Subject: [Emacs-diffs] scratch/widen-less db79bc2 1/3: Remove prog-widen
Date: Fri, 1 Dec 2017 18:56:31 -0500 (EST)

branch: scratch/widen-less
commit db79bc257c280923094f33bc1a247feb8df9de4d
Author: Dmitry Gutov <address@hidden>
Commit: Dmitry Gutov <address@hidden>

    Remove prog-widen
---
 lisp/progmodes/prog-mode.el | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el
index b36d242..16662e5 100644
--- a/lisp/progmodes/prog-mode.el
+++ b/lisp/progmodes/prog-mode.el
@@ -89,23 +89,6 @@ instead."
   "Return the indentation column normally used for top-level constructs."
   (or (car prog-indentation-context) 0))
 
-(defun prog-widen ()
-  "Remove restrictions (narrowing) from current code chunk or buffer.
-This function should be used instead of `widen' in any function used
-by the indentation engine to make it respect the value of
-`prog-indentation-context'.
-
-This function (like `widen') is useful inside a
-`save-restriction' to make the indentation correctly work when
-narrowing is in effect."
-  (let ((chunk (cadr prog-indentation-context)))
-    (if chunk
-        ;; No call to `widen' is necessary here, as narrow-to-region
-        ;; changes (not just narrows) the existing restrictions
-        (narrow-to-region (car chunk) (or (cdr chunk) (point-max)))
-      (widen))))
-
-
 (defvar-local prettify-symbols-alist nil
   "Alist of symbol prettifications.
 Each element looks like (SYMBOL . CHARACTER), where the symbol



reply via email to

[Prev in Thread] Current Thread [Next in Thread]