;; fetching off key-value pairs in association lists.
;;; Code:
-(eval-when-compile (require 'cl))
(defun asort (alist-symbol key)
"Move a specified key-value pair to the head of an alist.
(defvar font-lock-face-list)
(eval-when-compile
- ;;
- ;; We don't do this at the top-level as we only use non-autoloaded macros.
- (require 'cl)
- ;;
;; We use this to preserve or protect things when modifying text properties.
(defmacro save-buffer-state (varlist &rest body)
"Bind variables according to VARLIST and eval BODY restoring buffer state."
;;; Code:
(require 'font-lock)
+(eval-when-compile (require 'cl-lib))
(eval-when-compile
- ;; We don't do this at the top-level as we only use non-autoloaded macros.
- (require 'cl)
- ;;
;; We use this to preserve or protect things when modifying text properties.
(defmacro save-buffer-state (varlist &rest body)
"Bind variables according to VARLIST and eval BODY restoring buffer state."
(while (setq beg (text-property-any beg (point-max) 'lazy-lock t))
(setq next (or (text-property-any beg (point-max) 'lazy-lock nil)
(point-max)))
- (incf size (- next beg))
+ (cl-incf size (- next beg))
(setq beg next))
;; Float because using integer multiplication will frequently overflow.
(truncate (* (/ (float size) (point-max)) 100)))))
(require 'mouse)
(require 'thingatpt)
-(eval-when-compile
- (require 'cl))
-
;;=== User Variables ======================================================
(defgroup mouse-sel nil
;;; Code:
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'pgg)
(defun pgg-gpg-select-matching-key (message-keys secret-keys)
"Choose a key from MESSAGE-KEYS that matches one of the keys in SECRET-KEYS."
- (loop for message-key in message-keys
+ (cl-loop for message-key in message-keys
for message-key-id = (and (equal (car message-key) 1)
(cdr (assq 'key-identifier
(cdr message-key))))
;;; Code:
-(eval-when-compile
- ;; For Emacs <22.2 and XEmacs.
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(defgroup pgg-parse ()
"OpenPGP packet parsing."
(list content-tag packet-bytes header-bytes)))
(defun pgg-parse-packet (ptag)
- (case (car ptag)
+ (cl-case (car ptag)
(1 ;Public-Key Encrypted Session Key Packet
(pgg-parse-public-key-encrypted-session-key-packet ptag))
(2 ;Signature Packet
(1+ (cdr length-type)))))
(defun pgg-parse-signature-subpacket (ptag)
- (case (car ptag)
+ (cl-case (car ptag)
(2 ;signature creation time
(cons 'creation-time
(let ((bytes (pgg-read-bytes 4)))
;;; Code:
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'pgg)
;;; Code:
-(eval-when-compile
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
(require 'pgg)
(require 'pgg-parse)
(autoload 'run-at-time "timer")
-;; Don't merge these two `eval-when-compile's.
-(eval-when-compile
- ;; For Emacs <22.2 and XEmacs.
- (unless (fboundp 'declare-function) (defmacro declare-function (&rest r)))
- (require 'cl))
+(eval-when-compile (require 'cl-lib))
;;; @ utility functions
;;;
(defmacro pgg-convert-lbt-region (start end lbt)
`(let ((pgg-conversion-end (set-marker (make-marker) ,end)))
(goto-char ,start)
- (case ,lbt
+ (cl-case ,lbt
(CRLF
(while (progn
(end-of-line)
;;; Code:
-(eval-when-compile (require 'cl))
+(eval-when-compile (require 'cl-lib))
;; Compatibility code for when we didn't have shy-groups
(defvar sregex--current-sregex nil)
(concat "\\(?:" (regexp-quote exp) "\\)")
(regexp-quote exp)))
((symbolp exp)
- (ecase exp
+ (cl-ecase exp
(any ".")
(bol "^")
(eol "$")