Using saved parent location: http://bzr.savannah.gnu.org/r/emacs/trunk/ Now on revision 103971. ------------------------------------------------------------ revno: 103971 committer: Chong Yidong branch nick: trunk timestamp: Thu 2011-04-21 22:35:48 -0400 message: Doc fixes for package.el. * emacs-lisp/package.el (package--builtins, package-alist) (package-load-descriptor, package-built-in-p, package-activate) (define-package, package-installed-p) (package-compute-transaction, package-buffer-info) (package--push): Doc fix. Distinguish more clearly between version strings and version lists. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-21 12:24:46 +0000 +++ lisp/ChangeLog 2011-04-22 02:35:48 +0000 @@ -1,3 +1,12 @@ +2011-04-22 Chong Yidong + + * emacs-lisp/package.el (package--builtins, package-alist) + (package-load-descriptor, package-built-in-p, package-activate) + (define-package, package-installed-p) + (package-compute-transaction, package-buffer-info) + (package--push): Doc fix. Distinguish more clearly between + version strings and version lists. + 2011-04-21 Juanma Barranquero Lexical-binding cleanup. === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2011-04-06 20:33:30 +0000 +++ lisp/emacs-lisp/package.el 2011-04-22 02:35:48 +0000 @@ -290,9 +290,11 @@ Each element has the form (PKG . DESC), where PKG is a package name (a symbol) and DESC is a vector that describes the package. -The vector DESC has the form [VERSION REQS DOCSTRING]. - VERSION is a version list. - REQS is a list of packages (symbols) required by the package. +The vector DESC has the form [VERSION-LIST REQS DOCSTRING]. + VERSION-LIST is a version list. + REQS is a list of packages required by the package, each + requirement having the form (NAME VL), where NAME is a string + and VL is a version list. DOCSTRING is a brief description of the package.") (put 'package--builtins 'risky-local-variable t) @@ -301,9 +303,11 @@ Each element has the form (PKG . DESC), where PKG is a package name (a symbol) and DESC is a vector that describes the package. -The vector DESC has the form [VERSION REQS DOCSTRING]. - VERSION is a version list. - REQS is a list of packages (symbols) required by the package. +The vector DESC has the form [VERSION-LIST REQS DOCSTRING]. + VERSION-LIST is a version list. + REQS is a list of packages required by the package, each + requirement having the form (NAME VL) where NAME is a string + and VL is a version list. DOCSTRING is a brief description of the package. This variable is set automatically by `package-load-descriptor', @@ -358,8 +362,8 @@ (defun package-load-descriptor (dir package) "Load the description file in directory DIR for package PACKAGE. -Here, PACKAGE is a string of the form NAME-VER, where NAME is the -package name and VER is its version." +Here, PACKAGE is a string of the form NAME-VERSION, where NAME is +the package name and VERSION is its version." (let* ((pkg-dir (expand-file-name package dir)) (pkg-file (expand-file-name (concat (package-strip-version package) "-pkg") @@ -452,18 +456,21 @@ ;; Don't return nil. t)) -(defun package-built-in-p (package &optional version) - "Return true if PACKAGE, of VERSION or newer, is built-in to Emacs." +(defun package-built-in-p (package &optional min-version) + "Return true if PACKAGE is built-in to Emacs. +Optional arg MIN-VERSION, if non-nil, should be a version list +specifying the minimum acceptable version." (require 'finder-inf nil t) ; For `package--builtins'. (let ((elt (assq package package--builtins))) - (and elt (version-list-<= version (package-desc-vers (cdr elt)))))) + (and elt (min-version-<= min-version (package-desc-vers (cdr elt)))))) ;; This function goes ahead and activates a newer version of a package ;; if an older one was already activated. This is not ideal; we'd at ;; least need to check to see if the package has actually been loaded, ;; and not merely activated. -(defun package-activate (package version) - "Activate package PACKAGE, of version VERSION or newer. +(defun package-activate (package min-version) + "Activate package PACKAGE, of version MIN-VERSION or newer. +MIN-VERSION should be a version list. If PACKAGE has any dependencies, recursively activate them. Return nil if the package could not be activated." (let ((pkg-vec (cdr (assq package package-alist))) @@ -471,11 +478,11 @@ ;; Check if PACKAGE is available in `package-alist'. (when pkg-vec (setq available-version (package-desc-vers pkg-vec) - found (version-list-<= version available-version))) + found (version-list-<= min-version available-version))) (cond ;; If no such package is found, maybe it's built-in. ((null found) - (package-built-in-p package version)) + (package-built-in-p package min-version)) ;; If the package is already activated, just return t. ((memq package package-activated-list) t) @@ -512,11 +519,11 @@ &rest extra-properties) "Define a new package. NAME-STRING is the name of the package, as a string. -VERSION-STRING is the version of the package, as a list of -integers of the form produced by `version-to-list'. +VERSION-STRING is the version of the package, as a string. DOCSTRING is a short description of the package, a string. REQUIREMENTS is a list of dependencies on other packages. -Each requirement is of the form (OTHER-PACKAGE \"VERSION\"). + Each requirement is of the form (OTHER-PACKAGE OTHER-VERSION), + where OTHER-VERSION is a string. EXTRA-PROPERTIES is currently unused." (let* ((name (intern name-string)) @@ -703,8 +710,8 @@ (package-unpack name version)))) (defun package-installed-p (package &optional min-version) - "Return true if PACKAGE, of VERSION or newer, is installed. -Built-in packages also qualify." + "Return true if PACKAGE, of MIN-VERSION or newer, is installed. +MIN-VERSION should be a version list." (let ((pkg-desc (assq package package-alist))) (if pkg-desc (version-list-<= min-version @@ -717,9 +724,9 @@ PACKAGE-LIST should be a list of package names (symbols). REQUIREMENTS should be a list of additional requirements; each -element in this list should have the form (PACKAGE VERSION), -where PACKAGE is a package name and VERSION is the required -version of that package (as a list). +element in this list should have the form (PACKAGE VERSION-LIST), +where PACKAGE is a package name and VERSION-LIST is the required +version of that package. This function recursively computes the requirements of the packages in REQUIREMENTS, and returns a list of all the packages @@ -890,7 +897,8 @@ [FILENAME REQUIRES DESCRIPTION VERSION COMMENTARY] FILENAME is the file name, a string, sans the \".el\" extension. -REQUIRES is a requires list, or nil. +REQUIRES is a list of requirements, each requirement having the + form (NAME VER); NAME is a string and VER is a version list. DESCRIPTION is the package description, a string. VERSION is the version, a string. COMMENTARY is the commentary section, a string, or nil if none. @@ -1329,8 +1337,8 @@ "Convenience macro for `package-menu--generate'. If the alist stored in the symbol LISTNAME lacks an entry for a package PACKAGE with descriptor DESC, add one. The alist is -keyed with cons cells (PACKAGE . VERSION), where PACKAGE is a -symbol and VERSION is a version list." +keyed with cons cells (PACKAGE . VERSION-LIST), where PACKAGE is +a symbol and VERSION-LIST is a version list." `(let* ((version (package-desc-vers ,desc)) (key (cons ,package version))) (unless (assoc key ,listname) ------------------------------------------------------------ revno: 103970 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2011-04-22 01:01:32 +0000 message: nnimap.el (nnimap-user): New backend variable. (nnimap-open-connection-1): Use it. (nnimap-credentials): Accept user parameter so it's explicit what user name is desired. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-04-22 00:37:01 +0000 +++ lisp/gnus/ChangeLog 2011-04-22 01:01:32 +0000 @@ -1,4 +1,9 @@ -2011-04-21 Teodor Zlatanov +2011-04-22 Teodor Zlatanov + + * nnimap.el (nnimap-user): New backend variable. + (nnimap-open-connection-1): Use it. + (nnimap-credentials): Accept user parameter so it's explicit what user + name is desired. * gnus-sum.el (gnus-extra-headers): Add Keywords, Cc, and Gcc to default. === modified file 'lisp/gnus/nnimap.el' --- lisp/gnus/nnimap.el 2011-04-02 23:41:03 +0000 +++ lisp/gnus/nnimap.el 2011-04-22 01:01:32 +0000 @@ -58,6 +58,9 @@ (defvoo nnimap-address nil "The address of the IMAP server.") +(defvoo nnimap-user nil + "Username to use for authentication to the IMAP server.") + (defvoo nnimap-server-port nil "The IMAP port used. If nnimap-stream is `ssl', this will default to `imaps'. If not, @@ -283,13 +286,14 @@ (push (current-buffer) nnimap-process-buffers) (current-buffer))) -(defun nnimap-credentials (address ports) +(defun nnimap-credentials (address ports user) (let* ((auth-source-creation-prompts '((user . "IMAP user at %h: ") (secret . "IMAP password for %u@%h: "))) (found (nth 0 (auth-source-search :max 1 :host address :port ports + :user user :require '(:user :secret) :create t)))) (if found @@ -408,7 +412,8 @@ (list nnimap-address (nnoo-current-server 'nnimap))) - ports)))) + ports + nnimap-user)))) (setq nnimap-object nil) (let ((nnimap-inhibit-logging t)) (setq login-result ------------------------------------------------------------ revno: 103969 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Fri 2011-04-22 00:37:01 +0000 message: gnus-sum.el (gnus-extra-headers): Add Keywords, Cc, and Gcc to default. gnus-registry.el: Mention in comments how to modify `gnus-extra-headers' for proper recipient tracking and that it may already have To and Cc recently, which it does as of this commit. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-04-21 22:06:12 +0000 +++ lisp/gnus/ChangeLog 2011-04-22 00:37:01 +0000 @@ -1,9 +1,15 @@ 2011-04-21 Teodor Zlatanov + * gnus-sum.el (gnus-extra-headers): Add Keywords, Cc, and Gcc to + default. + * gnus.el (gnus-registry-ignored-groups): Provide default in gnus.el, not gnus-registry.el. - * gnus-registry.el (gnus-registry-ignored-groups): Remove defcustom. + * gnus-registry.el: Mention in comments how to modify + `gnus-extra-headers' for proper recipient tracking and that it may + already have To and Cc recently, which it does as of this commit. + (gnus-registry-ignored-groups): Remove defcustom. Explain why in comments. (gnus-registry-action): Fix data-header reference to use the extra headers. Explain in package commentary how to add To and Cc headers to === modified file 'lisp/gnus/gnus-registry.el' --- lisp/gnus/gnus-registry.el 2011-04-21 22:06:12 +0000 +++ lisp/gnus/gnus-registry.el 2011-04-22 00:37:01 +0000 @@ -35,7 +35,8 @@ ;; If you want to track recipients (and you should to make the ;; gnus-registry splitting work better), you need the To and Cc -;; headers collected by Gnus: +;; headers collected by Gnus. Note that in more recent Gnus versions +;; this is already the case: look at `gnus-extra-headers' to be sure. ;; ;;; you may also want Gcc Newsgroups Keywords X-Face ;; (add-to-list 'gnus-extra-headers 'To) === modified file 'lisp/gnus/gnus-sum.el' --- lisp/gnus/gnus-sum.el 2011-04-12 22:18:02 +0000 +++ lisp/gnus/gnus-sum.el 2011-04-22 00:37:01 +0000 @@ -1128,7 +1128,7 @@ 'mail-decode-encoded-address-string "Function used to decode addresses with encoded words.") -(defcustom gnus-extra-headers '(To Newsgroups) +(defcustom gnus-extra-headers '(To Cc Keywords Gcc Newsgroups) "*Extra headers to parse." :version "21.1" :group 'gnus-summary ------------------------------------------------------------ revno: 103968 author: Teodor Zlatanov committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2011-04-21 22:06:12 +0000 message: gnus.el (gnus-registry-ignored-groups): Provide default in gnus.el, not gnus-registry.el. gnus-registry.el (gnus-registry-ignored-groups): Remove defcustom. Explain why in comments. (gnus-registry-action): Fix data-header reference to use the extra headers. Explain in package commentary how to add To and Cc headers to the gnus-extra-headers. (gnus-registry-ignored-groups): Adjust defaults to match the parameter. (gnus-registry-ignore-group-p): Adjust to take either a group/topic parameter list or a string list in `gnus-registry-ignored-groups'. Fix logic error. diff: === modified file 'lisp/gnus/ChangeLog' --- lisp/gnus/ChangeLog 2011-04-21 02:22:56 +0000 +++ lisp/gnus/ChangeLog 2011-04-21 22:06:12 +0000 @@ -1,3 +1,18 @@ +2011-04-21 Teodor Zlatanov + + * gnus.el (gnus-registry-ignored-groups): Provide default in gnus.el, + not gnus-registry.el. + + * gnus-registry.el (gnus-registry-ignored-groups): Remove defcustom. + Explain why in comments. + (gnus-registry-action): Fix data-header reference to use the extra + headers. Explain in package commentary how to add To and Cc headers to + the gnus-extra-headers. + (gnus-registry-ignored-groups): Adjust defaults to match the parameter. + (gnus-registry-ignore-group-p): Adjust to take either a group/topic + parameter list or a string list in `gnus-registry-ignored-groups'. Fix + logic error. + 2011-04-21 Lars Magne Ingebrigtsen * shr.el (shr-expand-url): Protect against null urls. === modified file 'lisp/gnus/gnus-registry.el' --- lisp/gnus/gnus-registry.el 2011-04-20 22:12:08 +0000 +++ lisp/gnus/gnus-registry.el 2011-04-21 22:06:12 +0000 @@ -31,7 +31,16 @@ ;; gnus-registry.el intercepts article respooling, moving, deleting, ;; and copying for all backends. If it doesn't work correctly for ;; you, submit a bug report and I'll be glad to fix it. It needs -;; documentation in the manual (also on my to-do list). +;; better documentation in the manual (also on my to-do list). + +;; If you want to track recipients (and you should to make the +;; gnus-registry splitting work better), you need the To and Cc +;; headers collected by Gnus: + +;; ;;; you may also want Gcc Newsgroups Keywords X-Face +;; (add-to-list 'gnus-extra-headers 'To) +;; (add-to-list 'gnus-extra-headers 'Cc) +;; (setq nnmail-extra-headers gnus-extra-headers) ;; Put this in your startup file (~/.gnus.el for instance) or use Customize: @@ -137,16 +146,6 @@ :group 'gnus-registry :type '(repeat regexp)) -(defcustom gnus-registry-ignored-groups - '("delayed$" "drafts$" "queue$" "INBOX$" "^nnmairix:" "archive") - "List of groups that the Gnus Registry will ignore. -The group names are matched, they don't have to be fully -qualified. - -nnmairix groups are specifically excluded because they are ephemeral." - :group 'gnus-registry - :type '(repeat regexp)) - (defcustom gnus-registry-install 'ask "Whether the registry should be installed." :group 'gnus-registry @@ -313,9 +312,10 @@ (defun gnus-registry-action (action data-header from &optional to method) (let* ((id (mail-header-id data-header)) (subject (mail-header-subject data-header)) + (extra (mail-header-extra data-header)) (recipients (gnus-registry-sort-addresses - (or (cdr (assq "Cc" data-header)) "") - (or (cdr (assq "To" data-header)) ""))) + (or (cdr-safe (assq 'Cc extra)) "") + (or (cdr-safe (assq 'To extra)) ""))) (sender (nth 0 (gnus-registry-extract-addresses (mail-header-from data-header)))) (from (gnus-group-guess-full-name-from-command-method from)) @@ -333,9 +333,9 @@ (defun gnus-registry-spool-action (id group &optional subject sender recipients) (let ((to (gnus-group-guess-full-name-from-command-method group)) (recipients (or recipients - (gnus-registry-sort-addresses - (or (message-fetch-field "cc") "") - (or (message-fetch-field "to") "")))) + (gnus-registry-sort-addresses + (or (message-fetch-field "cc") "") + (or (message-fetch-field "to") "")))) (subject (or subject (message-fetch-field "subject"))) (sender (or sender (message-fetch-field "from")))) (when (and (stringp id) (string-match "\r$" id)) @@ -414,8 +414,8 @@ (sender (gnus-string-remove-all-properties (message-fetch-field "from"))) (recipients (gnus-registry-sort-addresses - (or (message-fetch-field "cc") "") - (or (message-fetch-field "to") ""))) + (or (message-fetch-field "cc") "") + (or (message-fetch-field "to") ""))) (subject (gnus-string-remove-all-properties (gnus-registry-simplify-subject (message-fetch-field "subject")))) @@ -655,17 +655,28 @@ group nnmail-split-fancy-with-parent-ignore-groups))))) +;; note that gnus-registry-ignored-groups is defined in gnus.el as a +;; group/topic parameter and an associated variable! + +;; we do special logic for ignoring to accept regular expressions and +;; nnmail-split-fancy-with-parent-ignore-groups as well (defun gnus-registry-ignore-group-p (group) "Determines if a group name should be ignored. Consults `gnus-registry-ignored-groups' and `nnmail-split-fancy-with-parent-ignore-groups'." (and group - (not (or (gnus-grep-in-list - group - gnus-registry-ignored-groups) - (gnus-grep-in-list - group - nnmail-split-fancy-with-parent-ignore-groups))))) + (or (gnus-parameter-registry-ignore group) + (gnus-grep-in-list + group + (delq nil (mapcar (lambda (g) + (cond + ((stringp g) g) + ((and (listp g) (nth 1 g)) + (nth 0 g)) + (t nil))) gnus-registry-ignored-groups))) + (gnus-grep-in-list + group + nnmail-split-fancy-with-parent-ignore-groups)))) (defun gnus-registry-wash-for-keywords (&optional force) "Get the keywords of the current article. @@ -738,7 +749,7 @@ (defun gnus-registry-sort-addresses (&rest addresses) "Return a normalized and sorted list of ADDRESSES." (sort (apply 'nconc (mapcar 'gnus-registry-extract-addresses addresses)) - 'string-lessp)) + 'string-lessp)) (defun gnus-registry-simplify-subject (subject) (if (stringp subject) @@ -769,7 +780,7 @@ (assoc article (gnus-data-list nil))) (gnus-string-remove-all-properties (cdr (assq header (gnus-data-header - (assoc article (gnus-data-list nil)))))) + (assoc article (gnus-data-list nil)))))) nil)) ;; registry marks glue @@ -998,7 +1009,7 @@ extra-cell key val) ;; remove all the strings from the entry (dolist (elem rest) - (if (stringp elem) (setq rest (delq elem rest)))) + (if (stringp elem) (setq rest (delq elem rest)))) (gnus-registry-set-id-key id 'group groups) ;; just use the first extra element (setq rest (car-safe rest)) === modified file 'lisp/gnus/gnus.el' --- lisp/gnus/gnus.el 2011-04-15 12:42:51 +0000 +++ lisp/gnus/gnus.el 2011-04-21 22:06:12 +0000 @@ -1875,7 +1875,10 @@ :function-document "Whether this group should be ignored by the registry." :variable gnus-registry-ignored-groups - :variable-default nil + :variable-default (mapcar + (lambda (g) (list g t)) + '("delayed$" "drafts$" "queue$" "INBOX$" + "^nnmairix:" "archive")) :variable-document "*Groups in which the registry should be turned off." :variable-group gnus-registry ------------------------------------------------------------ revno: 103967 committer: Juanma Barranquero branch nick: trunk timestamp: Thu 2011-04-21 14:24:46 +0200 message: lisp/play/*.el: Lexical-binding cleanup. diff: === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-04-20 23:34:00 +0000 +++ lisp/ChangeLog 2011-04-21 12:24:46 +0000 @@ -1,3 +1,51 @@ +2011-04-21 Juanma Barranquero + + Lexical-binding cleanup. + + * play/5x5.el (5x5-make-random-solution, 5x5-make-mutate-current) + (5x5-make-mutate-best): + * play/fortune.el (fortune-in-buffer): + * play/gomoku.el (gomoku-init-display): + * play/solitaire.el (solitaire, solitaire-do-check): + * play/tetris.el (tetris-default-update-speed-function): + Mark unused parameters. + + * play/bubbles.el (bubbles-mode): Set `show-trailing-whitespace'. + (bubbles--shift): Remove unused variable `char-org'. + (bubbles--set-faces): Remove unused variable `fg-col'. Simplify. + (bubbles--show-images): Remove unused variable `char'. + + * play/decipher.el (decipher-keypress, decipher-alphabet-keypress) + (decipher-get-undo, decipher-set-map, decipher-complete-alphabet) + (decipher-resync, decipher-loop-with-breaks, decipher--analyze) + (decipher-analyze-buffer): Use ?\s. + (decipher-make-checkpoint): Remove unused variable `mapping'. + + * play/doctor.el (doctor-doc): Rename parameter DOCTOR-SENT to SENT. + + * play/gamegrid.el (gamegrid-add-score-with-update-game-score): + Remove unused variable `result'; use `let'. + + * play/gametree.el (gametree-current-layout, gametree-apply-layout): + Rename parameter TOP-LEVEL to FROM-TOP-LEVEL; use `ignore-errors'. + (gametree-children-shown-p, gametree-compute-reduced-score): + Use `ignore-errors'. + + * play/handwrite.el (ps-lpr-switches): Declare. + (handwrite): Remove unused variables `pmin' and `lastp'. + + * play/hanoi.el (hanoi-move-ring): Remove unused variable `total-steps'. + + * play/landmark.el (landmark-init-display) + (landmark-update-naught-weights): Mark unused parameters. + (landmark-y): Remove unused variable `noise'. Simplify. + (landmark-human-plays): Remove unused variable `score'. + + * play/mpuz.el (mpuz-try-letter): Remove unused variable `message'. + (mpuz-try-proposal): Remove unused variable `game'. + + * play/zone.el (life-patterns): Declare. + 2011-04-20 Juanma Barranquero * vc/vc.el (ediff-vc-internal): Declare function. === modified file 'lisp/play/5x5.el' --- lisp/play/5x5.el 2011-01-25 04:08:28 +0000 +++ lisp/play/5x5.el 2011-04-21 12:24:46 +0000 @@ -368,15 +368,15 @@ (5x5-copy-grid best-solution))))) (setq 5x5-cracking nil)) -(defun 5x5-make-random-solution (&rest ignore) +(defun 5x5-make-random-solution (&rest _ignore) "Make a random solution." (5x5-make-random-grid)) -(defun 5x5-make-mutate-current (current best) +(defun 5x5-make-mutate-current (current _best) "Mutate the current solution." (5x5-mutate-solution current)) -(defun 5x5-make-mutate-best (current best) +(defun 5x5-make-mutate-best (_current best) "Mutate the best solution." (5x5-mutate-solution best)) === modified file 'lisp/play/bubbles.el' --- lisp/play/bubbles.el 2011-03-15 17:39:56 +0000 +++ lisp/play/bubbles.el 2011-04-21 12:24:46 +0000 @@ -1,4 +1,4 @@ -;;; bubbles.el --- Puzzle game for Emacs. +;;; bubbles.el --- Puzzle game for Emacs ;; Copyright (C) 2007-2011 Free Software Foundation, Inc. @@ -921,7 +921,8 @@ (define-derived-mode bubbles-mode nil "Bubbles" "Major mode for playing bubbles. \\{bubbles-mode-map}" - (setq buffer-read-only t) + (setq buffer-read-only t + show-trailing-whitespace nil) (buffer-disable-undo) (force-mode-line-update) (redisplay) @@ -1317,8 +1318,7 @@ Return t if new char is non-empty." (save-excursion (when (bubbles--goto row col) - (let ((char-org (char-after (point))) - (char-new (bubbles--empty-char)) + (let ((char-new (bubbles--empty-char)) (removed nil) (trow row) (tcol col) @@ -1416,9 +1416,8 @@ (dotimes (i (bubbles--grid-height)) (dotimes (j (bubbles--grid-width)) (bubbles--goto i j) - (let* ((index (get-text-property (point) 'index)) - (face (nth index bubbles--faces)) - (fg-col (face-foreground face))) + (let ((face (nth (get-text-property (point) 'index) + bubbles--faces))) (when (get-text-property (point) 'active) (set-face-foreground 'bubbles--highlight-face "#ff0000") (setq face 'bubbles--highlight-face)) @@ -1434,8 +1433,7 @@ (save-excursion (goto-char (point-min)) (forward-line 1) - (let ((inhibit-read-only t) - char) + (let ((inhibit-read-only t)) (dotimes (i (bubbles--grid-height)) (dotimes (j (bubbles--grid-width)) (forward-char 1) === modified file 'lisp/play/decipher.el' --- lisp/play/decipher.el 2011-01-25 04:08:28 +0000 +++ lisp/play/decipher.el 2011-04-21 12:24:46 +0000 @@ -353,7 +353,7 @@ (let ((char-a (following-char)) (char-b (decipher-last-command-char))) (or (and (not (= ?w (char-syntax char-a))) - (= char-b ?\ )) ;Spacebar just advances on non-letters + (= char-b ?\s)) ;Spacebar just advances on non-letters (funcall decipher-function char-a char-b))))) (forward-char)) @@ -366,10 +366,10 @@ (decipher-set-map a b)) ((and (>= a ?a) (<= a ?z)) ;; If A is lowercase, then it is in the plaintext alphabet: - (if (= b ?\ ) + (if (= b ?\s) ;; We are clearing the association (if any): - (if (/= ?\ (setq b (cdr (assoc a decipher-alphabet)))) - (decipher-set-map b ?\ )) + (if (/= ?\s (setq b (cdr (assoc a decipher-alphabet)))) + (decipher-set-map b ?\s)) ;; Associate the plaintext char with the char pressed: (decipher-set-map b a))) (t @@ -432,12 +432,12 @@ ;; modified using setcdr. (let ((cipher-map (decipher-copy-cons (rassoc cipher-char decipher-alphabet))) (plain-map (decipher-copy-cons (assoc plain-char decipher-alphabet)))) - (cond ((equal ?\ plain-char) + (cond ((equal ?\s plain-char) cipher-map) ((equal cipher-char (cdr plain-map)) nil) ;We aren't changing anything - ((equal ?\ (cdr plain-map)) - (or cipher-map (cons ?\ cipher-char))) + ((equal ?\s (cdr plain-map)) + (or cipher-map (cons ?\s cipher-char))) (cipher-map (list plain-map cipher-map)) (t @@ -466,15 +466,15 @@ (goto-char (point-min)) (if (setq mapping (rassoc cipher-char decipher-alphabet)) (progn - (setcdr mapping ?\ ) + (setcdr mapping ?\s) (search-forward-regexp (concat "^([a-z]*" (char-to-string (car mapping)))) - (decipher-insert ?\ ) + (decipher-insert ?\s) (beginning-of-line))) (if (setq mapping (assoc plain-char decipher-alphabet)) (progn - (if (/= ?\ (cdr mapping)) - (decipher-set-map (cdr mapping) ?\ t)) + (if (/= ?\s (cdr mapping)) + (decipher-set-map (cdr mapping) ?\s t)) (setcdr mapping cipher-char) (search-forward-regexp (concat "^([a-z]*" plain-string)) (decipher-insert cipher-char) @@ -527,8 +527,7 @@ (or (stringp desc) (setq desc "")) (let (alphabet - buffer-read-only ;Make buffer writable - mapping) + buffer-read-only) ;Make buffer writable (goto-char (point-min)) (re-search-forward "^)") (move-to-column 27 t) @@ -585,12 +584,12 @@ buffer-read-only ;Make buffer writable plain-map undo-rec) (while (setq plain-map (pop ptr)) - (if (equal ?\ (cdr plain-map)) + (if (equal ?\s (cdr plain-map)) (progn (while (rassoc cipher-char decipher-alphabet) ;; Find the next unused letter (incf cipher-char)) - (push (cons ?\ cipher-char) undo-rec) + (push (cons ?\s cipher-char) undo-rec) (decipher-set-map cipher-char (car plain-map) t)))) (decipher-add-undo undo-rec))) @@ -624,7 +623,7 @@ (replace-match ">" nil nil)) (decipher-read-alphabet) (while (setq mapping (pop alphabet)) - (or (equal ?\ (cdr mapping)) + (or (equal ?\s (cdr mapping)) (decipher-set-map (cdr mapping) (car mapping)))))) (setq decipher-undo-list nil decipher-undo-list-size 0) @@ -751,8 +750,8 @@ a space. See `decipher-loop-no-breaks' if you do not care about word divisions." - (let ((decipher-char ?\ ) - (decipher--loop-prev-char ?\ )) + (let ((decipher-char ?\s) + (decipher--loop-prev-char ?\s)) (save-excursion (goto-char (point-min)) (funcall func) ;Space marks beginning of first word @@ -760,16 +759,16 @@ (while (not (eolp)) (setq decipher-char (upcase (following-char))) (or (and (>= decipher-char ?A) (<= decipher-char ?Z)) - (setq decipher-char ?\ )) - (or (and (equal decipher-char ?\ ) - (equal decipher--loop-prev-char ?\ )) + (setq decipher-char ?\s)) + (or (and (equal decipher-char ?\s) + (equal decipher--loop-prev-char ?\s)) (funcall func)) (setq decipher--loop-prev-char decipher-char) (forward-char)) - (or (equal decipher-char ?\ ) + (or (equal decipher-char ?\s) (progn (setq decipher-char ?\s - decipher--loop-prev-char ?\ ) + decipher--loop-prev-char ?\s) (funcall func))))))) (defun decipher-loop-no-breaks (func) @@ -844,13 +843,13 @@ decipher--digram-list))))) (and (>= decipher--prev-char ?A) (incf (aref (aref decipher--before (- decipher--prev-char ?A)) - (if (equal decipher-char ?\ ) + (if (equal decipher-char ?\s) 26 (- decipher-char ?A))))) (and (>= decipher-char ?A) (incf (aref decipher--freqs (- decipher-char ?A))) (incf (aref (aref decipher--after (- decipher-char ?A)) - (if (equal decipher--prev-char ?\ ) + (if (equal decipher--prev-char ?\s) 26 (- decipher--prev-char ?A))))) (setq decipher--prev-char decipher-char)) @@ -883,7 +882,7 @@ (defun decipher-analyze-buffer () "Perform frequency analysis and store results in statistics buffer. Creates the statistics buffer if it doesn't exist." - (let ((decipher--prev-char (if decipher-ignore-spaces ?\ ?\*)) + (let ((decipher--prev-char (if decipher-ignore-spaces ?\s ?\*)) (decipher--before (make-vector 26 nil)) (decipher--after (make-vector 26 nil)) (decipher--freqs (make-vector 26 0)) @@ -1057,7 +1056,7 @@ ;; (setq undo-rec (list undo-rec))) ;; (insert ?\() ;; (while (setq undo-map (pop undo-rec)) -;; (insert (cdr undo-map) (car undo-map) ?\ )) +;; (insert (cdr undo-map) (car undo-map) ?\s)) ;; (delete-char -1) ;; (insert ")\n")))))) === modified file 'lisp/play/doctor.el' --- lisp/play/doctor.el 2011-02-16 16:55:21 +0000 +++ lisp/play/doctor.el 2011-04-21 12:24:46 +0000 @@ -268,7 +268,7 @@ (you seem to dwell on (doc// doctor-owner) family \.) ((doc$ doctor--areyou) hung up on (doc// doctor-owner) family \?))) (set (make-local-variable 'doctor--huhlst) - '(((doc$ doctor--whysay)(doc// doctor-sent) \?) + '(((doc$ doctor--whysay) (doc// doctor-sent) \?) (is it because of (doc$ doctor--things) that you say (doc// doctor-sent) \?))) (set (make-local-variable 'doctor--longhuhlst) '(((doc$ doctor--whysay) that \?) @@ -371,8 +371,8 @@ (did you watch a lot of crime and violence on television as a child \?))) (set (make-local-variable 'doctor--sexlst) '(((doc$ doctor--areyou) (doc$ doctor--afraidof) sex \?) - ((doc$ doctor--describe)(doc$ doctor--something) about your sexual history \.) - ((doc$ doctor--please)(doc$ doctor--describe) your sex life \.\.\.) + ((doc$ doctor--describe) (doc$ doctor--something) about your sexual history \.) + ((doc$ doctor--please) (doc$ doctor--describe) your sex life \.\.\.) ((doc$ doctor--describe) your (doc$ doctor--feelings-about) your sexual partner \.) ((doc$ doctor--describe) your most (doc$ doctor--random-adjective) sexual experience \.) ((doc$ doctor--areyou) satisfied with (doc// doctor--lover) \.\.\. \?))) @@ -384,11 +384,11 @@ ((doc$ doctor--bother) i ask that \?))) (set (make-local-variable 'doctor--beclst) '((is it because (doc// doctor-sent) that you came to me \?) - ((doc$ doctor--bother)(doc// doctor-sent) \?) + ((doc$ doctor--bother) (doc// doctor-sent) \?) (when did you first know that (doc// doctor-sent) \?) (is the fact that (doc// doctor-sent) the real reason \?) (does the fact that (doc// doctor-sent) explain anything else \?) - ((doc$ doctor--areyou)(doc$ doctor--sure)(doc// doctor-sent) \? ))) + ((doc$ doctor--areyou) (doc$ doctor--sure) (doc// doctor-sent) \? ))) (set (make-local-variable 'doctor--shortbeclst) '(((doc$ doctor--bother) i ask you that \?) (that\'s not much of an answer!) @@ -398,15 +398,15 @@ (don\'t be (doc$ doctor--afraidof) elaborating \.) ((doc$ doctor--please) go into more detail \.))) (set (make-local-variable 'doctor--thlst) - '(((doc$ doctor--maybe)(doc$ doctor--thing)(doc$ doctor--isrelated) this \.) - ((doc$ doctor--maybe)(doc$ doctor--things)(doc$ doctor--arerelated) this \.) + '(((doc$ doctor--maybe) (doc$ doctor--thing) (doc$ doctor--isrelated) this \.) + ((doc$ doctor--maybe) (doc$ doctor--things) (doc$ doctor--arerelated) this \.) (is it because of (doc$ doctor--things) that you are going through all this \?) (how do you reconcile (doc$ doctor--things) \? ) - ((doc$ doctor--maybe) this (doc$ doctor--isrelated)(doc$ doctor--things) \?))) + ((doc$ doctor--maybe) this (doc$ doctor--isrelated) (doc$ doctor--things) \?))) (set (make-local-variable 'doctor--remlst) '((earlier you said (doc$ doctor--history) \?) (you mentioned that (doc$ doctor--history) \?) - ((doc$ doctor--whysay)(doc$ doctor--history) \? ))) + ((doc$ doctor--whysay) (doc$ doctor--history) \? ))) (set (make-local-variable 'doctor--toklst) '((is this how you relax \?) (how long have you been smoking grass \?) @@ -415,7 +415,7 @@ '((do you get (doc// doctor-found) often \?) (do you enjoy being (doc// doctor-found) \?) (what makes you (doc// doctor-found) \?) - (how often (doc$ doctor--areyou)(doc// doctor-found) \?) + (how often (doc$ doctor--areyou) (doc// doctor-found) \?) (when were you last (doc// doctor-found) \?))) (set (make-local-variable 'doctor--replist) '((i . (you)) (my . (your)) @@ -859,25 +859,25 @@ ;; Main processing function for sentences that have been read. -(defun doctor-doc (doctor-sent) +(defun doctor-doc (sent) (cond - ((equal doctor-sent '(foo)) - (doctor-type '(bar! (doc$ doctor--please)(doc$ doctor--continue) \.))) - ((member doctor-sent doctor--howareyoulst) + ((equal sent '(foo)) + (doctor-type '(bar! (doc$ doctor--please) (doc$ doctor--continue) \.))) + ((member sent doctor--howareyoulst) (doctor-type '(i\'m ok \. (doc$ doctor--describe) yourself \.))) - ((or (member doctor-sent '((good bye) (see you later) (i quit) (so long) + ((or (member sent '((good bye) (see you later) (i quit) (so long) (go away) (get lost))) - (memq (car doctor-sent) + (memq (car sent) '(bye halt break quit done exit goodbye bye\, stop pause goodbye\, stop pause))) (doctor-type (doc$ doctor--bye))) - ((and (eq (car doctor-sent) 'you) - (memq (cadr doctor-sent) doctor--abusewords)) - (setq doctor-found (cadr doctor-sent)) + ((and (eq (car sent) 'you) + (memq (cadr sent) doctor--abusewords)) + (setq doctor-found (cadr sent)) (doctor-type (doc$ doctor--abuselst))) - ((eq (car doctor-sent) 'whatmeans) - (doctor-def (cadr doctor-sent))) - ((equal doctor-sent '(parse)) + ((eq (car sent) 'whatmeans) + (doctor-def (cadr sent))) + ((equal sent '(parse)) (doctor-type (list 'subj '= doctor-subj ", " 'verb '= doctor-verb "\n" 'object 'phrase '= doctor-obj "," @@ -889,29 +889,29 @@ 'sentence 'used 'was "..." '(doc// doctor--bak)))) - ((memq (car doctor-sent) '(are is do has have how when where who why)) + ((memq (car sent) '(are is do has have how when where who why)) (doctor-type (doc$ doctor--qlist))) - ;; ((eq (car doctor-sent) 'forget) - ;; (set (cadr doctor-sent) nil) - ;; (doctor-type '((doc$ doctor--isee)(doc$ doctor--please) + ;; ((eq (car sent) 'forget) + ;; (set (cadr sent) nil) + ;; (doctor-type '((doc$ doctor--isee) (doc$ doctor--please) ;; (doc$ doctor--continue)\.))) (t - (if (doctor-defq doctor-sent) (doctor-define doctor-sent doctor-found)) - (if (> (length doctor-sent) 12)(setq doctor-sent (doctor-shorten doctor-sent))) - (setq doctor-sent (doctor-correct-spelling (doctor-replace doctor-sent doctor--replist))) - (cond ((and (not (memq 'me doctor-sent))(not (memq 'i doctor-sent)) - (memq 'am doctor-sent)) - (setq doctor-sent (doctor-replace doctor-sent '((am . (are))))))) - (cond ((equal (car doctor-sent) 'yow) (doctor-zippy)) - ((< (length doctor-sent) 2) - (cond ((eq (doctor-meaning (car doctor-sent)) 'howdy) + (if (doctor-defq sent) (doctor-define sent doctor-found)) + (if (> (length sent) 12) (setq sent (doctor-shorten sent))) + (setq sent (doctor-correct-spelling (doctor-replace sent doctor--replist))) + (cond ((and (not (memq 'me sent)) (not (memq 'i sent)) + (memq 'am sent)) + (setq sent (doctor-replace sent '((am . (are))))))) + (cond ((equal (car sent) 'yow) (doctor-zippy)) + ((< (length sent) 2) + (cond ((eq (doctor-meaning (car sent)) 'howdy) (doctor-howdy)) (t (doctor-short)))) (t - (if (memq 'am doctor-sent) - (setq doctor-sent (doctor-replace doctor-sent '((me . (i)))))) - (setq doctor-sent (doctor-fixup doctor-sent)) - (if (and (eq (car doctor-sent) 'do) (eq (cadr doctor-sent) 'not)) + (if (memq 'am sent) + (setq sent (doctor-replace sent '((me . (i)))))) + (setq sent (doctor-fixup sent)) + (if (and (eq (car sent) 'do) (eq (cadr sent) 'not)) (cond ((zerop (random 3)) (doctor-type '(are you (doc$ doctor--afraidof) that \?))) ((zerop (random 2)) @@ -920,9 +920,9 @@ (doctor-rthing)) (t (doctor-type '((doc$ doctor--whysay) that i shouldn\'t - (cddr doctor-sent) + (cddr sent) \?)))) - (doctor-go (doctor-wherego doctor-sent)))))))) + (doctor-go (doctor-wherego sent)))))))) ;; Things done to process sentences once read. @@ -1130,8 +1130,8 @@ (t 'something)))) (defun doctor-getnoun (x) - (cond ((null x)(setq doctor-object 'something)) - ((atom x)(setq doctor-object x)) + (cond ((null x) (setq doctor-object 'something)) + ((atom x) (setq doctor-object x)) ((eq (length x) 1) (setq doctor-object (cond ((doctor-nounp (setq doctor-object (car x))) doctor-object) @@ -1304,7 +1304,7 @@ sent))) (defun doctor-wherego (sent) - (cond ((null sent)(doc$ doctor--whereoutp)) + (cond ((null sent) (doc$ doctor--whereoutp)) ((null (doctor-meaning (car sent))) (doctor-wherego (cond ((zerop (random 2)) (reverse (cdr sent))) @@ -1327,8 +1327,8 @@ (setq foo (cdr foo))) (setq doctor-verb (car foo)) (setq doctor-obj (doctor-getnoun (cdr foo))) - (cond ((eq doctor-object 'i)(setq doctor-object 'me)) - ((eq doctor-subj 'me)(setq doctor-subj 'i))) + (cond ((eq doctor-object 'i) (setq doctor-object 'me)) + ((eq doctor-subj 'me) (setq doctor-subj 'i))) (cond (mem (doctor-remember (list doctor-subj doctor-verb doctor-obj)))))) (defun doctor-possess (sent key) @@ -1414,7 +1414,7 @@ (defun doctor-rthing () (doctor-type (doc$ doctor--thlst))) -(defun doctor-remem () (cond ((null doctor--history)(doctor-huh)) +(defun doctor-remem () (cond ((null doctor--history) (doctor-huh)) ((doctor-type (doc$ doctor--remlst))))) (defun doctor-howdy () @@ -1426,14 +1426,14 @@ (doctor-type '((doc$ doctor--please) (doc$ doctor--describe) (doc$ doctor--things) \.))))) (defun doctor-when () - (cond ((< (length (memq doctor-found doctor-sent)) 3)(doctor-short)) + (cond ((< (length (memq doctor-found doctor-sent)) 3) (doctor-short)) (t (setq doctor-sent (cdr (memq doctor-found doctor-sent))) (setq doctor-sent (doctor-fixup doctor-sent)) - (doctor-type '((doc$ doctor--whatwhen)(doc// doctor-sent) \?))))) + (doctor-type '((doc$ doctor--whatwhen) (doc// doctor-sent) \?))))) (defun doctor-conj () - (cond ((< (length (memq doctor-found doctor-sent)) 4)(doctor-short)) + (cond ((< (length (memq doctor-found doctor-sent)) 4) (doctor-short)) (t (setq doctor-sent (cdr (memq doctor-found doctor-sent))) (setq doctor-sent (doctor-fixup doctor-sent)) @@ -1497,10 +1497,10 @@ (doctor-type (doc$ doctor--toklst))) (defun doctor-state () - (doctor-type (doc$ doctor--states))(doctor-remember (list 'you 'were doctor-found))) + (doctor-type (doc$ doctor--states)) (doctor-remember (list 'you 'were doctor-found))) (defun doctor-mood () - (doctor-type (doc$ doctor--moods))(doctor-remember (list 'you 'felt doctor-found))) + (doctor-type (doc$ doctor--moods)) (doctor-remember (list 'you 'felt doctor-found))) (defun doctor-fear () (setq doctor--feared (doctor-setprep doctor-sent doctor-found)) @@ -1511,8 +1511,8 @@ (doctor-svo doctor-sent doctor-found 1 t) (cond ((memq 'not doctor-sent) (doctor-forget) (doctor-huh)) ((equal doctor-subj 'you) - (doctor-type '(why do you (doc// doctor-verb)(doc// doctor-obj) \?))) - (t (doctor-type '((doc$ doctor--whysay)(list doctor-subj doctor-verb doctor-obj)))))) + (doctor-type '(why do you (doc// doctor-verb) (doc// doctor-obj) \?))) + (t (doctor-type '((doc$ doctor--whysay) (list doctor-subj doctor-verb doctor-obj)))))) (defun doctor-symptoms () (doctor-type '((doc$ doctor--maybe) you should consult a medical doctor\; @@ -1523,14 +1523,14 @@ (doctor-hates1)) (defun doctor-hates1 () - (doctor-type '((doc$ doctor--whysay)(list doctor-subj doctor-verb doctor-obj) \?))) + (doctor-type '((doc$ doctor--whysay) (list doctor-subj doctor-verb doctor-obj) \?))) (defun doctor-loves () (doctor-svo doctor-sent doctor-found 1 t) (doctor-qloves)) (defun doctor-qloves () - (doctor-type '((doc$ doctor--bother)(list doctor-subj doctor-verb doctor-obj) \?))) + (doctor-type '((doc$ doctor--bother) (list doctor-subj doctor-verb doctor-obj) \?))) (defun doctor-love () (doctor-svo doctor-sent doctor-found 1 t) @@ -1564,7 +1564,7 @@ (defun doctor-sexnoun () (doctor-sexverb)) (defun doctor-sexverb () - (if (or (memq 'me doctor-sent)(memq 'myself doctor-sent)(memq 'i doctor-sent)) + (if (or (memq 'me doctor-sent) (memq 'myself doctor-sent) (memq 'i doctor-sent)) (doctor-foul) (doctor-type (doc$ doctor--sexlst)))) === modified file 'lisp/play/fortune.el' --- lisp/play/fortune.el 2011-01-25 04:08:28 +0000 +++ lisp/play/fortune.el 2011-04-21 12:24:46 +0000 @@ -282,7 +282,7 @@ ;;; ************** ;;; Display fortune -(defun fortune-in-buffer (interactive &optional file) +(defun fortune-in-buffer (_interactive &optional file) "Put a fortune cookie in the *fortune* buffer. INTERACTIVE is ignored. Optional argument FILE, when supplied, specifies the file to choose the fortune from." === modified file 'lisp/play/gamegrid.el' --- lisp/play/gamegrid.el 2011-03-15 17:39:56 +0000 +++ lisp/play/gamegrid.el 2011-04-21 12:24:46 +0000 @@ -485,12 +485,11 @@ (defvar gamegrid-shared-game-dir) (defun gamegrid-add-score-with-update-game-score (file score) - (let* ((result nil) ;; What is this good for? -- os - (gamegrid-shared-game-dir - (not (zerop (logand (file-modes - (expand-file-name "update-game-score" - exec-directory)) - #o4000))))) + (let ((gamegrid-shared-game-dir + (not (zerop (logand (file-modes + (expand-file-name "update-game-score" + exec-directory)) + #o4000))))) (cond ((file-name-absolute-p file) (gamegrid-add-score-insecure file score)) ((and gamegrid-shared-game-dir === modified file 'lisp/play/gametree.el' --- lisp/play/gametree.el 2011-02-10 16:56:00 +0000 +++ lisp/play/gametree.el 2011-04-21 12:24:46 +0000 @@ -258,23 +258,20 @@ (defun gametree-children-shown-p () (save-excursion - (condition-case nil + (ignore-errors (let ((depth (gametree-current-branch-depth))) (outline-next-visible-heading 1) - (< depth (gametree-current-branch-depth))) - (error nil)))) + (< depth (gametree-current-branch-depth)))))) -(defun gametree-current-layout (depth &optional top-level) +(defun gametree-current-layout (depth &optional from-top-level) (let ((layout nil) (first-time t)) (while (save-excursion - (condition-case nil - (progn - (or (and first-time top-level - (bolp) (looking-at outline-regexp)) - (setq first-time nil) - (outline-next-visible-heading 1)) - (< depth (gametree-current-branch-depth))) - (error nil))) + (ignore-errors + (or (and first-time from-top-level + (bolp) (looking-at outline-regexp)) + (setq first-time nil) + (outline-next-visible-heading 1)) + (< depth (gametree-current-branch-depth)))) (if (not first-time) (outline-next-visible-heading 1)) (setq first-time nil) @@ -297,18 +294,16 @@ (goto-char (point-min)) (setq gametree-local-layout (gametree-current-layout 0 t)))) -(defun gametree-apply-layout (layout depth &optional top-level) +(defun gametree-apply-layout (layout depth &optional from-top-level) (let ((first-time t)) (while (and layout (save-excursion - (condition-case nil - (progn - (or (and first-time top-level - (bolp) (looking-at outline-regexp)) - (setq first-time nil) - (outline-next-visible-heading 1)) - (< depth (gametree-current-branch-depth))) - (error nil)))) + (ignore-errors + (or (and first-time from-top-level + (bolp) (looking-at outline-regexp)) + (setq first-time nil) + (outline-next-visible-heading 1)) + (< depth (gametree-current-branch-depth))))) (if (not first-time) (outline-next-visible-heading 1)) (setq first-time nil) @@ -375,9 +370,7 @@ (while (not done) ;handle subheadings (setq running (funcall minmax running (gametree-compute-reduced-score))) - (setq done (condition-case nil - (outline-forward-same-level 1) - (error nil))))) + (setq done (ignore-errors (outline-forward-same-level 1))))) running))))) ;;;; Commands === modified file 'lisp/play/gomoku.el' --- lisp/play/gomoku.el 2011-01-25 04:08:28 +0000 +++ lisp/play/gomoku.el 2011-04-21 12:24:46 +0000 @@ -1043,11 +1043,11 @@ (insert-char ?\n gomoku-square-height)) (or (eq (char-after 1) ?.) (put-text-property 1 2 'point-entered - (lambda (x y) (if (bobp) (forward-char))))) + (lambda (_x _y) (if (bobp) (forward-char))))) (or intangible (put-text-property point (point) 'intangible 2)) (put-text-property point (point) 'point-entered - (lambda (x y) (if (eobp) (backward-char)))) + (lambda (_x _y) (if (eobp) (backward-char)))) (put-text-property (point-min) (point) 'category 'gomoku-mode)) (gomoku-goto-xy (/ (1+ n) 2) (/ (1+ m) 2)) ; center of the board (sit-for 0)) ; Display NOW === modified file 'lisp/play/handwrite.el' --- lisp/play/handwrite.el 2011-02-10 16:56:00 +0000 +++ lisp/play/handwrite.el 2011-04-21 12:24:46 +0000 @@ -67,8 +67,10 @@ ;;; Code: +;; From ps-print.el (defvar ps-printer-name) (defvar ps-lpr-command) +(defvar ps-lpr-switches) ;; Variables @@ -157,8 +159,7 @@ `handwrite-pagenumbering' (default nil)" (interactive) (let - ((pmin) ; thanks, Havard - (lastp) + (;(pmin) ; thanks, Havard (cur-buf (current-buffer)) (tpoint (point)) (ps-ypos 63) === modified file 'lisp/play/hanoi.el' --- lisp/play/hanoi.el 2011-01-15 23:16:57 +0000 +++ lisp/play/hanoi.el 2011-04-21 12:24:46 +0000 @@ -355,7 +355,6 @@ (fly-steps (abs (/ (- (cdr to) (cdr from)) fly-step))) (directed-fly-step (/ (- (cdr to) (cdr from)) fly-steps)) (baseward-steps (/ (- (car to) (cdr to)) baseward-step)) - (total-steps (+ flyward-steps fly-steps baseward-steps)) ;; A step is a character cell. A tick is a time-unit. To ;; make horizontal and vertical motion appear roughly the ;; same speed, we allow one tick per horizontal step and two === modified file 'lisp/play/landmark.el' --- lisp/play/landmark.el 2011-01-25 04:08:28 +0000 +++ lisp/play/landmark.el 2011-04-21 12:24:46 +0000 @@ -943,11 +943,11 @@ (insert-char ?\n landmark-square-height)) (or (eq (char-after 1) ?.) (put-text-property 1 2 'point-entered - (lambda (x y) (if (bobp) (forward-char))))) + (lambda (_x _y) (if (bobp) (forward-char))))) (or intangible (put-text-property point (point) 'intangible 2)) (put-text-property point (point) 'point-entered - (lambda (x y) (if (eobp) (backward-char)))) + (lambda (_x _y) (if (eobp) (backward-char)))) (put-text-property (point-min) (point) 'category 'landmark-mode)) (landmark-goto-xy (/ (1+ n) 2) (/ (1+ m) 2)) ; center of the board (sit-for 0)) ; Display NOW @@ -1377,11 +1377,11 @@ (t x))) (defun landmark-y (direction) - (let ((noise (put direction 'noise (landmark-noise)))) - (put direction 'y_t - (if (> (get direction 's) 0.0) - 1.0 - 0.0)))) + (put direction 'noise (landmark-noise)) + (put direction 'y_t + (if (> (get direction 's) 0.0) + 1.0 + 0.0))) (defun landmark-update-normal-weights (direction) (mapc (lambda (target-direction) @@ -1395,7 +1395,7 @@ landmark-directions)) (defun landmark-update-naught-weights (direction) - (mapc (lambda (target-direction) + (mapc (lambda (_target-direction) (put direction 'w0 (landmark-f (+ @@ -1513,7 +1513,7 @@ ((not landmark-game-in-progress) (landmark-prompt-for-other-game)) (t - (let (square score) + (let (square) (setq square (landmark-point-square)) (cond ((null square) (error "Your point is not on a square. Retry!")) === modified file 'lisp/play/mpuz.el' --- lisp/play/mpuz.el 2011-01-25 04:08:28 +0000 +++ lisp/play/mpuz.el 2011-04-21 12:24:46 +0000 @@ -425,7 +425,7 @@ "Propose a digit for a letter in puzzle." (interactive) (if mpuz-in-progress - (let (letter-char digit digit-char message) + (let (letter-char digit digit-char) (setq letter-char (upcase last-command-event) digit (mpuz-to-digit (- letter-char ?A))) (cond ((mpuz-digit-solved-p digit) @@ -454,8 +454,7 @@ "Propose LETTER-CHAR as code for DIGIT-CHAR." (let* ((letter (- letter-char ?A)) (digit (- digit-char ?0)) - (correct-digit (mpuz-to-digit letter)) - (game mpuz-nb-completed-games)) + (correct-digit (mpuz-to-digit letter))) (cond ((mpuz-digit-solved-p correct-digit) (message "%c has already been found." (+ correct-digit ?0))) ((mpuz-digit-solved-p digit) === modified file 'lisp/play/solitaire.el' --- lisp/play/solitaire.el 2011-02-18 22:52:58 +0000 +++ lisp/play/solitaire.el 2011-04-21 12:24:46 +0000 @@ -126,7 +126,7 @@ '(solitaire-left solitaire-right solitaire-up solitaire-down)) ;;;###autoload -(defun solitaire (arg) +(defun solitaire (_arg) "Play Solitaire. To play Solitaire, type \\[solitaire]. @@ -393,7 +393,7 @@ solitaire-valid-directions))) count)))) -(defun solitaire-do-check (&optional arg) +(defun solitaire-do-check (&optional _arg) "Check for any possible moves in Solitaire." (interactive "P") (let ((moves (solitaire-check))) === modified file 'lisp/play/tetris.el' --- lisp/play/tetris.el 2011-01-25 04:08:28 +0000 +++ lisp/play/tetris.el 2011-04-21 12:24:46 +0000 @@ -193,32 +193,32 @@ ;; ;;;;;;;;;;;;; constants ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defconst tetris-shapes - [[[[0 0] [1 0] [0 1] [1 1]]] - - [[[0 0] [1 0] [2 0] [2 1]] - [[1 -1] [1 0] [1 1] [0 1]] - [[0 -1] [0 0] [1 0] [2 0]] - [[1 -1] [2 -1] [1 0] [1 1]]] - - [[[0 0] [1 0] [2 0] [0 1]] - [[0 -1] [1 -1] [1 0] [1 1]] - [[2 -1] [0 0] [1 0] [2 0]] - [[1 -1] [1 0] [1 1] [2 1]]] - - [[[0 0] [1 0] [1 1] [2 1]] + [[[[0 0] [1 0] [0 1] [1 1]]] + + [[[0 0] [1 0] [2 0] [2 1]] + [[1 -1] [1 0] [1 1] [0 1]] + [[0 -1] [0 0] [1 0] [2 0]] + [[1 -1] [2 -1] [1 0] [1 1]]] + + [[[0 0] [1 0] [2 0] [0 1]] + [[0 -1] [1 -1] [1 0] [1 1]] + [[2 -1] [0 0] [1 0] [2 0]] + [[1 -1] [1 0] [1 1] [2 1]]] + + [[[0 0] [1 0] [1 1] [2 1]] [[1 0] [0 1] [1 1] [0 2]]] - - [[[1 0] [2 0] [0 1] [1 1]] - [[0 0] [0 1] [1 1] [1 2]]] - - [[[1 0] [0 1] [1 1] [2 1]] - [[1 0] [1 1] [2 1] [1 2]] - [[0 1] [1 1] [2 1] [1 2]] + + [[[1 0] [2 0] [0 1] [1 1]] + [[0 0] [0 1] [1 1] [1 2]]] + + [[[1 0] [0 1] [1 1] [2 1]] + [[1 0] [1 1] [2 1] [1 2]] + [[0 1] [1 1] [2 1] [1 2]] [[1 0] [0 1] [1 1] [1 2]]] - + [[[0 0] [1 0] [2 0] [3 0]] [[1 -1] [1 0] [1 1] [1 2]]]] - "Each shape is described by a vector that contains the coordinates of + "Each shape is described by a vector that contains the coordinates of each one of its four blocks.") ;;the scoring rules were taken from "xtetris". Blocks score differently @@ -236,7 +236,7 @@ (defconst tetris-space 9) -(defun tetris-default-update-speed-function (shapes rows) +(defun tetris-default-update-speed-function (_shapes rows) (/ 20.0 (+ 50.0 rows))) ;; ;;;;;;;;;;;;; variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -380,10 +380,10 @@ (loop for i from 0 to 3 do (let ((c (tetris-get-shape-cell i))) (gamegrid-set-cell (+ tetris-top-left-x - tetris-pos-x + tetris-pos-x (aref c 0)) (+ tetris-top-left-y - tetris-pos-y + tetris-pos-y (aref c 1)) tetris-blank)))) @@ -393,14 +393,14 @@ (unless hit (setq hit (let* ((c (tetris-get-shape-cell i)) - (xx (+ tetris-pos-x + (xx (+ tetris-pos-x (aref c 0))) - (yy (+ tetris-pos-y + (yy (+ tetris-pos-y (aref c 1)))) (or (>= xx tetris-width) (>= yy tetris-height) - (/= (gamegrid-get-cell - (+ xx tetris-top-left-x) + (/= (gamegrid-get-cell + (+ xx tetris-top-left-x) (+ yy tetris-top-left-y)) tetris-blank)))))) hit)) @@ -537,10 +537,10 @@ (interactive) (unless tetris-paused (tetris-erase-shape) - (setq tetris-rot (% (+ 1 tetris-rot) + (setq tetris-rot (% (+ 1 tetris-rot) (tetris-shape-rotations))) (if (tetris-test-shape) - (setq tetris-rot (% (+ 3 tetris-rot) + (setq tetris-rot (% (+ 3 tetris-rot) (tetris-shape-rotations)))) (tetris-draw-shape))) === modified file 'lisp/play/zone.el' --- lisp/play/zone.el 2011-01-25 04:08:28 +0000 +++ lisp/play/zone.el 2011-04-21 12:24:46 +0000 @@ -626,6 +626,8 @@ "*Seconds to wait between successive `life' generations. If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") +(defvar life-patterns) ; from life.el + (defun zone-pgm-random-life () (require 'life) (zone-fill-out-screen (1- (window-width)) (1- (window-height))) ------------------------------------------------------------ revno: 103966 committer: Katsumi Yamaoka branch nick: trunk timestamp: Thu 2011-04-21 02:48:04 +0000 message: shr.el (shr-expand-url): Fix typo. diff: === modified file 'lisp/gnus/shr.el' --- lisp/gnus/shr.el 2011-04-21 02:22:56 +0000 +++ lisp/gnus/shr.el 2011-04-21 02:48:04 +0000 @@ -402,7 +402,7 @@ (not shr-base)) url) ((and (not (string-match "/\\'" shr-base)) - (not (string-match "\\`" url))) + (not (string-match "\\`/" url))) (concat shr-base "/" url)) (t (concat shr-base url))))