Mercurial > hg > mercurial-crew-with-dirclash
comparison contrib/mq.el @ 5465:9873cbb134b2
mercurial.el, mq.el: remove runtime dependencies on CL package
* (require 'cl) at compile-time
* don't use map()
author | NIIMI Satoshi <sa2c@sa2c.net> |
---|---|
date | Thu, 11 Oct 2007 05:58:54 +0900 |
parents | ea7b982b6c08 |
children | 87860c62e003 |
comparison
equal
deleted
inserted
replaced
5464:7dafd9ab3979 | 5465:9873cbb134b2 |
---|---|
16 ;; You should have received a copy of the GNU General Public License | 16 ;; You should have received a copy of the GNU General Public License |
17 ;; along with mq.el, GNU Emacs, or XEmacs; see the file COPYING (`C-h | 17 ;; along with mq.el, GNU Emacs, or XEmacs; see the file COPYING (`C-h |
18 ;; C-l'). If not, write to the Free Software Foundation, Inc., 59 | 18 ;; C-l'). If not, write to the Free Software Foundation, Inc., 59 |
19 ;; Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 19 ;; Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
20 | 20 |
21 (eval-when-compile (require 'cl)) | |
21 (require 'mercurial) | 22 (require 'mercurial) |
22 | 23 |
23 | 24 |
24 (defcustom mq-mode-hook nil | 25 (defcustom mq-mode-hook nil |
25 "Hook run when a buffer enters mq-mode." | 26 "Hook run when a buffer enters mq-mode." |
100 May return nil, meaning \"use the default\"." | 101 May return nil, meaning \"use the default\"." |
101 (let ((patches (split-string | 102 (let ((patches (split-string |
102 (hg-chomp (hg-run0 (or source "qseries"))) "\n"))) | 103 (hg-chomp (hg-run0 (or source "qseries"))) "\n"))) |
103 (when force | 104 (when force |
104 (completing-read (format "Patch%s: " (or prompt "")) | 105 (completing-read (format "Patch%s: " (or prompt "")) |
105 (map 'list 'cons patches patches) | 106 (mapcar (lambda (x) (cons x x)) patches) |
106 nil | 107 nil |
107 nil | 108 nil |
108 nil | 109 nil |
109 'mq-patch-history)))) | 110 'mq-patch-history)))) |
110 | 111 |