Преглед на файлове

ox-publish: fix typo in function name

* lisp/org-compat.el (org-publish-cache-ctime-of-src):
New backward-compatibility alias.
* lisp/ox-publish.el (org-publish-cache-mtime-of-src):
Rename from org-publish-cache-ctime-of-src, since it
has always cached mtime not ctime.  All uses changed.
Paul Eggert преди 3 години
родител
ревизия
540fcd0193
променени са 2 файла, в които са добавени 13 реда и са изтрити 10 реда
  1. 3 0
      lisp/org-compat.el
  2. 10 10
      lisp/ox-publish.el

+ 3 - 0
lisp/org-compat.el

@@ -876,6 +876,9 @@ context.  See the individual commands for more information."
 
 
 (define-obsolete-function-alias 'org-get-last-sibling 'org-get-previous-sibling "9.4")
 (define-obsolete-function-alias 'org-get-last-sibling 'org-get-previous-sibling "9.4")
 
 
+(define-obsolete-function-alias 'org-publish-cache-ctime-of-src
+  'org-publish-cache-mtime-of-src "9.6")
+
 (define-obsolete-function-alias 'org-truely-invisible-p
 (define-obsolete-function-alias 'org-truely-invisible-p
   'org-truly-invisible-p "9.6"
   'org-truly-invisible-p "9.6"
   "Compatibility alias for legacy misspelling of `org-truly-invisible-p'.")
   "Compatibility alias for legacy misspelling of `org-truly-invisible-p'.")

+ 10 - 10
lisp/ox-publish.el

@@ -382,7 +382,7 @@ still decide about that independently."
   "Update publishing timestamp for file FILENAME.
   "Update publishing timestamp for file FILENAME.
 If there is no timestamp, create one."
 If there is no timestamp, create one."
   (let ((key (org-publish-timestamp-filename filename pub-dir pub-func))
   (let ((key (org-publish-timestamp-filename filename pub-dir pub-func))
-	(stamp (org-publish-cache-ctime-of-src filename)))
+	(stamp (org-publish-cache-mtime-of-src filename)))
     (org-publish-cache-set key stamp)))
     (org-publish-cache-set key stamp)))
 
 
 (defun org-publish-remove-all-timestamps ()
 (defun org-publish-remove-all-timestamps ()
@@ -1292,7 +1292,7 @@ the file including them will be republished as well."
   (let* ((key (org-publish-timestamp-filename filename pub-dir pub-func))
   (let* ((key (org-publish-timestamp-filename filename pub-dir pub-func))
 	 (pstamp (org-publish-cache-get key))
 	 (pstamp (org-publish-cache-get key))
 	 (org-inhibit-startup t)
 	 (org-inhibit-startup t)
-	 included-files-ctime)
+	 included-files-mtime)
     (when (equal (file-name-extension filename) "org")
     (when (equal (file-name-extension filename) "org")
       (let ((case-fold-search t))
       (let ((case-fold-search t))
 	(with-temp-buffer
 	(with-temp-buffer
@@ -1313,14 +1313,14 @@ the file including them will be republished as well."
 				     (substring m 0 (match-beginning 0))
 				     (substring m 0 (match-beginning 0))
 				   m)))))
 				   m)))))
 		    (when include-filename
 		    (when include-filename
-		      (push (org-publish-cache-ctime-of-src
+		      (push (org-publish-cache-mtime-of-src
 			     (expand-file-name include-filename (file-name-directory filename)))
 			     (expand-file-name include-filename (file-name-directory filename)))
-			    included-files-ctime))))))))))
+			    included-files-mtime))))))))))
     (or (null pstamp)
     (or (null pstamp)
-	(let ((ctime (org-publish-cache-ctime-of-src filename)))
-	  (or (time-less-p pstamp ctime)
-	      (cl-some (lambda (ct) (time-less-p ctime ct))
-		       included-files-ctime))))))
+	(let ((mtime (org-publish-cache-mtime-of-src filename)))
+	  (or (time-less-p pstamp mtime)
+	      (cl-some (lambda (ct) (time-less-p mtime ct))
+		       included-files-mtime))))))
 
 
 (defun org-publish-cache-set-file-property
 (defun org-publish-cache-set-file-property
     (filename property value &optional project-name)
     (filename property value &optional project-name)
@@ -1365,8 +1365,8 @@ does not exist."
     (error "`org-publish-cache-set' called, but no cache present"))
     (error "`org-publish-cache-set' called, but no cache present"))
   (puthash key value org-publish-cache))
   (puthash key value org-publish-cache))
 
 
-(defun org-publish-cache-ctime-of-src (file)
-  "Get the ctime of FILE as an integer."
+(defun org-publish-cache-mtime-of-src (file)
+  "Get the mtime of FILE as an integer."
   (let ((attr (file-attributes
   (let ((attr (file-attributes
 	       (expand-file-name (or (file-symlink-p file) file)
 	       (expand-file-name (or (file-symlink-p file) file)
 				 (file-name-directory file)))))
 				 (file-name-directory file)))))