changeset 353:2a72779d9c50 dev

Rewrite lambda notations to suppress annoying warnings from emacs24
author HIROSE Yuuji <yuuji@gentei.org>
date Sun, 21 Dec 2014 14:20:01 +0900
parents ecf7b5543e65
children 5465428f5a68
files yahtml.el yatex.el yatex19.el yatexenv.el yatexgen.el yatexhie.el yatexhks.el yatexhlp.el yatexlib.el yatexm-o.el yatexpkg.el yatexsec.el
diffstat 12 files changed, 111 insertions(+), 87 deletions(-) [+]
line wrap: on
line diff
--- a/yahtml.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yahtml.el	Sun Dec 21 14:20:01 2014 +0900
@@ -1,6 +1,6 @@
 ;;; yahtml.el --- Yet Another HTML mode -*- coding: sjis -*-
 ;;; (c) 1994-2013 by HIROSE Yuuji [yuuji(@)yatex.org]
-;;; Last modified Tue Dec 16 11:11:25 2014 on firestorm
+;;; Last modified Sun Dec 21 14:02:00 2014 on firestorm
 ;;; $Id$
 
 (defconst yahtml-revision-number "1.77"
@@ -344,8 +344,8 @@
     (YaTeX-define-key "l" 'yahtml-insert-tag map)
     (YaTeX-define-key "L" 'yahtml-insert-tag-region map)
     (YaTeX-define-key "m" 'yahtml-insert-single map)
-    (YaTeX-define-key "n" '(lambda () (interactive) (insert (if yahtml-prefer-upcases "<BR>" "<br>"))) map)
-    (YaTeX-define-key "-" '(lambda () (interactive) (insert (if yahtml-prefer-upcases "<HR>" "<hr>") "\n")) map)
+    (YaTeX-define-key "n" (function(lambda () (interactive) (insert (if yahtml-prefer-upcases "<BR>" "<br>")))) map)
+    (YaTeX-define-key "-" (function(lambda () (interactive) (insert (if yahtml-prefer-upcases "<HR>" "<hr>") "\n"))) map)
     (YaTeX-define-key "p" 'yahtml-insert-p map)
     (if YaTeX-no-begend-shortcut
 	(progn
@@ -818,11 +818,12 @@
 	   (cons "typeface" yahtml-menu-map-typeface)))))
   (if (featurep 'xemacs)
       (add-hook 'yahtml-mode-hook
-		'(lambda ()
+		(function
+		 (lambda ()
 		   (or (assoc "yahtml" current-menubar)
 		       (progn
 			 (set-buffer-menubar (copy-sequence current-menubar))
-			 (add-submenu nil yahtml-menu-map))))))))
+			 (add-submenu nil yahtml-menu-map)))))))))
 
 ;;; ----------- Completion ----------
 (defvar yahtml-last-begend "html")
@@ -1017,7 +1018,7 @@
 	  (with-output-to-temp-buffer "*Completions*"
 	    (princ "Possible completinos are:\n")
 	    (princ
-	     (mapconcat '(lambda (x) x)  (funcall listfunc) "\n")))
+	     (mapconcat (function(lambda (x) x))  (funcall listfunc) "\n")))
 	(delete-region (point) beg)
 	(insert cmpl)))
      ((null cmpl)
@@ -1224,8 +1225,8 @@
 (defun yahtml-make-style-parameter (proplist)
   "Make CSS property definitions in style attribute."
   (mapconcat
-   '(lambda (x) (if (and (cdr x) (string< "" (cdr x)))
-		    (format "%s: %s;" (car x) (cdr x))))
+   (function (lambda (x) (if (and (cdr x) (string< "" (cdr x)))
+			     (format "%s: %s;" (car x) (cdr x)))))
    (delq nil proplist)
    " "))
 
--- a/yatex.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yatex.el	Sun Dec 21 14:20:01 2014 +0900
@@ -1,6 +1,6 @@
 ;;; yatex.el --- Yet Another tex-mode for emacs //野鳥// -*- coding: sjis -*-
 ;;; (c)1991-2014 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sun Dec 21 12:13:34 2014 on firestorm
+;;; Last modified Sun Dec 21 14:02:49 2014 on firestorm
 ;;; $Id$
 ;;; The latest version of this software is always available at;
 ;;; http://www.yatex.org/
@@ -483,8 +483,8 @@
   (YaTeX-define-key "$" 'YaTeX-insert-dollars-region)
   (YaTeX-define-key "i" 'YaTeX-fill-item)
   (YaTeX-define-key "\\"
-   '(lambda () (interactive)
-      (insert (if (YaTeX-in-math-mode-p) "\\backslash" "\\textbackslash"))))
+   (function(lambda () (interactive)
+      (insert (if (YaTeX-in-math-mode-p) "\\backslash" "\\textbackslash")))))
   (if YaTeX-no-begend-shortcut
       (progn
 	(YaTeX-define-key "B" 'YaTeX-make-begin-end-region)
@@ -528,12 +528,12 @@
   (YaTeX-define-key "d" 'YaTeX-display-hierarchy)
   (YaTeX-define-key "x" YaTeX-user-extensional-map)
   (YaTeX-define-key "n"
-    '(lambda () (interactive)
-       (insert "\\" (if (YaTeX-on-section-command-p "o?oalign") "crcr" "\\"))))
+    (function(lambda () (interactive)
+       (insert "\\" (if (YaTeX-on-section-command-p "o?oalign") "crcr" "\\")))))
   (if YaTeX-dos
       (define-key YaTeX-prefix-map "\C-r"
-	'(lambda () (interactive)
-	   (YaTeX-set-screen-height YaTeX-saved-screen-height) (recenter)))))
+	(function(lambda () (interactive)
+	   (YaTeX-set-screen-height YaTeX-saved-screen-height) (recenter))))))
 
 (defvar YaTeX-section-completion-map nil
   "*Key map used at YaTeX completion in the minibuffer.")
--- a/yatex19.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yatex19.el	Sun Dec 21 14:20:01 2014 +0900
@@ -1,6 +1,6 @@
 ;;; yatex19.el -- YaTeX facilities for Emacs 19 or later
 ;;; (c)1994-2013 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Mon Apr  1 22:42:46 2013 on firestorm
+;;; Last modified Sun Dec 21 14:03:48 2014 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -54,11 +54,11 @@
 	(list
 	 (if YaTeX-auto-math-mode nil
 	   (cons 'math (cons "Toggle math-mode"
-			     '(lambda () (interactive)
-				(YaTeX-switch-mode-menu nil ?t)))))
+			     (function(lambda () (interactive)
+				(YaTeX-switch-mode-menu nil ?t))))))
 	 (cons 'mod (cons "Toggle Modify Mode"
-			  '(lambda () (interactive)
-			     (YaTeX-switch-mode-menu nil ?m))))))))
+			  (function(lambda () (interactive)
+			     (YaTeX-switch-mode-menu nil ?m)))))))))
 (defvar YaTeX-mode-menu-map-percent (make-sparse-keymap "percent"))
 (YaTeX-define-menu
  'YaTeX-mode-menu-map-percent
@@ -227,11 +227,12 @@
 
 (and (featurep 'xemacs)
      (add-hook 'yatex-mode-hook
-	       '(lambda ()
+	       (function
+		(lambda ()
 		  (or (assoc "YaTeX" current-menubar)
 		      (progn
 			(set-buffer-menubar (copy-sequence current-menubar))
-			(add-submenu nil YaTeX-mode-menu-map))))))
+			(add-submenu nil YaTeX-mode-menu-map)))))))
 
 ;; Other key bindings for window-system
 ;(YaTeX-define-key [?\C- ] 'YaTeX-do-completion)
--- a/yatexenv.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yatexenv.el	Sun Dec 21 14:20:01 2014 +0900
@@ -1,6 +1,6 @@
 ;;; yatexenv.el --- YaTeX environment-specific functions
 ;;; (c) 1994-2013 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Wed Nov 20 14:14:39 2013 on firestorm
+;;; Last modified Sun Dec 21 13:58:31 2014 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -198,10 +198,11 @@
     (YaTeX-indent-line)))
 
 (mapcar
- '(lambda (s)
+ (function
+  (lambda (s)
     (fset (intern (concat  "YaTeX-intelligent-newline-"
 			   (symbol-name s)))
-	  'YaTeX-intelligent-newline-align))
+	  'YaTeX-intelligent-newline-align)))
  '(align* flalign  flalign* matrix pmatrix bmatrix Bmatrix vmatrix Vmatrix
    cases eqnarray eqnarray* alignat alignat*))
 
--- a/yatexgen.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yatexgen.el	Sun Dec 21 14:20:01 2014 +0900
@@ -1,7 +1,7 @@
 ;;; yatexgen.el --- YaTeX add-in function generator(rev.5)
 
 ;;; (c)1991-1995,1999,2000 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Sat Sep  1 08:10:36 2012 on firestorm
+;;; Last modified Sun Dec 21 14:04:49 2014 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -244,7 +244,8 @@
 	func-name (string ""))
     ;;Phase 1. extract argument from add-in string.
     (mapcar
-     '(lambda (arg)
+     (function
+      (lambda (arg)
 	(let ((index 0) (match 0) beg end (carg (car arg)))
 	  (YaTeX-generate-display-message
 	   YaTeX-generate-read-prompt-message)
@@ -265,7 +266,7 @@
 	       ((YaTeX-generate-ask-match-position)
 		(YaTeX-generate-register-match))))
 	    (setq index end))
-	  (setq i (1+ i))))
+	  (setq i (1+ i)))))
      args)
     ;;Phase 2. Generate function!!
     (setq i 0)
@@ -287,10 +288,11 @@
      "(defun " func-name " ()\n"
      "  (let (")
     (mapcar
-     '(lambda (arg)
+     (function
+      (lambda (arg)
 	(insert (format "(arg%d (read-string \"%s: \"))\n"
 			i (aref prompt (1- i))))
-	(setq i (1+ i)))
+	(setq i (1+ i))))
      args)
     (delete-region (point) (progn (forward-line -1) (end-of-line) (point)))
     (insert ")\n(concat " (YaTeX-generate-lisp-quote string)
--- a/yatexhie.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yatexhie.el	Sun Dec 21 14:20:01 2014 +0900
@@ -1,7 +1,7 @@
 ;;; yatexhie.el --- YaTeX hierarchy browser
 ;;; 
 ;;; (c)1995-2013 by HIROSE Yuuji [yuuji@yatex.org]
-;;; Last modified Mon Apr  1 22:43:34 2013 on firestorm
+;;; Last modified Sun Dec 21 14:05:20 2014 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -75,8 +75,9 @@
 			(YaTeX-get-builtin "!")
 			(setq YaTeX-parent-file parent))))
 	      (cons (buffer-file-name (current-buffer))
-		    (mapcar '(lambda (f) 	;return value
-			       (YaTeX-document-hierarchy f basedir))
+		    (mapcar (function 		;return value
+			     (lambda (f)
+			       (YaTeX-document-hierarchy f basedir)))
 			    (YaTeX-all-included-files))))))
     (message "Parsing [%s]...done" (file-name-nondirectory file))))
 
--- a/yatexhks.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yatexhks.el	Sun Dec 21 14:20:01 2014 +0900
@@ -13,41 +13,56 @@
 ;;97/1/27
 (define-key YaTeX-user-extensional-map "v" 'YaTeX-section-overview)
 ;;initial version
-(define-key YaTeX-user-extensional-map "0"
-  '(lambda () (interactive) (YaTeX-make-section nil nil nil "part")))
-(define-key YaTeX-user-extensional-map "1"
-  '(lambda () (interactive) (YaTeX-make-section nil nil nil "chapter")))
-(define-key YaTeX-user-extensional-map "2"
-  '(lambda () (interactive) (YaTeX-make-section nil nil nil "section")))
-(define-key YaTeX-user-extensional-map "3"
-  '(lambda () (interactive) (YaTeX-make-section nil nil nil "subsection")))
-(define-key YaTeX-user-extensional-map "4"
-  '(lambda () (interactive) (YaTeX-make-section nil nil nil "subsubsection")))
-(define-key YaTeX-user-extensional-map "5"
-  '(lambda () (interactive) (YaTeX-make-section nil nil nil "paragraph")))
-(define-key YaTeX-user-extensional-map "6"
-  '(lambda () (interactive) (YaTeX-make-section nil nil nil "subparagraph")))
-(define-key YaTeX-user-extensional-map "r"
-  '(lambda () (interactive) (YaTeX-make-section nil nil nil "ref")))
-(define-key YaTeX-user-extensional-map "i"
-  '(lambda () (interactive) (YaTeX-make-singlecmd "item")))
-(define-key YaTeX-user-extensional-map "\C-b"
-  '(lambda () (interactive) (YaTeX-make-singlecmd "leftarrow")))
-(define-key YaTeX-user-extensional-map "l"
-  '(lambda () (interactive) (YaTeX-make-section nil nil nil "label")))
-(define-key YaTeX-user-extensional-map "f"
-  '(lambda () (interactive) (YaTeX-make-section nil nil nil "frac")))
-(define-key YaTeX-user-extensional-map "S"
-  '(lambda () (interactive) (YaTeX-make-section nil nil nil "setlength")))
-(define-key YaTeX-user-extensional-map "b"
-  '(lambda () (interactive) (YaTeX-make-fontsize nil "bf")))
-(define-key YaTeX-user-extensional-map "I" 'YaTeX-browse-info)
+(let ((map YaTeX-user-extensional-map))
+  (define-key map "0"
+    (function (lambda () (interactive)
+		(YaTeX-make-section nil nil nil "part"))))
+  (define-key map "1"
+    (function (lambda () (interactive)
+		(YaTeX-make-section nil nil nil "chapter"))))
+  (define-key map "2"
+    (function (lambda () (interactive)
+		(YaTeX-make-section nil nil nil "section"))))
+  (define-key map "3"
+    (function (lambda () (interactive)
+		(YaTeX-make-section nil nil nil "subsection"))))
+  (define-key map "4"
+    (function (lambda () (interactive)
+		(YaTeX-make-section nil nil nil "subsubsection"))))
+  (define-key map "5"
+    (function (lambda () (interactive)
+		(YaTeX-make-section nil nil nil "paragraph"))))
+  (define-key map "6"
+    (function (lambda () (interactive)
+		(YaTeX-make-section nil nil nil "subparagraph"))))
+  (define-key map "r"
+    (function (lambda () (interactive)
+		(YaTeX-make-section nil nil nil "ref"))))
+  (define-key map "i"
+    (function (lambda () (interactive)
+		(YaTeX-make-singlecmd "item"))))
+  (define-key map "\C-b"
+    (function (lambda () (interactive)
+		(YaTeX-make-singlecmd "leftarrow"))))
+  (define-key map "l"
+    (function (lambda () (interactive)
+		(YaTeX-make-section nil nil nil "label"))))
+  (define-key map "f"
+    (function (lambda () (interactive)
+		(YaTeX-make-section nil nil nil "frac"))))
+  (define-key map "S"
+    (function (lambda () (interactive)
+		(YaTeX-make-section nil nil nil "setlength"))))
+  (define-key map "b"
+    (function (lambda () (interactive)
+		(YaTeX-make-fontsize nil "bf"))))
+  (define-key map "I" 'YaTeX-browse-info))
 
 (defun YaTeX-browse-info ()
-  "Browse YaTeX's info"
-  (interactive)
-  (require 'info)
-  (Info-goto-node (if YaTeX-japan "(yatexj)Top" "(yatexe)Top")))
+ "Browse YaTeX's info"
+ (interactive)
+ (require 'info)
+ (Info-goto-node (if YaTeX-japan "(yatexj)Top" "(yatexe)Top")))
 
 
 ;
--- a/yatexhlp.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yatexhlp.el	Sun Dec 21 14:20:01 2014 +0900
@@ -1,7 +1,7 @@
 ;;; yatexhlp.el --- YaTeX helper with LaTeX commands and macros
 ;;; 
-;;; (c)1994,1998,2004 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Thu Dec 18 17:53:52 2014 on firestorm
+;;; (c)1994,1998,2004,2014 by HIROSE Yuuji.[yuuji@yatex.org]
+;;; Last modified Sun Dec 21 14:14:34 2014 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -45,8 +45,8 @@
   (setq YaTeX-help-mode-map (make-sparse-keymap))
   (let ((map YaTeX-help-mode-map))
     (suppress-keymap map)
-    (define-key map "j" '(lambda () (interactive) (scroll-up 1)))
-    (define-key map "k" '(lambda () (interactive) (scroll-up -1)))
+    (define-key map "j" (function (lambda () (interactive) (scroll-up 1))))
+    (define-key map "k" (function (lambda () (interactive) (scroll-up -1))))
     (define-key map "n" 'next-line)
     (define-key map "p" 'previous-line)
     (define-key map " " 'scroll-up)
--- a/yatexlib.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yatexlib.el	Sun Dec 21 14:20:01 2014 +0900
@@ -1,7 +1,7 @@
 ;;; yatexlib.el --- YaTeX and yahtml common libraries
 ;;; 
 ;;; (c)1994-2013 by HIROSE Yuuji.[yuuji@yatex.org]
-;;; Last modified Fri Nov 22 07:53:13 2013 on firestorm
+;;; Last modified Sun Dec 21 14:15:24 2014 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -287,8 +287,8 @@
       (delete-region (point) (progn (forward-sexp) (point)))
       (delete-blank-lines)
       (insert "(setq " name " '(\n")
-      (mapcar '(lambda (s)
-		 (insert (format "%s\n" (prin1-to-string s))))
+      (mapcar (function (lambda (s)
+			  (insert (format "%s\n" (prin1-to-string s)))))
 	      value)
       (insert "))\n\n")
       (delete-blank-lines)
@@ -844,9 +844,9 @@
 (fset 'YaTeX-last-key
       (if (fboundp 'win:last-key)
 	  'win:last-key
-	'(lambda () (if (boundp 'last-command-char)
-			last-command-char
-		      last-command-event))))
+	(function (lambda () (if (boundp 'last-command-char)
+				 last-command-char
+			       last-command-event)))))
 (defun YaTeX-switch-to-window ()
   "Switch to windows.el's window decided by last pressed key."
   (interactive)
--- a/yatexm-o.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yatexm-o.el	Sun Dec 21 14:20:01 2014 +0900
@@ -1,7 +1,7 @@
 ;;; yatexm-o.el --- Sample to invoke yatex-mode with outline-minor mode
 
 ;;; (c)1993 by HIROSE Yuuji [yuuji@yatex.org]
-;;; Last modified Sat Sep  1 08:12:40 2012 on firestorm
+;;; Last modified Sun Dec 21 14:15:47 2014 on firestorm
 
 ;;; Code:
 ;;;
@@ -26,12 +26,14 @@
 (autoload 'yatex-mode "yatex" "Yet Another LaTeX mode" t)
 ;;↓min-outを使用しない場合、;;@ の行は不要です。
 (defvar yatex-mode-hook
-  '(lambda ()
+  (function
+   (lambda ()
      (setq outline-regexp LaTeX-outline-regexp)			    ;;@
      (outline-minor-mode 1)					    ;;@
-     ))
+     )))
 (defvar yatex-mode-load-hook
-  '(lambda ()
+  (function
+   (lambda ()
      (setq-default outline-prefix-char (concat YaTeX-prefix "\C-o"));;@
      (require 'min-out)						    ;;@
      ;;auctex 付属の min-out.el の場合これ↓
@@ -39,4 +41,4 @@
      ;;Emacs 付属の outline.el の場合これ↓
      (define-key outline-mode-prefix-map "\C-?" 'hide-subtree)
      (YaTeX-define-begend-key "ba" "abstract")
-     ))
+     )))
--- a/yatexpkg.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yatexpkg.el	Sun Dec 21 14:20:01 2014 +0900
@@ -1,7 +1,7 @@
 ;;; yatexpkg.el --- YaTeX package manager
 ;;; 
 ;;; (c)2003-2014 by HIROSE, Yuuji [yuuji@yatex.org]
-;;; Last modified Thu Dec 18 18:03:48 2014 on firestorm
+;;; Last modified Sun Dec 21 14:16:14 2014 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -128,9 +128,10 @@
 	(usepkgrx (concat
 		   YaTeX-ec-regexp
 		   "\\(usepackage\\|include\\)\\b"))
-	(register '(lambda () (set-buffer cb)
+	(register (function
+		   (lambda () (set-buffer cb)
 		     (set (make-local-variable 'YaTeX-package-resolved-list)
-			  (cons macro YaTeX-package-resolved-list))))
+			  (cons macro YaTeX-package-resolved-list)))))
 	(begdoc (concat YaTeX-ec "begin{document}"))
 	pb pkg optlist (option "") mb0 uspkgargs)
     (if (or (YaTeX-member macro YaTeX-package-resolved-list)
--- a/yatexsec.el	Sun Dec 21 13:57:27 2014 +0900
+++ b/yatexsec.el	Sun Dec 21 14:20:01 2014 +0900
@@ -1,7 +1,7 @@
 ;;; yatexsec.el --- YaTeX sectioning browser
 ;;; 
 ;;; (c) 1994-2013 by HIROSE Yuuji [yuuji@yatex.org]
-;;; Last modified Mon Apr  1 22:46:28 2013 on firestorm
+;;; Last modified Sun Dec 21 14:16:35 2014 on firestorm
 ;;; $Id$
 
 ;;; Code:
@@ -55,9 +55,9 @@
   (define-key YaTeX-sectioning-minibuffer-map "\C-r"
     'YaTeX-sectioning-scroll-down)
   (define-key YaTeX-sectioning-minibuffer-map "\C-w"
-    '(lambda () (interactive) (YaTeX-sectioning-scroll-down 1)))
+    (function (lambda () (interactive) (YaTeX-sectioning-scroll-down 1))))
   (define-key YaTeX-sectioning-minibuffer-map "\C-z"
-    '(lambda () (interactive) (YaTeX-sectioning-scroll-up 1)))
+    (function (lambda () (interactive) (YaTeX-sectioning-scroll-up 1))))
   (define-key YaTeX-sectioning-minibuffer-map "\C-l"
     'YaTeX-sectioning-recenter)
   (define-key YaTeX-sectioning-minibuffer-map "?"

yatex.org