From 0d0af3dcce3a9b29d9c33c4cee34ca5249713904 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 30 Aug 2012 14:30:23 +0000 Subject: Summary: Don't quote lambda expressions * coq/coq-indent.el (coq-indent-inner-regexp): Remove old X-Symbol element. (coq-save-count, coq-proof-count): * obsolete/plastic/plastic.el (plastic-shell-handle-output): * lib/texi-docstring-magic.el (texi-docstring-magic-insert-magic): * lib/pg-dev.el (emacs-lisp-mode-hook): * lib/maths-menu.el (maths-menu-filter-predicate) (maths-menu-tokenise-insert): * lib/holes.el (holes-next): * lego/lego.el (lego-shell-handle-output): * isar/isabelle-system.el (isabelle-docs-menu): * coq/coq.el (coq-compile-command, coq-compile-auto-save) (coq-compile-ignored-directories, coq-load-path-safep) (proof-shell-handle-delayed-output-hook): Don't quote lambda. --- coq/coq-indent.el | 12 ++++++------ coq/coq.el | 46 ++++++++++++++++++++++----------------------- isar/isabelle-system.el | 6 +++--- lego/lego.el | 10 +++++----- lib/holes.el | 6 +++--- lib/maths-menu.el | 6 +++--- lib/pg-dev.el | 32 +++++++++++++++---------------- lib/texi-docstring-magic.el | 8 ++++---- obsolete/plastic/plastic.el | 10 +++++----- phox/phox-outline.el | 8 ++++---- 10 files changed, 72 insertions(+), 72 deletions(-) diff --git a/coq/coq-indent.el b/coq/coq-indent.el index 3b5f61ef..2e4d9742 100644 --- a/coq/coq-indent.el +++ b/coq/coq-indent.el @@ -22,7 +22,7 @@ (defconst coq-indent-inner-regexp (proof-regexp-alt - "[[]()]" "[^{]|[^}]" "šÕ" + "[[]()]" "[^{]|[^}]" ;; forall with must not be enclosed by \\< and ;;\\> . "~" forall but interacts with 'not' (proof-ids-to-regexp @@ -655,13 +655,13 @@ Returns point if found." (defun coq-goal-count (l) (coq-add-iter l 'coq-indent-goal-command-p)) (defun coq-save-count (l) - (coq-add-iter l '(lambda (x) - (or (coq-save-command-p nil x) - (eq (proof-string-match "\\<\\(?:EndSubproof\\)\\>\\|}" x) 0))))) + (coq-add-iter l (lambda (x) + (or (coq-save-command-p nil x) + (eq (proof-string-match "\\<\\(?:EndSubproof\\)\\>\\|}" x) 0))))) (defun coq-proof-count (l) - (coq-add-iter l '(lambda (x) - (eq (proof-string-match "\\<\\(?:Proof\\|BeginSubproof\\)\\>\\|{" x) 0)))) + (coq-add-iter l (lambda (x) + (eq (proof-string-match "\\<\\(?:Proof\\|BeginSubproof\\)\\>\\|{" x) 0)))) ;; returns the difference between goal (and assimilate Proof and BeginSubproof) and ;; save commands in a commands list. This is to diff --git a/coq/coq.el b/coq/coq.el index 9647bcd0..48cadde3 100644 --- a/coq/coq.el +++ b/coq/coq.el @@ -1299,10 +1299,10 @@ when module \"foo\" from directory \"bar\" is required. After the substitution the command can be changed in the minibuffer if `coq-confirm-external-compilation' is t." :type 'string - :safe '(lambda (v) - (and (stringp v) - (or (not (boundp 'coq-confirm-external-compilation)) - coq-confirm-external-compilation))) + :safe (lambda (v) + (and (stringp v) + (or (not (boundp 'coq-confirm-external-compilation)) + coq-confirm-external-compilation))) :group 'coq-auto-compile) (defconst coq-compile-substitution-list @@ -1384,7 +1384,7 @@ confirmation." "save all coq-mode buffers except the current buffer without confirmation" save-coq) (const :tag "save all buffers without confirmation" save-all)) - :safe '(lambda (v) (member v '(ask-coq ask-all save-coq save-all))) + :safe (lambda (v) (member v '(ask-coq ask-all save-coq save-all))) :group 'coq-auto-compile) (defcustom coq-lock-ancestors t @@ -1424,7 +1424,7 @@ compilation. It makes sense to include non-standard coq library directories here if they are not changed and if they are so big that dependency checking takes noticeable time." :type '(repeat regexp) - :safe '(lambda (v) (every 'stringp v)) + :safe (lambda (v) (every 'stringp v)) :group 'coq-auto-compile) (defcustom coq-compile-ignore-library-directory t @@ -1520,19 +1520,19 @@ DEP-MOD-TIMES is empty it returns nil." (and (listp path) (every - '(lambda (entry) - (or (stringp entry) - (and (listp entry) - (eq (car entry) 'rec) - (every 'stringp (cdr entry)) - (equal (length entry) 3)) - (and (listp entry) - (eq (car entry) 'nonrec) - (every 'stringp (cdr entry)) - (equal (length entry) 3)) - (and (listp entry) - (every 'stringp entry) - (equal (length entry) 2)))) + (lambda (entry) + (or (stringp entry) + (and (listp entry) + (eq (car entry) 'rec) + (every 'stringp (cdr entry)) + (equal (length entry) 3)) + (and (listp entry) + (eq (car entry) 'nonrec) + (every 'stringp (cdr entry)) + (equal (length entry) 3)) + (and (listp entry) + (every 'stringp entry) + (equal (length entry) 2)))) path))) ;; Compute command line for starting coqtop @@ -2622,10 +2622,10 @@ number of hypothesis displayed, without hiding the goal" (add-hook 'proof-shell-handle-delayed-output-hook 'coq-update-minor-mode-alist) (add-hook 'proof-shell-handle-delayed-output-hook - '(lambda () - (if (proof-string-match coq-shell-proof-completed-regexp - proof-shell-last-output) - (proof-clean-buffer proof-goals-buffer)))) + (lambda () + (if (proof-string-match coq-shell-proof-completed-regexp + proof-shell-last-output) + (proof-clean-buffer proof-goals-buffer)))) (defun is-not-split-vertic (selected-window) diff --git a/isar/isabelle-system.el b/isar/isabelle-system.el index a45e3470..9e2c64fc 100644 --- a/isar/isabelle-system.el +++ b/isar/isabelle-system.el @@ -257,9 +257,9 @@ for you, you should disable this behaviour." :group 'isabelle) (defvar isabelle-docs-menu - (let ((vc '(lambda (docdes) - (vector (car (cdr docdes)) - (list 'isa-view-doc (car docdes)) t)))) + (let ((vc (lambda (docdes) + (vector (car (cdr docdes)) + (list 'isa-view-doc (car docdes)) t)))) (list (cons "Isabelle Documentation" (mapcar vc (isa-tool-list-docs))))) "Isabelle documentation menu. Constructed when PG is loaded.") diff --git a/lego/lego.el b/lego/lego.el index e787d315..1ead4b9c 100644 --- a/lego/lego.el +++ b/lego/lego.el @@ -45,11 +45,11 @@ ;; Users should not need to change this. (defvar lego-shell-handle-output - '(lambda (cmd string) - (when (proof-string-match "^Module" cmd) - ;; prevent output and just give a minibuffer message - (setq proof-shell-last-output-kind 'systemspecific) - (message "Imports done!"))) + (lambda (cmd string) + (when (proof-string-match "^Module" cmd) + ;; prevent output and just give a minibuffer message + (setq proof-shell-last-output-kind 'systemspecific) + (message "Imports done!"))) "Acknowledge end of processing import declarations.") (defconst lego-process-config diff --git a/lib/holes.el b/lib/holes.el index 3a2ca044..9df00d6e 100644 --- a/lib/holes.el +++ b/lib/holes.el @@ -355,13 +355,13 @@ Operate betwenn START and END if non nil." 'holes-clear-hole (or start (point-min)) (or end (point-max)) 'hole)) -;;; limit ? +;; limit ? (defun holes-next (pos buffer) "Return the first hole after POS in BUFFER. Or after the hole at pos if there is one (default pos=point). If no hole found, return nil." (holes-map-holes - '(lambda (h x) (and (holes-is-hole-p h) h)) buffer pos)) + (lambda (h x) (and (holes-is-hole-p h) h)) buffer pos)) (defun holes-next-after-active-hole () "Internal." @@ -469,7 +469,7 @@ Sets `holes-active-hole' to the next hole if it exists." ;; mouse stuff, I want to make something close to `mouse-track-insert' ;; of XEmacs, but with modifier ctrl-meta and ctrl-meta-shift -;;; Emacs and XEmacs have different ways of dealing with mouse +;; Emacs and XEmacs have different ways of dealing with mouse ;; selection, but `mouse-track'(XEmacs) mouse-drag-region(Emacs) ;; have nearly the same meaning for me. So I define this ;; track-mouse-selection. diff --git a/lib/maths-menu.el b/lib/maths-menu.el index d02ff02e..b9ddf927 100644 --- a/lib/maths-menu.el +++ b/lib/maths-menu.el @@ -1,6 +1,6 @@ ;;; maths-menu.el --- insert maths characters from a menu -*-coding: iso-2022-7bit;-*- -;; Copyright (C) 2003 Free Software Foundation, Inc. +;; Copyright (C) 2003, 2012 Free Software Foundation, Inc. ;; Author: Dave Love ;; Keywords: convenience @@ -53,10 +53,10 @@ ;;; Code: -(defvar maths-menu-filter-predicate '(lambda (char) t) +(defvar maths-menu-filter-predicate (lambda (char) t) "Predicate function used to filter menu elements") -(defvar maths-menu-tokenise-insert '(lambda (char) (insert char)) +(defvar maths-menu-tokenise-insert #'insert "Function used to insert possibly formatted or escaped character.") (defun maths-menu-build-menu (spec) diff --git a/lib/pg-dev.el b/lib/pg-dev.el index 1d1c0e66..b37a77b9 100644 --- a/lib/pg-dev.el +++ b/lib/pg-dev.el @@ -29,17 +29,17 @@ ;; and byte compilation on save: (add-hook 'emacs-lisp-mode-hook - '(lambda () - (checkdoc-minor-mode 1) - (turn-on-eldoc-mode) - (flyspell-prog-mode) - (customize-set-variable 'whitespace-action '(cleanup)) - (define-key emacs-lisp-mode-map [(control c)(control c)] - 'emacs-lisp-byte-compile) - (add-hook 'write-file-functions - 'whitespace-write-file-hook nil t) - (add-hook 'before-save-hook - 'copyright-update nil t))) + (lambda () + (checkdoc-minor-mode 1) + (turn-on-eldoc-mode) + (flyspell-prog-mode) + (customize-set-variable 'whitespace-action '(cleanup)) + (define-key emacs-lisp-mode-map [(control c)(control c)] + 'emacs-lisp-byte-compile) + (add-hook 'write-file-functions + 'whitespace-write-file-hook nil t) + (add-hook 'before-save-hook + 'copyright-update nil t))) ;; Fill in template for new files @@ -69,11 +69,11 @@ (t 'font-lock-function-name-face)) nil t))) -; not working, see font-lock.el for usual emacs lisp settings -;(add-hook 'emacs-lisp-mode-hook -; '(lambda () -; (font-lock-add-keywords nil -; 'pg-dev-lisp-font-lock-keywords))) +;; Not working, see font-lock.el for usual emacs lisp settings. +;;(add-hook 'emacs-lisp-mode-hook +;; (lambda () +;; (font-lock-add-keywords nil +;; 'pg-dev-lisp-font-lock-keywords))) ;; diff --git a/lib/texi-docstring-magic.el b/lib/texi-docstring-magic.el index d9791cfd..6e8c8e49 100644 --- a/lib/texi-docstring-magic.el +++ b/lib/texi-docstring-magic.el @@ -389,10 +389,10 @@ With prefix arg, no errors on unknown symbols. (This results in (if v (format "Magic docstring for symbol (default %s): " v) "Magic docstring for symbol: ") - obarray '(lambda (sym) - (or (boundp sym) - (fboundp sym) - (texi-docstring-magic-find-face sym))) + obarray (lambda (sym) + (or (boundp sym) + (fboundp sym) + (texi-docstring-magic-find-face sym))) t nil 'variable-history)))) (list (if (equal val "") v (intern val))))) (insert "\n" texi-docstring-magic-comment " " (symbol-name symbol))) diff --git a/obsolete/plastic/plastic.el b/obsolete/plastic/plastic.el index f19b7006..f5462ba6 100644 --- a/obsolete/plastic/plastic.el +++ b/obsolete/plastic/plastic.el @@ -57,11 +57,11 @@ ;; Users should not need to change this. (defvar plastic-shell-handle-output - '(lambda (cmd string) - (when (proof-string-match "^Module" cmd) - ;; prevent output and just give a minibuffer message - (setq proof-shell-last-output-kind 'systemspecific) - (message "Imports done!"))) + (lambda (cmd string) + (when (proof-string-match "^Module" cmd) + ;; prevent output and just give a minibuffer message + (setq proof-shell-last-output-kind 'systemspecific) + (message "Imports done!"))) "Acknowledge end of processing import declarations.") (defconst plastic-process-config diff --git a/phox/phox-outline.el b/phox/phox-outline.el index 04fd4ca4..7ee2710f 100644 --- a/phox/phox-outline.el +++ b/phox/phox-outline.el @@ -37,9 +37,9 @@ (defconst phox-outline-heading-end-regexp "\\(\\*)[ \t]*\n\\)\\|\\(\\.[ \t]*\n\\)") -;(if phox-outline -; (add-hook 'phox-mode-hook '(lambda()(outline-minor-mode 1))) -; ) +;;(if phox-outline +;; (add-hook 'phox-mode-hook (lambda () (outline-minor-mode 1))) +;; ) (defun phox-outline-level() "Find the level of current outline heading in some PhoX libraries." @@ -66,4 +66,4 @@ (outline-minor-mode 1) ) -(provide 'phox-outline) \ No newline at end of file +(provide 'phox-outline) -- cgit v1.2.3