Update.
authorFrancois Fleuret <francois@fleuret.org>
Wed, 21 Nov 2018 08:26:58 +0000 (09:26 +0100)
committerFrancois Fleuret <francois@fleuret.org>
Wed, 21 Nov 2018 08:26:58 +0000 (09:26 +0100)
emacs.el
media.el
vm

index e9c9969..5f7aed0 100644 (file)
--- a/emacs.el
+++ b/emacs.el
@@ -123,6 +123,7 @@ uses `load-path' to find it."
       (ff/compile-when-needed (concat name ".el"))
     (mapc (lambda (dir)
             (let* ((src (concat dir "/" name)))
       (ff/compile-when-needed (concat name ".el"))
     (mapc (lambda (dir)
             (let* ((src (concat dir "/" name)))
+              ;; (message "Compiling " scr) ;;***********
               (when (file-newer-than-file-p src (concat src "c"))
                 (if (let ((byte-compile-verbose nil))
                       (condition-case nil
               (when (file-newer-than-file-p src (concat src "c"))
                 (if (let ((byte-compile-verbose nil))
                       (condition-case nil
@@ -1223,9 +1224,9 @@ goback argument, go back where we were."
 (load "vc-git")
 
 (defun ff/git-pull-push (universal) (interactive "P")
 (load "vc-git")
 
 (defun ff/git-pull-push (universal) (interactive "P")
-       (when universal (shell-command "git commit -a -m \"Update\"" nil))
+       (when universal (shell-command "git commit -a -m \"Update.\"" nil))
        (message "git pull / push ...")
        (message "git pull / push ...")
-       (async-shell-command "git pull && git push" nil)
+       (async-shell-command "git remote get-url origin && git pull && git push" nil)
        )
 
 (defun ff/git-pull () (interactive)
        )
 
 (defun ff/git-pull () (interactive)
index ebddca7..3fb9352 100644 (file)
--- a/media.el
+++ b/media.el
@@ -666,8 +666,7 @@ returns nil if no id3 tags could be found."
               (push (cons url (cons title time)) (cdr (assoc playlist list)))
               )))))
 
               (push (cons url (cons title time)) (cdr (assoc playlist list)))
               )))))
 
-    (save-excursion
-      (set-buffer (find-file-noselect media/playlist-file))
+    (with-current-buffer (find-file-noselect media/playlist-file)
       (erase-buffer)
       (mapc (lambda (x)
               (insert "PLAYLIST:" (car x) "\n")
       (erase-buffer)
       (mapc (lambda (x)
               (insert "PLAYLIST:" (car x) "\n")
diff --git a/vm b/vm
index 7326c1b..eb25a97 100644 (file)
--- a/vm
+++ b/vm
 
 ;; Store and restore the window configuration
 
 
 ;; Store and restore the window configuration
 
+(setq ff/window-configuration-before-vm nil)
+
 (defadvice vm (before ff/store-window-configuration nil activate)
 (defadvice vm (before ff/store-window-configuration nil activate)
-  (unless (boundp 'ff/window-configuration-before-vm)
+  (unless ff/window-configuration-before-vm
     (setq ff/window-configuration-before-vm (current-window-configuration)))
   )
 
 (defadvice vm-quit (after ff/restore-window-configuration nil activate)
     (setq ff/window-configuration-before-vm (current-window-configuration)))
   )
 
 (defadvice vm-quit (after ff/restore-window-configuration nil activate)
-  (when (boundp 'ff/window-configuration-before-vm)
+  (when ff/window-configuration-before-vm
     (set-window-configuration ff/window-configuration-before-vm)
     (set-window-configuration ff/window-configuration-before-vm)
-    (makunbound 'ff/window-configuration-before-vm)
+    (setq ff/window-configuration-before-vm nil)
     )
   )
 
     )
   )
 
@@ -657,8 +659,10 @@ an attachment")
 
 (defun ff/first-buffer-in-mode (l m)
   (if l
 
 (defun ff/first-buffer-in-mode (l m)
   (if l
-      (if (eq (save-excursion
-                (set-buffer (car l)) major-mode) m)
+      (if (eq
+           ;; (save-excursion (set-buffer (car l)) major-mode)
+           (with-current-buffer (car l) major-mode)
+           m)
           (car l)
         (ff/first-buffer-in-mode (cdr l) m))))
 
           (car l)
         (ff/first-buffer-in-mode (cdr l) m))))