From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Peter=20M=C3=BCnster?= Subject: [PATCH 1/2] org-notify: Don't use obsolete flet and macrolet Date: Tue, 18 Jun 2013 22:22:29 +0200 Message-ID: <1371586950-20217-1-git-send-email-pmlists@free.fr> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52105) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up2PC-0000IA-Lk for emacs-orgmode@gnu.org; Tue, 18 Jun 2013 16:21:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Up2P9-0000LG-UD for emacs-orgmode@gnu.org; Tue, 18 Jun 2013 16:21:30 -0400 Received: from smtp01.smtpout.orange.fr ([80.12.242.123]:58617 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Up2P9-0000L1-KK for emacs-orgmode@gnu.org; Tue, 18 Jun 2013 16:21:27 -0400 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org * contrib/lisp/org-notify.el (org-notify-make-todo) (org-notify-process, org-notify-on-action-button) (org-notify-action-email, org-notify-action-window): Replace `flet' and `macrolet' by `cl-flet' and `cl-macrolet'. --- contrib/lisp/org-notify.el | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/lisp/org-notify.el b/contrib/lisp/org-notify.el index 4047448..3019852 100644 --- a/contrib/lisp/org-notify.el +++ b/contrib/lisp/org-notify.el @@ -118,7 +118,7 @@ simple timestamp string." (defun org-notify-make-todo (heading &rest ignored) "Create one todo item." - (macrolet ((get (k) `(plist-get list ,k)) + (cl-macrolet ((get (k) `(plist-get list ,k)) (pr (k v) `(setq result (plist-put result ,k ,v)))) (let* ((list (nth 1 heading)) (notify (or (get :notify) "default")) (deadline (org-notify-convert-deadline (get :deadline))) @@ -157,7 +157,7 @@ PERIOD." (defun org-notify-process () "Process the todo-list, and possibly notify user about upcoming or forgotten tasks." - (macrolet ((prm (k) `(plist-get prms ,k)) (td (k) `(plist-get todo ,k))) + (cl-macrolet ((prm (k) `(plist-get prms ,k)) (td (k) `(plist-get todo ,k))) (dolist (todo (org-notify-todo-list)) (let* ((deadline (td :deadline)) (heading (td :heading)) (uid (td :uid)) (last-run-sym @@ -268,7 +268,7 @@ seconds. The default value for SECS is 20." (defun org-notify-on-action-button (button) "User wants to see action after button activation." - (macrolet ((get (k) `(button-get button ,k))) + (cl-macrolet ((get (k) `(button-get button ,k))) (org-notify-on-action (get 'plist) (get 'key)) (org-notify-delete-window (get 'buffer)) (cancel-timer (get 'timer)))) @@ -311,7 +311,7 @@ seconds. The default value for SECS is 20." (compose-mail user-mail-address (concat "TODO: " (plist-get plist :heading))) (insert (org-notify-body-text plist)) (funcall send-mail-function) - (flet ((yes-or-no-p (prompt) t)) + (cl-flet ((yes-or-no-p (prompt) t)) (kill-buffer))) (defun org-notify-select-highest-window () @@ -334,7 +334,7 @@ org-notify window. Mostly copied from `appt-select-lowest-window'." (defun org-notify-action-window (plist) "Pop up a window, mostly copied from `appt-disp-window'." (save-excursion - (macrolet ((get (k) `(plist-get plist ,k))) + (cl-macrolet ((get (k) `(plist-get plist ,k))) (let ((this-window (selected-window)) (buf (get-buffer-create (format org-notify-window-buffer-name (get :uid))))) -- 1.8.1.4