emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master cb10b47 165/433: (mmm-set-buffer-file-name-p): Added to co


From: Dmitry Gutov
Subject: [elpa] master cb10b47 165/433: (mmm-set-buffer-file-name-p): Added to control file name setting.
Date: Thu, 15 Mar 2018 19:43:55 -0400 (EDT)

branch: master
commit cb10b4780a7c452c475d27d24b09ac942e0e2982
Author: mas <mas>
Commit: mas <mas>

    (mmm-set-buffer-file-name-p): Added to control file name setting.
---
 mmm-region.el |  7 +++----
 mmm-vars.el   | 13 ++++++++++++-
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/mmm-region.el b/mmm-region.el
index 386bf29..99a9a4e 100644
--- a/mmm-region.el
+++ b/mmm-region.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2000 by Michael Abraham Shulman
 
 ;; Author: Michael Abraham Shulman <address@hidden>
-;; Version: $Id: mmm-region.el,v 1.23 2000/08/23 00:01:18 mas Exp $
+;; Version: $Id: mmm-region.el,v 1.24 2000/08/23 03:53:45 mas Exp $
 
 ;;{{{ GPL
 
@@ -326,9 +326,8 @@ which is set here as well.  See `mmm-save-local-variables'."
           ;; Now make a new temporary buffer.
           (set-buffer (mmm-make-temp-buffer (current-buffer)
                                             mmm-temp-buffer-name))
-          ;; We have to set this for each file, because the user may
-          ;; have code that inspects buffer-file-name.
-          (setq buffer-file-name filename))
+          (if mmm-set-buffer-file-name-p
+              (setq buffer-file-name filename)))
         (funcall mode)
         (when (featurep 'font-lock)
           ;; XEmacs doesn't have global-font-lock-mode (or rather, it
diff --git a/mmm-vars.el b/mmm-vars.el
index 53b80db..ce63b6e 100644
--- a/mmm-vars.el
+++ b/mmm-vars.el
@@ -3,7 +3,7 @@
 ;; Copyright (C) 2000 by Michael Abraham Shulman
 
 ;; Author: Michael Abraham Shulman <address@hidden>
-;; Version: $Id: mmm-vars.el,v 1.28 2000/08/23 03:39:08 mas Exp $
+;; Version: $Id: mmm-vars.el,v 1.29 2000/08/23 03:53:45 mas Exp $
 
 ;;{{{ GPL
 
@@ -391,6 +391,17 @@ an existing buffer."
   :type '(repeat (symbol :tag "Mode")))
 
 ;;}}}
+;;{{{ Buffer File Name
+
+(defvar mmm-set-buffer-file-name-p nil
+  "If non-nil, temporary buffers have `buffer-file-name' set.
+If so, is set to the corresponding value of the parent buffer.  In
+general, this has been found to cause more problems than it solves.
+If you have code in a mode hook that depends on `buffer-file-name'
+being set, I suggest you change it, but if that is infeasible, you may
+set this variable to a non-nil value instead.")
+
+;;}}}
 
 ;; NON-USER VARIABLES
 ;;{{{ Mode Variable



reply via email to

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