Cosmetics.
[elisp.git] / emacs.el
index 03b2bb9..aa22459 100644 (file)
--- a/emacs.el
+++ b/emacs.el
@@ -2267,30 +2267,26 @@ next one. With universal argument, kill all killable buffers."
 
 (load "recentf")
 
-(setq recentf-exclude
-      (append recentf-exclude
-              '("enotes$" "secure-notes$" "media-playlists$"
-                "bbdb$"
-                "svn-commit.tmp$" ".git/COMMIT_EDITMSG$"
-                "\.bbl$" "\.aux$" "\.toc$"))
+;; If we just check for file-symlink-p, everytime we start emacs it
+;; will check all the remote files listed in recentf-list, so we check
+;; that they are not remote first
+(defun ff/file-not-remote-but-symlink (filename)
+  (and (not (file-remote-p filename)) (file-symlink-p filename)))
+
+(setq recentf-exclude (append recentf-exclude
+                              '(
+                                ff/file-not-remote-but-symlink
+                                "enotes$" "secure-notes$" "media-playlists$"
+                                "bbdb$"
+                                "svn-commit.tmp$" ".git/COMMIT_EDITMSG$"
+                                "\.bbl$" "\.aux$" "\.toc$"
+                                ))
       recentf-max-saved-items 1000
       recentf-save-file "~/private/emacs/recentf"
       )
 
 (when (boundp 'recentf-keep) (add-to-list 'recentf-keep 'file-remote-p))
 
-;; Removes the link if we add the file itself (I am fed up with
-;; duplicates because of vc-follow-symlinks)
-
-(defadvice recentf-add-file (before ff/remove-links (filename) activate)
-  ;; If we are adding a filename corresponding to the last link we
-  ;; have added, remove the latter
-  (when (and recentf-list
-             (file-symlink-p (car recentf-list))
-             (string= filename (file-chase-links filename)))
-    (setq recentf-list (cdr recentf-list))
-    ))
-
 (recentf-mode 1)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -2477,6 +2473,8 @@ with a time tag, and save this file"
 
 (setq ff/map (make-sparse-keymap))
 (define-key global-map [(control \`)] ff/map)
+;;(define-key global-map [(control @)] ff/map)
+
 (define-key esc-map "`" ff/map)
 
 (defun ff/git-status (&optional dir) (interactive)