diff options
| author | Stefan Monnier | 2000-08-16 21:05:37 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-08-16 21:05:37 +0000 |
| commit | c0df1972b22ef1521ee8f25e33bfc7dc7ab1ad78 (patch) | |
| tree | 2cb3ae72b30f167b0e79c36c195545d5f02cabf7 | |
| parent | 7382bcae29e08faa99ef275d83cd4cb31aace60a (diff) | |
| download | emacs-c0df1972b22ef1521ee8f25e33bfc7dc7ab1ad78.tar.gz emacs-c0df1972b22ef1521ee8f25e33bfc7dc7ab1ad78.zip | |
Don't quote lambda.
| -rw-r--r-- | lisp/mail/mailabbrev.el | 8 | ||||
| -rw-r--r-- | lisp/play/landmark.el | 56 | ||||
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 4 |
3 files changed, 33 insertions, 35 deletions
diff --git a/lisp/mail/mailabbrev.el b/lisp/mail/mailabbrev.el index 54967bc7b8a..6c08d5ca411 100644 --- a/lisp/mail/mailabbrev.el +++ b/lisp/mail/mailabbrev.el | |||
| @@ -110,7 +110,7 @@ | |||
| 110 | ;; | 110 | ;; |
| 111 | ;; (add-hook | 111 | ;; (add-hook |
| 112 | ;; 'mail-setup-hook | 112 | ;; 'mail-setup-hook |
| 113 | ;; '(lambda () | 113 | ;; (lambda () |
| 114 | ;; (substitute-key-definition 'next-line 'mail-abbrev-next-line | 114 | ;; (substitute-key-definition 'next-line 'mail-abbrev-next-line |
| 115 | ;; mail-mode-map global-map) | 115 | ;; mail-mode-map global-map) |
| 116 | ;; (substitute-key-definition 'end-of-buffer 'mail-abbrev-end-of-buffer | 116 | ;; (substitute-key-definition 'end-of-buffer 'mail-abbrev-end-of-buffer |
| @@ -139,9 +139,9 @@ | |||
| 139 | :type 'boolean | 139 | :type 'boolean |
| 140 | :group 'mail-abbrev | 140 | :group 'mail-abbrev |
| 141 | :require 'mailabbrev | 141 | :require 'mailabbrev |
| 142 | :set '(lambda (symbol value) | 142 | :set (lambda (symbol value) |
| 143 | (setq mail-abbrevs-mode value) | 143 | (setq mail-abbrevs-mode value) |
| 144 | (if value (mail-abbrevs-enable) (mail-abbrevs-disable))) | 144 | (if value (mail-abbrevs-enable) (mail-abbrevs-disable))) |
| 145 | :initialize 'custom-initialize-default | 145 | :initialize 'custom-initialize-default |
| 146 | :version "20.3") | 146 | :version "20.3") |
| 147 | 147 | ||
diff --git a/lisp/play/landmark.el b/lisp/play/landmark.el index 15cab857177..a560b026193 100644 --- a/lisp/play/landmark.el +++ b/lisp/play/landmark.el | |||
| @@ -60,7 +60,7 @@ | |||
| 60 | ;;; concise problem description. | 60 | ;;; concise problem description. |
| 61 | 61 | ||
| 62 | ;;;_* Require | 62 | ;;;_* Require |
| 63 | (require 'cl) | 63 | (eval-when-compile (require 'cl)) |
| 64 | 64 | ||
| 65 | ;;;_* From Gomoku | 65 | ;;;_* From Gomoku |
| 66 | 66 | ||
| @@ -1153,7 +1153,7 @@ because it is overwritten by \"One moment please\"." | |||
| 1153 | ;;(setq direction 'lm-n) | 1153 | ;;(setq direction 'lm-n) |
| 1154 | ;;(get 'lm-n 'lm-s) | 1154 | ;;(get 'lm-n 'lm-s) |
| 1155 | (defun lm-nslify-wts-int (direction) | 1155 | (defun lm-nslify-wts-int (direction) |
| 1156 | (mapcar '(lambda (target-direction) | 1156 | (mapcar (lambda (target-direction) |
| 1157 | (get direction target-direction)) | 1157 | (get direction target-direction)) |
| 1158 | lm-directions)) | 1158 | lm-directions)) |
| 1159 | 1159 | ||
| @@ -1166,7 +1166,7 @@ because it is overwritten by \"One moment please\"." | |||
| 1166 | (eval (cons 'max l)) (eval (cons 'min l)))))) | 1166 | (eval (cons 'max l)) (eval (cons 'min l)))))) |
| 1167 | 1167 | ||
| 1168 | (defun lm-print-wts-int (direction) | 1168 | (defun lm-print-wts-int (direction) |
| 1169 | (mapc '(lambda (target-direction) | 1169 | (mapc (lambda (target-direction) |
| 1170 | (insert (format "%S %S %S " | 1170 | (insert (format "%S %S %S " |
| 1171 | direction | 1171 | direction |
| 1172 | target-direction | 1172 | target-direction |
| @@ -1233,14 +1233,14 @@ because it is overwritten by \"One moment please\"." | |||
| 1233 | (set-buffer "*lm-blackbox*") | 1233 | (set-buffer "*lm-blackbox*") |
| 1234 | (insert "==============================\n") | 1234 | (insert "==============================\n") |
| 1235 | (insert "I smell: ") | 1235 | (insert "I smell: ") |
| 1236 | (mapc '(lambda (direction) | 1236 | (mapc (lambda (direction) |
| 1237 | (if (> (get direction 'smell) 0) | 1237 | (if (> (get direction 'smell) 0) |
| 1238 | (insert (format "%S " direction)))) | 1238 | (insert (format "%S " direction)))) |
| 1239 | lm-directions) | 1239 | lm-directions) |
| 1240 | (insert "\n") | 1240 | (insert "\n") |
| 1241 | 1241 | ||
| 1242 | (insert "I move: ") | 1242 | (insert "I move: ") |
| 1243 | (mapc '(lambda (direction) | 1243 | (mapc (lambda (direction) |
| 1244 | (if (> (get direction 'y_t) 0) | 1244 | (if (> (get direction 'y_t) 0) |
| 1245 | (insert (format "%S " direction)))) | 1245 | (insert (format "%S " direction)))) |
| 1246 | lm-directions) | 1246 | lm-directions) |
| @@ -1295,7 +1295,7 @@ After this limit is reached, lm-random-move is called to push him out of it." | |||
| 1295 | ; (* (/ (random 900000) 900000.0) .0001))) | 1295 | ; (* (/ (random 900000) 900000.0) .0001))) |
| 1296 | ;;;_ : lm-randomize-weights-for (direction) | 1296 | ;;;_ : lm-randomize-weights-for (direction) |
| 1297 | (defun lm-randomize-weights-for (direction) | 1297 | (defun lm-randomize-weights-for (direction) |
| 1298 | (mapc '(lambda (target-direction) | 1298 | (mapc (lambda (target-direction) |
| 1299 | (put direction | 1299 | (put direction |
| 1300 | target-direction | 1300 | target-direction |
| 1301 | (* (lm-flip-a-coin) (/ (random 10000) 10000.0)))) | 1301 | (* (lm-flip-a-coin) (/ (random 10000) 10000.0)))) |
| @@ -1306,7 +1306,7 @@ After this limit is reached, lm-random-move is called to push him out of it." | |||
| 1306 | 1306 | ||
| 1307 | ;;;_ : lm-fix-weights-for (direction) | 1307 | ;;;_ : lm-fix-weights-for (direction) |
| 1308 | (defun lm-fix-weights-for (direction) | 1308 | (defun lm-fix-weights-for (direction) |
| 1309 | (mapc '(lambda (target-direction) | 1309 | (mapc (lambda (target-direction) |
| 1310 | (put direction | 1310 | (put direction |
| 1311 | target-direction | 1311 | target-direction |
| 1312 | lm-initial-wij)) | 1312 | lm-initial-wij)) |
| @@ -1390,7 +1390,7 @@ After this limit is reached, lm-random-move is called to push him out of it." | |||
| 1390 | 0.0)))) | 1390 | 0.0)))) |
| 1391 | 1391 | ||
| 1392 | (defun lm-update-normal-weights (direction) | 1392 | (defun lm-update-normal-weights (direction) |
| 1393 | (mapc '(lambda (target-direction) | 1393 | (mapc (lambda (target-direction) |
| 1394 | (put direction target-direction | 1394 | (put direction target-direction |
| 1395 | (+ | 1395 | (+ |
| 1396 | (get direction target-direction) | 1396 | (get direction target-direction) |
| @@ -1401,7 +1401,7 @@ After this limit is reached, lm-random-move is called to push him out of it." | |||
| 1401 | lm-directions)) | 1401 | lm-directions)) |
| 1402 | 1402 | ||
| 1403 | (defun lm-update-naught-weights (direction) | 1403 | (defun lm-update-naught-weights (direction) |
| 1404 | (mapc '(lambda (target-direction) | 1404 | (mapc (lambda (target-direction) |
| 1405 | (put direction 'w0 | 1405 | (put direction 'w0 |
| 1406 | (lm-f | 1406 | (lm-f |
| 1407 | (+ | 1407 | (+ |
| @@ -1415,7 +1415,7 @@ After this limit is reached, lm-random-move is called to push him out of it." | |||
| 1415 | ;;;_ + Statistics gathering and creating functions | 1415 | ;;;_ + Statistics gathering and creating functions |
| 1416 | 1416 | ||
| 1417 | (defun lm-calc-current-smells () | 1417 | (defun lm-calc-current-smells () |
| 1418 | (mapc '(lambda (direction) | 1418 | (mapc (lambda (direction) |
| 1419 | (put direction 'smell (calc-smell-internal direction))) | 1419 | (put direction 'smell (calc-smell-internal direction))) |
| 1420 | lm-directions)) | 1420 | lm-directions)) |
| 1421 | 1421 | ||
| @@ -1427,7 +1427,7 @@ After this limit is reached, lm-random-move is called to push him out of it." | |||
| 1427 | (setf lm-no-payoff 0))) | 1427 | (setf lm-no-payoff 0))) |
| 1428 | 1428 | ||
| 1429 | (defun lm-store-old-y_t () | 1429 | (defun lm-store-old-y_t () |
| 1430 | (mapc '(lambda (direction) | 1430 | (mapc (lambda (direction) |
| 1431 | (put direction 'y_t-1 (get direction 'y_t))) | 1431 | (put direction 'y_t-1 (get direction 'y_t))) |
| 1432 | lm-directions)) | 1432 | lm-directions)) |
| 1433 | 1433 | ||
| @@ -1435,35 +1435,33 @@ After this limit is reached, lm-random-move is called to push him out of it." | |||
| 1435 | ;;;_ + Functions to move robot | 1435 | ;;;_ + Functions to move robot |
| 1436 | 1436 | ||
| 1437 | (defun lm-confidence-for (target-direction) | 1437 | (defun lm-confidence-for (target-direction) |
| 1438 | (+ | 1438 | (apply '+ |
| 1439 | (get target-direction 'w0) | 1439 | (get target-direction 'w0) |
| 1440 | (reduce '+ | 1440 | (mapcar (lambda (direction) |
| 1441 | (mapcar '(lambda (direction) | 1441 | (* |
| 1442 | (* | 1442 | (get direction target-direction) |
| 1443 | (get direction target-direction) | 1443 | (get direction 'smell))) |
| 1444 | (get direction 'smell)) | 1444 | lm-directions))) |
| 1445 | ) | ||
| 1446 | lm-directions)))) | ||
| 1447 | 1445 | ||
| 1448 | 1446 | ||
| 1449 | (defun lm-calc-confidences () | 1447 | (defun lm-calc-confidences () |
| 1450 | (mapc '(lambda (direction) | 1448 | (mapc (lambda (direction) |
| 1451 | (put direction 's (lm-confidence-for direction))) | 1449 | (put direction 's (lm-confidence-for direction))) |
| 1452 | lm-directions)) | 1450 | lm-directions)) |
| 1453 | 1451 | ||
| 1454 | (defun lm-move () | 1452 | (defun lm-move () |
| 1455 | (if (and (= (get 'lm-n 'y_t) 1.0) (= (get 'lm-s 'y_t) 1.0)) | 1453 | (if (and (= (get 'lm-n 'y_t) 1.0) (= (get 'lm-s 'y_t) 1.0)) |
| 1456 | (progn | 1454 | (progn |
| 1457 | (mapc '(lambda (dir) (put dir 'y_t 0)) lm-ns) | 1455 | (mapc (lambda (dir) (put dir 'y_t 0)) lm-ns) |
| 1458 | (if lm-debug | 1456 | (if lm-debug |
| 1459 | (message "n-s normalization.")))) | 1457 | (message "n-s normalization.")))) |
| 1460 | (if (and (= (get 'lm-w 'y_t) 1.0) (= (get 'lm-e 'y_t) 1.0)) | 1458 | (if (and (= (get 'lm-w 'y_t) 1.0) (= (get 'lm-e 'y_t) 1.0)) |
| 1461 | (progn | 1459 | (progn |
| 1462 | (mapc '(lambda (dir) (put dir 'y_t 0)) lm-ew) | 1460 | (mapc (lambda (dir) (put dir 'y_t 0)) lm-ew) |
| 1463 | (if lm-debug | 1461 | (if lm-debug |
| 1464 | (message "e-w normalization")))) | 1462 | (message "e-w normalization")))) |
| 1465 | 1463 | ||
| 1466 | (mapc '(lambda (pair) | 1464 | (mapc (lambda (pair) |
| 1467 | (if (> (get (car pair) 'y_t) 0) | 1465 | (if (> (get (car pair) 'y_t) 0) |
| 1468 | (funcall (car (cdr pair))))) | 1466 | (funcall (car (cdr pair))))) |
| 1469 | '( | 1467 | '( |
| @@ -1479,7 +1477,7 @@ After this limit is reached, lm-random-move is called to push him out of it." | |||
| 1479 | 1477 | ||
| 1480 | (defun lm-random-move () | 1478 | (defun lm-random-move () |
| 1481 | (mapc | 1479 | (mapc |
| 1482 | '(lambda (direction) (put direction 'y_t 0)) | 1480 | (lambda (direction) (put direction 'y_t 0)) |
| 1483 | lm-directions) | 1481 | lm-directions) |
| 1484 | (dolist (direction (nth (random 8) lm-8-directions)) | 1482 | (dolist (direction (nth (random 8) lm-8-directions)) |
| 1485 | (put direction 'y_t 1.0)) | 1483 | (put direction 'y_t 1.0)) |
| @@ -1575,14 +1573,14 @@ If the game is finished, this command requests for another game." | |||
| 1575 | 1573 | ||
| 1576 | (lm-set-landmark-signal-strengths) | 1574 | (lm-set-landmark-signal-strengths) |
| 1577 | 1575 | ||
| 1578 | (mapc '(lambda (direction) | 1576 | (mapc (lambda (direction) |
| 1579 | (put direction 'y_t 0.0)) | 1577 | (put direction 'y_t 0.0)) |
| 1580 | lm-directions) | 1578 | lm-directions) |
| 1581 | 1579 | ||
| 1582 | (if (not save-weights) | 1580 | (if (not save-weights) |
| 1583 | (progn | 1581 | (progn |
| 1584 | (mapc 'lm-fix-weights-for lm-directions) | 1582 | (mapc 'lm-fix-weights-for lm-directions) |
| 1585 | (mapc '(lambda (direction) | 1583 | (mapc (lambda (direction) |
| 1586 | (put direction 'w0 lm-initial-w0)) | 1584 | (put direction 'w0 lm-initial-w0)) |
| 1587 | lm-directions)) | 1585 | lm-directions)) |
| 1588 | (message "Weights preserved for this run.")) | 1586 | (message "Weights preserved for this run.")) |
| @@ -1612,10 +1610,10 @@ If the game is finished, this command requests for another game." | |||
| 1612 | 1610 | ||
| 1613 | (setq lm-tree-r (* (sqrt (+ (square lm-cx) (square lm-cy))) 1.5)) | 1611 | (setq lm-tree-r (* (sqrt (+ (square lm-cx) (square lm-cy))) 1.5)) |
| 1614 | 1612 | ||
| 1615 | (mapc '(lambda (direction) | 1613 | (mapc (lambda (direction) |
| 1616 | (put direction 'r (* lm-cx 1.1))) | 1614 | (put direction 'r (* lm-cx 1.1))) |
| 1617 | lm-ew) | 1615 | lm-ew) |
| 1618 | (mapc '(lambda (direction) | 1616 | (mapc (lambda (direction) |
| 1619 | (put direction 'r (* lm-cy 1.1))) | 1617 | (put direction 'r (* lm-cy 1.1))) |
| 1620 | lm-ns) | 1618 | lm-ns) |
| 1621 | (put 'lm-tree 'r lm-tree-r)) | 1619 | (put 'lm-tree 'r lm-tree-r)) |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index 432aa8e3852..315b61a8ab2 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -1367,8 +1367,8 @@ This function is more useful than \\[tex-buffer] when you need the | |||
| 1367 | (setq start (match-end 0))) | 1367 | (setq start (match-end 0))) |
| 1368 | (or (= start 0) | 1368 | (or (= start 0) |
| 1369 | (setq elts (cons (substring s start) elts))) | 1369 | (setq elts (cons (substring s start) elts))) |
| 1370 | (mapconcat '(lambda (elt) | 1370 | (mapconcat (lambda (elt) |
| 1371 | (if (= (length elt) 0) elt (expand-file-name elt))) | 1371 | (if (= (length elt) 0) elt (expand-file-name elt))) |
| 1372 | (nreverse elts) ":"))) | 1372 | (nreverse elts) ":"))) |
| 1373 | 1373 | ||
| 1374 | (defun tex-shell-running () | 1374 | (defun tex-shell-running () |