Skip to content
Browse files

* helm-bmkext.el: Remove obsolete code.

* helm-aliases.el: Update
  • Loading branch information...
1 parent 4dc273c commit ca2f7232f32557310ec78531a787e3df62bb7f97 @thierryvolpiatto thierryvolpiatto committed Apr 3, 2013
Showing with 28 additions and 76 deletions.
  1. +0 −8 helm-aliases.el
  2. +28 −68 helm-bmkext.el
View
8 helm-aliases.el
@@ -493,8 +493,6 @@
(make-obsolete 'helm-c-find-file-or-marked 'helm-find-file-or-marked "1.5.1")
(defalias 'helm-c-query-replace-regexp 'helm-query-replace-regexp)
(make-obsolete 'helm-c-query-replace-regexp 'helm-query-replace-regexp "1.5.1")
-(defalias 'helm-c-bookmark-ssh-files-setup-alist 'helm-bookmark-ssh-files-setup-alist)
-(make-obsolete 'helm-c-bookmark-ssh-files-setup-alist 'helm-bookmark-ssh-files-setup-alist "1.5.1")
(defalias 'helm-c-describe-variable 'helm-describe-variable)
(make-obsolete 'helm-c-describe-variable 'helm-describe-variable "1.5.1")
(defalias 'helm-c-advice-persistent-action 'helm-advice-persistent-action)
@@ -543,8 +541,6 @@
(make-obsolete 'helm-c-xrandr-info 'helm-xrandr-info "1.5.1")
(defalias 'helm-c-stringify 'helm-stringify)
(make-obsolete 'helm-c-stringify 'helm-stringify "1.5.1")
-(defalias 'helm-c-bookmark-su-files-setup-alist 'helm-bookmark-su-files-setup-alist)
-(make-obsolete 'helm-c-bookmark-su-files-setup-alist 'helm-bookmark-su-files-setup-alist "1.5.1")
(defalias 'helm-c-goto-precedent-file 'helm-goto-precedent-file)
(make-obsolete 'helm-c-goto-precedent-file 'helm-goto-precedent-file "1.5.1")
(defalias 'helm-c-apt-cache-show 'helm-apt-cache-show)
@@ -728,8 +724,6 @@
(make-obsolete-variable 'helm-c-eldoc-in-minibuffer-show-fn 'helm-eldoc-in-minibuffer-show-fn "1.5.1")
(defvaralias 'helm-c-google-suggest-search-url 'helm-google-suggest-search-url)
(make-obsolete-variable 'helm-c-google-suggest-search-url 'helm-google-suggest-search-url "1.5.1")
-(defvaralias 'helm-c-source-bookmark-su-files&dirs 'helm-source-bookmark-su-files&dirs)
-(make-obsolete-variable 'helm-c-source-bookmark-su-files&dirs 'helm-source-bookmark-su-files&dirs "1.5.1")
(defvaralias 'helm-c-source-bmkext-addressbook 'helm-source-bmkext-addressbook)
(make-obsolete-variable 'helm-c-source-bmkext-addressbook 'helm-source-bmkext-addressbook "1.5.1")
(defvaralias 'helm-c-source-ctags 'helm-source-ctags)
@@ -774,8 +768,6 @@
(make-obsolete-variable 'helm-c-grep-use-ioccur-style-keys 'helm-grep-use-ioccur-style-keys "1.5.1")
(defvaralias 'helm-c-ctags-modes 'helm-ctags-modes)
(make-obsolete-variable 'helm-c-ctags-modes 'helm-ctags-modes "1.5.1")
-(defvaralias 'helm-c-source-bookmark-ssh-files&dirs 'helm-source-bookmark-ssh-files&dirs)
-(make-obsolete-variable 'helm-c-source-bookmark-ssh-files&dirs 'helm-source-bookmark-ssh-files&dirs "1.5.1")
(defvaralias 'helm-c-source-moccur 'helm-source-moccur)
(make-obsolete-variable 'helm-c-source-moccur 'helm-source-moccur "1.5.1")
(defvaralias 'helm-c-source-w3m-bookmarks 'helm-source-w3m-bookmarks)
View
96 helm-bmkext.el
@@ -15,6 +15,11 @@
;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+;; Dependency: https://github.com/thierryvolpiatto/emacs-bmk-ext
+;; If you want to enable google-maps in addressbook you will need
+;; Julien Danjou google-maps-el package available here:
+;; http://julien.danjou.info/google-maps-el.html
+
;;; Code:
(eval-when-compile (require 'cl))
(require 'helm)
@@ -23,11 +28,9 @@
(declare-function bookmark-get-filename "bookmark" (bookmark-name-or-record))
-;; Dependency: https://github.com/thierryvolpiatto/emacs-bmk-ext
-;; If you want to enable google-maps in addressbook you will need
-;; Julien Danjou google-maps-el package available here:
-;; http://julien.danjou.info/google-maps-el.html
-
+
+;;; Filter functions
+;;
(defun helm-bmkext-filter-setup-alist (fn &rest args)
"Return a filtered `bookmark-alist' sorted alphabetically."
(loop
@@ -45,6 +48,7 @@
(interactive)
(helm-quit-and-execute-action 'bmkext-edit-bookmark))
+
;;; Addressbook.
;;
;;
@@ -131,7 +135,9 @@
"Specialized filter function for bookmarks w3m."
(helm-bmkext-filter-setup-alist 'bmkext-addressbook-alist-only))
-;; W3m bookmarks from bookmark-extensions.
+
+;;; W3m bookmarks from bookmark-extensions.
+;;
(defvar helm-source-bookmark-w3m
'((name . "Bookmark W3m")
(init . (lambda ()
@@ -149,7 +155,9 @@
"Specialized filter function for bookmarks w3m."
(helm-bmkext-filter-setup-alist 'bmkext-w3m-alist-only))
-;; Images
+
+;;; Images
+;;
(defvar helm-source-bookmark-images
'((name . "Bookmark Images")
(init . (lambda ()
@@ -167,7 +175,9 @@
"Specialized filter function for images bookmarks."
(helm-bmkext-filter-setup-alist 'bmkext-image-file-alist-only))
-;; Woman Man
+
+;;; Woman Man
+;;
(defvar helm-source-bookmark-man
'((name . "Bookmark Woman&Man")
(init . (lambda ()
@@ -186,7 +196,9 @@
(append (helm-bmkext-filter-setup-alist 'bmkext-man-alist-only)
(helm-bmkext-filter-setup-alist 'bmkext-woman-alist-only)))
-;; Gnus
+
+;;; Gnus
+;;
(defvar helm-source-bookmark-gnus
'((name . "Bookmark Gnus")
(init . (lambda ()
@@ -204,7 +216,9 @@
"Specialized filter function for bookmarks gnus."
(helm-bmkext-filter-setup-alist 'bmkext-gnus-alist-only))
-;; Info
+
+;;; Info
+;;
(defvar helm-source-bookmark-info
'((name . "Bookmark Info")
(init . (lambda ()
@@ -222,7 +236,9 @@
"Specialized filter function for bookmarks info."
(helm-bmkext-filter-setup-alist 'bmkext-info-alist-only))
-;; Local Files&directories
+
+;;; Files and directories
+;;
(defvar helm-source-bookmark-files&dirs
'((name . "Bookmark Files&Directories")
(init . (lambda ()
@@ -240,61 +256,7 @@
"Specialized filter function for bookmarks locals files."
(helm-bmkext-filter-setup-alist 'bmkext-local-file-alist-only))
-;; Su Files&directories
-(defvar helm-source-bookmark-su-files&dirs
- '((name . "Bookmark Root-Files&Directories")
- (init . (lambda ()
- (require 'bookmark-extensions)
- (bookmark-maybe-load-default-file)
- (helm-init-candidates-in-buffer
- 'global (helm-bookmark-su-files-setup-alist))))
- (candidates-in-buffer)
- (filtered-candidate-transformer
- helm-adaptive-sort
- helm-highlight-bookmark-su)
- (type . bookmark)))
-
-(defun helm-bookmark-su-files-setup-alist ()
- "Specialized filter function for bookmarks su/sudo files."
- (declare (special bmkext-su-or-sudo-regexp))
- (loop
- with l = (helm-bmkext-filter-setup-alist 'bmkext-remote-file-alist-only)
- for i in l
- for isfile = (bookmark-get-filename i)
- for istramp = (and isfile (boundp 'tramp-file-name-regexp)
- (save-match-data
- (string-match tramp-file-name-regexp isfile)))
- for issu = (and istramp
- (string-match bmkext-su-or-sudo-regexp isfile))
- if issu
- collect i))
-
-;; Ssh Files&directories
-(defvar helm-source-bookmark-ssh-files&dirs
- '((name . "Bookmark Ssh-Files&Directories")
- (init . (lambda ()
- (require 'bookmark-extensions)
- (bookmark-maybe-load-default-file)
- (helm-init-candidates-in-buffer
- 'global (helm-bookmark-ssh-files-setup-alist))))
- (candidates-in-buffer)
- (filtered-candidate-transformer . helm-adaptive-sort)
- (type . bookmark)))
-
-(defun helm-bookmark-ssh-files-setup-alist ()
- "Specialized filter function for bookmarks ssh files."
- (loop
- with l = (helm-bmkext-filter-setup-alist 'bmkext-remote-file-alist-only)
- for i in l
- for isfile = (bookmark-get-filename i)
- for istramp = (and isfile (boundp 'tramp-file-name-regexp)
- (save-match-data
- (string-match tramp-file-name-regexp isfile)))
- for isssh = (and istramp
- (string-match "/ssh:" isfile))
- if isssh
- collect i))
-
+
;;;###autoload
(defun helm-bookmark-ext ()
"Preconfigured `helm' for bookmark-extensions sources.
@@ -312,8 +274,6 @@ Contain also `helm-source-google-suggest'."
helm-source-bookmark-info
helm-source-bookmark-man
helm-source-bookmark-images
- helm-source-bookmark-su-files&dirs
- helm-source-bookmark-ssh-files&dirs
helm-source-bookmark-set)
:prompt "SearchBookmark: "
:buffer "*helm bmkext*"

0 comments on commit ca2f723

Please sign in to comment.
Something went wrong with that request. Please try again.