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

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

[elpa] externals/auto-overlays 31a4d46 48/93: Bug-fixes in auto-overlay-


From: Stefan Monnier
Subject: [elpa] externals/auto-overlays 31a4d46 48/93: Bug-fixes in auto-overlay-load-overlays and auto-overlay-save-overlays
Date: Mon, 14 Dec 2020 13:00:35 -0500 (EST)

branch: externals/auto-overlays
commit 31a4d464feea2484083cba9db440bb6fcbea232b
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: Toby S. Cubitt <toby-predictive@dr-qubit.org>

    Bug-fixes in auto-overlay-load-overlays and auto-overlay-save-overlays
---
 auto-overlay-common.el |  2 +-
 auto-overlays.el       | 13 ++++++++-----
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/auto-overlay-common.el b/auto-overlay-common.el
index f50cfb6..d7ec335 100644
--- a/auto-overlay-common.el
+++ b/auto-overlay-common.el
@@ -2,7 +2,7 @@
 ;;; auto-overlay-common.el --- general overlay functions
 
 
-;; Copyright (C) 2006 Toby Cubitt
+;; Copyright (C) 2006-2007 Toby Cubitt
 
 ;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
 ;; Version: 0.1.1
diff --git a/auto-overlays.el b/auto-overlays.el
index f616512..f7b332e 100644
--- a/auto-overlays.el
+++ b/auto-overlays.el
@@ -5,7 +5,7 @@
 ;; Copyright (C) 2005-2008 Toby Cubitt
 
 ;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
-;; Version: 0.9.4
+;; Version: 0.9.5
 ;; Keywords: automatic, overlays
 ;; URL: http://www.dr-qubit.org/emacs.php
 
@@ -30,6 +30,9 @@
 
 ;;; Change Log:
 ;;
+;; Version 0.9.5
+;; * bug-fixes in `auto-overlay-save-overlays' and `auto-overlay-load-overlays'
+;;
 ;; Version 0.9,4
 ;; * made inequalities strict in `auto-o-overlapping-match' (fixes a bug, but
 ;;   does it introduce others?!)
@@ -916,8 +919,8 @@ The overlays can be loaded again later using
     (when buffer (set-buffer buffer))
 
     ;; construct filename
-    (let ((path (or (file-name-directory file) ""))
-         (filename (file-name-nondirectory file)))
+    (let ((path (or (and file (file-name-directory file)) ""))
+         (filename (or (and file (file-name-nondirectory file)) "")))
       ;; use default filename if none supplied
       (when (string= filename "")
        (if (buffer-file-name)
@@ -998,8 +1001,8 @@ overlays were saved."
     (when buffer (set-buffer buffer))
 
     ;; construct filename
-    (let ((path (or (file-name-directory file) ""))
-         (filename (file-name-nondirectory file)))
+    (let ((path (or (and file (file-name-directory file)) ""))
+         (filename (and file (file-name-nondirectory file))))
       ;; use default filename if none supplied
       ;; FIXME: should we throw error if buffer not associated with file?
       (when (string= filename "")



reply via email to

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