Browse Source

Merge branch 'maint'

Achim Gratz 10 years ago
parent
commit
2f8067c915
1 changed files with 8 additions and 8 deletions
  1. 8 8
      mk/org-fixup.el

+ 8 - 8
mk/org-fixup.el

@@ -58,8 +58,8 @@ the Git work tree)."
 \f\n;; Local Variables:\n;; version-control: never
 ;; no-byte-compile: t
 ;; coding: utf-8\n;; End:\n;;; org-version.el ends here\n")
-    (toggle-read-only 0)
-    (write-file "org-version.el")))
+    (let ((inhibit-read-only t))
+      (write-file "org-version.el"))))
 
 (defun org-make-org-loaddefs ()
   "Make the file org-loaddefs.el in the current directory.
@@ -77,8 +77,8 @@ work correctly if this file is not up-to-date."
     (insert "\f\n;; Local Variables:\n;; version-control: never\n")
     (insert ";; no-byte-compile: t\n;; no-update-autoloads: t\n")
     (insert ";; coding: utf-8\n;; End:\n;;; org-loaddefs.el ends here\n")
-    (toggle-read-only 0)
-    (save-buffer)))
+    (let ((inhibit-read-only t))
+      (save-buffer))))
 
 (defun org-make-autoloads (&optional compile force)
   "Make the files org-loaddefs.el and org-version.el in the install directory.
@@ -140,8 +140,8 @@ oldorg:	# do what the old Makefile did by default.
 	  (insert "\
 # See default.mk for further configuration options.
 ")
-	  (toggle-read-only 0)
-	  (write-file local))
+	  (let ((inhibit-read-only t))
+	    (write-file local)))
       nil)))
 
 (defun org-make-letterformat (a4name lettername)
@@ -152,8 +152,8 @@ oldorg:	# do what the old Makefile did by default.
 	(goto-char (point-min))
 	(while (search-forward "\\pdflayout=(0l)" nil t)
 	  (replace-match "\\pdflayout=(1l)" nil t))
-	(toggle-read-only 0)
-	(write-file lettername))
+	  (let ((inhibit-read-only t))
+	    (write-file lettername)))
     nil))
 
 ;; redefine version functions