Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
M17N
edict-emacs
edict-emacs-cl-lib.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File edict-emacs-cl-lib.patch of Package edict-emacs
Index: mule/edict/dui-registry.el =================================================================== --- mule.orig/edict/dui-registry.el +++ mule/edict/dui-registry.el @@ -34,6 +34,8 @@ ;;; Code: (require 'dui) +(require 'edict) +(require 'edict-edit) (dui-register-method "ispell word" Index: mule/edict/edict-edit.el =================================================================== --- mule.orig/edict/edict-edit.el +++ mule/edict/edict-edit.el @@ -42,7 +42,7 @@ ;;; Code: -(require 'cl) +(require 'cl-lib) ;;; Customizable variables @@ -233,7 +233,7 @@ With arg, read an input method from mini (goto-char (or p start)))) ;; Inverse of edict-insert-entry. Parse an entry. -;; (multiple-value-bind (kanji yomi english) (edict-parse-entry) +;; (cl-multiple-value-bind (kanji yomi english) (edict-parse-entry) ;; (edict-insert-entry kanji yomi english)) ;; duplicates the current line's entry. @@ -507,7 +507,7 @@ but not the yomi." (unless (looking-at "/") (end-of-line) (insert "/")) - (multiple-value-bind (kanji yomi english) + (cl-multiple-value-bind (kanji yomi english) (edict-parse-entry) (end-of-line) (if (>= (point) (point-max)) Index: mule/edict/edict-morphology.el =================================================================== --- mule.orig/edict/edict-morphology.el +++ mule/edict/edict-morphology.el @@ -47,7 +47,7 @@ ;;; Code: -(require 'cl) ; for defstruct +(require 'cl-lib) ; for defstruct ;;; Constants: @@ -166,7 +166,7 @@ be appropriate in yomi).") ;; defstruct's defsetfs should expand into this; sigh. ;; Maybe this is fixed, comment them out. ;(eval-when (eval load compile) -(defstruct edict-syntax-type +(cl-defstruct edict-syntax-type name rules) ;) @@ -183,7 +183,7 @@ be appropriate in yomi).") name)) ;(eval-when (eval load compile) -(defstruct edict-rule +(cl-defstruct edict-rule name pattern ;Pattern which it must match filter ;Syntactic filter on previous form @@ -258,8 +258,8 @@ be appropriate in yomi).") fromto nil)) (when (null fromto) (setq fromto '($BF|K\8l(B $BF|K\8l(B))) - (setq from (first fromto) - to (second fromto)) + (setq from (cl-first fromto) + to (cl-second fromto)) (unless (listp from) (setq from (list from))) (unless (listp to) @@ -271,9 +271,10 @@ be appropriate in yomi).") (unless (stringp filter) (error "Rule %s: filter must be a regexp" name))) - (` (define-edict-rule-internal '(, name) '(, pattern) '(, filter) - '(, from) '(, to) - (function (, function)) (quote ((,@ additional-args))))))) + `(define-edict-rule-internal (quote ,name) (quote ,pattern) (quote ,filter) + (quote ,from) (quote ,to) + (function ,function) (quote (,@additional-args))))) + (defun define-edict-rule-internal (name pattern filter from-syntax-types to-syntax-types @@ -339,7 +340,7 @@ be appropriate in yomi).") (match-beginning i)) x)) (setq prev (match-end i)))) - (incf i))) + (cl-incf i))) (concat result (substring string (max prev 0))))) ;; Takes a series of alternating pairs of substitution functions @@ -380,7 +381,7 @@ be appropriate in yomi).") (match-end i)) args))) (setq prev (max prev (match-end i))))) - (incf i))) + (cl-incf i))) (concat result (substring string (max prev 0))))) ;; Ignore this piece @@ -441,7 +442,7 @@ be appropriate in yomi).") (edict-rule-name rule) string temp))) (setq result - (union (edict-expand-string-recurse + (cl-union (edict-expand-string-recurse temp (cons string (append result others)) string rule) result)))))))) @@ -457,7 +458,7 @@ be appropriate in yomi).") (let ((result nil)) (dolist (syntax syntaxes) (setq result - (union (edict-expand-string string + (cl-union (edict-expand-string string (append result others) previous syntax) Index: mule/edict/edict-test.el =================================================================== --- mule.orig/edict/edict-test.el +++ mule/edict/edict-test.el @@ -18,14 +18,16 @@ ;;; This will create an *EDICT-TESTS* buffer with the results. -(require 'cl) +(require 'cl-lib) +(require 'edict-morphology) +(require 'edict) ;;; This should exist, but doesn't. See edict.install for the ;;; compiler half of this. You should be sure to load the same ;;; hacks into your compiler if you compile this by hand, or you ;;; won't get it byte compiled. -;(defmacro eval-when (when &rest forms) +;(defmacro cl-eval-when (when &rest forms) ; (and (or (member 'eval when) ; (member ':execute when)) ; (mapcar (function eval) forms)) @@ -53,8 +55,8 @@ sTest string: ") (apply (edict-rule-function rule) string (edict-rule-additional-args rule)))) -(eval-when (eval load compile) -(defstruct edict-test +(cl-eval-when (eval load compile) +(cl-defstruct edict-test word ; Word to be tested. should-have ; Expansions that should be found should-not-have ; Expansions that should not be found. @@ -90,8 +92,8 @@ sTest string: ") (throw 'found-it test))))) (defmacro deftest (case &optional fromto should-have should-not-have not-self) - (` (define-edict-test '(, case) '(, (first fromto)) '(, (second fromto)) - '(, should-have) '(, should-not-have) '(, not-self)))) + `(define-edict-test (quote ,case) (quote ,(cl-first fromto)) (quote ,(cl-second fromto)) + (quote ,should-have) (quote ,should-not-have) (quote ,not-self))) (defun define-edict-test (name from to should-have should-not-have &optional not-self) @@ -186,7 +188,7 @@ Default test is equal." (dolist (test *edict-tests*) (let ((msg-point (point))) (cond ((not (edict-test test)) - (incf failures) + (cl-incf failures) (or first-failure (setq first-failure msg-point)))) (sit-for 0)))) (cond ((= failures 0) @@ -208,7 +210,7 @@ With argument >= 16 (i.e. c-U c-U), sing (*edict-expand-string-trace* (and arg (> (prefix-numeric-value arg) 4)))) (beginning-of-defun) (let* ((test-form (read (current-buffer))) - (test-name (second test-form)) + (test-name (cl-second test-form)) (test)) (eval test-form) (setq test (get-edict-test test-name)) Index: mule/edict/edict.el =================================================================== --- mule.orig/edict/edict.el +++ mule/edict/edict.el @@ -143,7 +143,7 @@ ;; Require standard XEmacs packages. -(require 'cl) +(require 'cl-lib) ;; Require edict support files @@ -487,7 +487,7 @@ If FILENAME is nil, do nothing (cf. edic (let ((ptr list) (done nil) (result '())) - (while (not (or done (endp ptr))) + (while (not (or done (cl-endp ptr))) (cond ((string= item (car (car ptr))) (setq done t) (setq result ptr))) @@ -706,7 +706,7 @@ If there are no matches this string will ;;Search for lines that match the key and copy the over to the ;; match buffer. (while (edict-search-key key) - (setq match-list (union match-list (list (edict-copy-of-current-line))))) + (setq match-list (cl-union match-list (list (edict-copy-of-current-line))))) match-list))) (defun edict-search-key (key) @@ -859,11 +859,11 @@ selected. This window can be removed wit ;; are we thinking? (if (string-match "^[$B!"(B-$Bt$(B]$" key) ;1 char (push key one-char-keys) - (setq match-list (union match-list (edict-search key edict-buffer))))) + (setq match-list (cl-union match-list (edict-search key edict-buffer))))) ;; If we didn't get anything, we can try including the one-char keys. (or match-list (dolist (key one-char-keys) - (setq match-list (union match-list + (setq match-list (cl-union match-list (edict-search key edict-buffer))))) ;; #### I don't understand the logic of this whole function. (if (not match-list) @@ -883,14 +883,14 @@ unless the argument is negative." ;; If we were given a negative argument, we need to switch languages. (cond ((null arg)) ((> (prefix-numeric-value arg) 0)) - (t (case arg + (t (cl-case arg (- (setq arg nil)) (otherwise (setq arg (list (- (prefix-numeric-value arg)))))) (setq edict-last-language - (ecase edict-last-language + (cl-ecase edict-last-language (english '$BF|K\8l(B) ($BF|K\8l(B 'english))))) - (ecase edict-last-language + (cl-ecase edict-last-language (english (edict-insert-$BF|K\8l(B arg)) ($BF|K\8l(B (edict-insert-english arg)))) @@ -909,7 +909,7 @@ use the Nth possibility." (goto-char (point-min))) ;; If the last command was this, then we're going on to the next possibility. ;; Otherwise, start at the beginning. - (case last-command + (cl-case last-command (edict-insert-english) (t (goto-char (point-min)))) ;; Seach forward for /<definitition>/ If we don't find one, start over from the @@ -925,7 +925,7 @@ use the Nth possibility." (setq value (buffer-substring (match-beginning 1) (match-end 1)))) ;; If we inserted one of our languages, then we should delete the old ;; one first. - (case last-command + (cl-case last-command ((edict-insert-english edict-insert-$BF|K\8l(B) (delete-region edict-insert-last-start edict-insert-last-end))) ;; Insert, remembering where we did it, so it can be replaced if we @@ -952,7 +952,7 @@ use the Nth possibility." (goto-char (point-min))) ;; If the last command was this, then we're going on to the next possibility. ;; Otherwise, start at the beginning. - (case last-command + (cl-case last-command (edict-insert-$BF|K\8l(B) (t (goto-char (point-min)))) ;; Seach forward for a word at the start of a line. If we don't find one, @@ -968,7 +968,7 @@ use the Nth possibility." (setq value (buffer-substring (match-beginning 1) (match-end 1)))) ;; If we inserted one of our languages, then we should delete the old ;; one first. - (case last-command + (cl-case last-command ((edict-insert-$BF|K\8l(B edict-insert-english) (delete-region edict-insert-last-start edict-insert-last-end))) ;; Insert, remembering where we did it, so it can be replaced if we
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor