]> code.delx.au - gnu-emacs/blobdiff - src/buffer.c
Merge from origin/emacs-25
[gnu-emacs] / src / buffer.c
index a2981c90f661e8fa0356ee5bfe00f8565d721de8..98b61c350e2c8624cad119f192cc02e4a7db0175 100644 (file)
@@ -42,10 +42,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "blockinput.h"
 #include "keymap.h"
 #include "frame.h"
+#include "xwidget.h"
 
-#ifdef HAVE_XWIDGETS
-# include "xwidget.h"
-#endif
 #ifdef WINDOWSNT
 #include "w32heap.h"           /* for mmap_* */
 #endif
@@ -1749,10 +1747,8 @@ cleaning up all windows currently displaying the buffer to be killed. */)
   unlock_buffer (b);
 
   kill_buffer_processes (buffer);
-
-#ifdef HAVE_XWIDGETS
   kill_buffer_xwidgets (buffer);
-#endif
+
   /* Killing buffer processes may run sentinels which may have killed
      our buffer.  */
   if (!BUFFER_LIVE_P (b))
@@ -2005,7 +2001,7 @@ the current buffer's major mode.  */)
   /* To select a nonfundamental mode,
      select the buffer temporarily and then call the mode function.  */
 
-  record_unwind_protect (save_excursion_restore, save_excursion_save ());
+  record_unwind_current_buffer ();
 
   Fset_buffer (buffer);
   call0 (function);
@@ -2149,16 +2145,16 @@ DEFUN ("barf-if-buffer-read-only", Fbarf_if_buffer_read_only,
        doc: /* Signal a `buffer-read-only' error if the current buffer is read-only.
 If the text under POSITION (which defaults to point) has the
 `inhibit-read-only' text property set, the error will not be raised.  */)
-  (Lisp_Object pos)
+  (Lisp_Object position)
 {
-  if (NILP (pos))
-    XSETFASTINT (pos, PT);
+  if (NILP (position))
+    XSETFASTINT (position, PT);
   else
-    CHECK_NUMBER (pos);
+    CHECK_NUMBER (position);
 
   if (!NILP (BVAR (current_buffer, read_only))
       && NILP (Vinhibit_read_only)
-      && NILP (Fget_text_property (pos, Qinhibit_read_only, Qnil)))
+      && NILP (Fget_text_property (position, Qinhibit_read_only, Qnil)))
     xsignal1 (Qbuffer_read_only, Fcurrent_buffer ());
   return Qnil;
 }
@@ -5281,7 +5277,7 @@ init_buffer (int initialized)
   if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))
     Fset_buffer_multibyte (Qnil);
 
-  pwd = get_current_dir_name ();
+  pwd = emacs_get_current_dir_name ();
 
   if (!pwd)
     {