diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-07-10 07:51:54 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-07-10 07:51:54 -0400 |
commit | f58e0fd503567288bb30e243595acaa589034929 (patch) | |
tree | e40cb0a5c087c0af4bdd41948d655358b0fcd56e /lisp/vc/pcvs-info.el | |
parent | dfa96edd13d1db4a90fa0977d06b6bdeab2f642e (diff) | |
download | emacs-f58e0fd503567288bb30e243595acaa589034929.tar.gz |
Reduce use of (require 'cl).
* admin/bzrmerge.el: Use cl-lib.
* leim/quail/hangul.el: Don't require CL.
* leim/quail/ipa.el: Use cl-lib.
* vc/smerge-mode.el, vc/pcvs.el, vc/pcvs-util.el, vc/pcvs-info.el:
* vc/diff-mode.el, vc/cvs-status.el, uniquify.el, scroll-bar.el:
* register.el, progmodes/sh-script.el, net/gnutls.el, net/dbus.el:
* msb.el, mpc.el, minibuffer.el, international/ucs-normalize.el:
* international/quail.el, info-xref.el, imenu.el, image-mode.el:
* font-lock.el, filesets.el, edmacro.el, doc-view.el, bookmark.el:
* battery.el, avoid.el, abbrev.el: Use cl-lib.
* vc/pcvs-parse.el, vc/pcvs-defs.el, vc/log-view.el, vc/log-edit.el:
* vc/diff.el, simple.el, pcomplete.el, lpr.el, comint.el, loadhist.el:
* jit-lock.el, international/iso-ascii.el, info.el, frame.el, bs.el:
* emulation/crisp.el, electric.el, dired.el, cus-dep.el, composite.el:
* calculator.el, autorevert.el, apropos.el: Don't require CL.
* emacs-bytecomp.el (byte-recompile-directory, display-call-tree)
(byte-compile-unfold-bcf, byte-compile-check-variable):
* emacs-byte-opt.el (byte-compile-trueconstp)
(byte-compile-nilconstp):
* emacs-autoload.el (make-autoload): Use pcase.
* face-remap.el (text-scale-adjust): Simplify pcase patterns.
Diffstat (limited to 'lisp/vc/pcvs-info.el')
-rw-r--r-- | lisp/vc/pcvs-info.el | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/lisp/vc/pcvs-info.el b/lisp/vc/pcvs-info.el index 4f8c114d721..36572640cfc 100644 --- a/lisp/vc/pcvs-info.el +++ b/lisp/vc/pcvs-info.el @@ -31,7 +31,7 @@ ;;; Code: -(eval-when-compile (require 'cl)) +(eval-when-compile (require 'cl-lib)) (require 'pcvs-util) ;;(require 'pcvs-defs) @@ -146,7 +146,7 @@ to confuse some users sometimes." ;; Constructor: -(defstruct (cvs-fileinfo +(cl-defstruct (cvs-fileinfo (:constructor nil) (:copier nil) (:constructor -cvs-create-fileinfo (type dir file full-log @@ -274,10 +274,10 @@ to confuse some users sometimes." (string= file (file-name-nondirectory file))) (setq check 'type) (symbolp type) (setq check 'consistency) - (case type - (DIRCHANGE (and (null subtype) (string= "." file))) - ((NEED-UPDATE ADDED MISSING DEAD MODIFIED MESSAGE UP-TO-DATE - REMOVED NEED-MERGE CONFLICT UNKNOWN MESSAGE) + (pcase type + (`DIRCHANGE (and (null subtype) (string= "." file))) + ((or `NEED-UPDATE `ADDED `MISSING `DEAD `MODIFIED `MESSAGE + `UP-TO-DATE `REMOVED `NEED-MERGE `CONFLICT `UNKNOWN) t))) fi (error "Invalid :%s in cvs-fileinfo %s" check fi)))) @@ -325,9 +325,9 @@ FI-OR-TYPE can either be a symbol (a fileinfo-type) or a fileinfo." (defun cvs-add-face (str face &optional keymap &rest props) (when keymap (when (keymapp keymap) - (setq props (list* 'keymap keymap props))) - (setq props (list* 'mouse-face 'highlight props))) - (add-text-properties 0 (length str) (list* 'font-lock-face face props) str) + (setq props `(keymap ,keymap ,@props))) + (setq props `(mouse-face highlight ,@props))) + (add-text-properties 0 (length str) `(font-lock-face ,face ,@props) str) str) (defun cvs-fileinfo-pp (fileinfo) @@ -337,15 +337,15 @@ For use by the cookie package." (let ((type (cvs-fileinfo->type fileinfo)) (subtype (cvs-fileinfo->subtype fileinfo))) (insert - (case type - (DIRCHANGE (concat "In directory " - (cvs-add-face (cvs-fileinfo->full-name fileinfo) - 'cvs-header t 'cvs-goal-column t) - ":")) - (MESSAGE + (pcase type + (`DIRCHANGE (concat "In directory " + (cvs-add-face (cvs-fileinfo->full-name fileinfo) + 'cvs-header t 'cvs-goal-column t) + ":")) + (`MESSAGE (cvs-add-face (format "Message: %s" (cvs-fileinfo->full-log fileinfo)) 'cvs-msg)) - (t + (_ (let* ((status (if (cvs-fileinfo->marked fileinfo) (cvs-add-face "*" 'cvs-marked) " ")) @@ -354,10 +354,10 @@ For use by the cookie package." (base (or (cvs-fileinfo->base-rev fileinfo) "")) (head (cvs-fileinfo->head-rev fileinfo)) (type - (let ((str (case type + (let ((str (pcase type ;;(MOD-CONFLICT "Not Removed") - (DEAD "") - (t (capitalize (symbol-name type))))) + (`DEAD "") + (_ (capitalize (symbol-name type))))) (face (let ((sym (intern (concat "cvs-fi-" (downcase (symbol-name type)) |