diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2003-02-04 13:24:35 +0000 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2003-02-04 13:24:35 +0000 |
commit | a6cd4c489c3d49930ce978fa7f03d4df5e893ec3 (patch) | |
tree | 30b32294763818f41caff3af6dde5be3a7e4c919 | |
parent | c44966f3082d203d4437310933504ca726c81c18 (diff) | |
download | emacs-a6cd4c489c3d49930ce978fa7f03d4df5e893ec3.tar.gz |
Trailing whitepace deleted.
271 files changed, 3413 insertions, 3413 deletions
diff --git a/lisp/calc/README b/lisp/calc/README index d8ad4ad4e1c..c33e5d92c8f 100644 --- a/lisp/calc/README +++ b/lisp/calc/README @@ -11,7 +11,7 @@ Written by: San Jose CA 95134 daveg@synaptics.com, uunet!synaptx!daveg -Currently maintained by: +Currently maintained by: D. Goel <deego@gnufans.org> and Colin Walters <walters@debian.org> From the introduction to the manual: diff --git a/lisp/calc/README.prev b/lisp/calc/README.prev index e9983d5bb7a..935ba6e08b1 100644 --- a/lisp/calc/README.prev +++ b/lisp/calc/README.prev @@ -384,7 +384,7 @@ Version 2.00 alpha 1: * Redesigned user interface of `a F' (calc-curve-fit) command. - * Added "phase" feature to the rewrite rule system. + * Added "phase" feature to the rewrite rule system. * Added "&&&", "|||", "!!!" to the rewrite rule system. diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index 841a1a91116..5c0c27e703a 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el @@ -432,7 +432,7 @@ (defun calc-alg-digit-entry () - (calc-alg-entry + (calc-alg-entry (cond ((eq last-command-char ?e) (if (> calc-number-radix 14) (format "%d.^" calc-number-radix) "1e")) ((eq last-command-char ?#) (format "%d#" calc-number-radix)) diff --git a/lisp/calc/calc-alg.el b/lisp/calc/calc-alg.el index 79a775a7922..fe2ca52ed9b 100644 --- a/lisp/calc/calc-alg.el +++ b/lisp/calc/calc-alg.el @@ -1,9 +1,9 @@ -;;; calc-alg.el --- algebraic functions for Calc +;;; calc-alg.el --- algebraic functions for Calc ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -70,7 +70,7 @@ (calc-with-default-simplification (let ((math-simplify-only nil)) (calc-modify-simplify-mode arg) - (calc-enter-result 1 "expf" + (calc-enter-result 1 "expf" (if (> arg 0) (let ((math-expand-formulas t)) (calc-top-n 1)) @@ -1257,7 +1257,7 @@ (if (Math-objvecp expr) (and (eq always 1) (list expr 1)) - (and always + (and always (list 1 expr))))) (defun calcFunc-lin (expr &optional var) diff --git a/lisp/calc/calc-arith.el b/lisp/calc/calc-arith.el index e634614c8a0..0faef258b8d 100644 --- a/lisp/calc/calc-arith.el +++ b/lisp/calc/calc-arith.el @@ -1,9 +1,9 @@ ;;; calc-arith.el --- arithmetic functions for Calc - + ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el index 3efc24e1305..c32ac9e34ab 100644 --- a/lisp/calc/calc-bin.el +++ b/lisp/calc/calc-bin.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el index f81ec945c1d..5772a90f6ac 100644 --- a/lisp/calc/calc-comb.el +++ b/lisp/calc/calc-comb.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -326,7 +326,7 @@ (math-div (math-pow -2 (- tn)) (math-double-factorial-iter (* -2 tn) 3 1 2)) - (math-div + (math-div (math-double-factorial-iter (* 2 tn) 3 1 2) (math-pow 2 tn))))) (math-mul q (if calc-symbolic-mode diff --git a/lisp/calc/calc-cplx.el b/lisp/calc/calc-cplx.el index eb173da015b..3730254403a 100644 --- a/lisp/calc/calc-cplx.el +++ b/lisp/calc/calc-cplx.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-embed.el b/lisp/calc/calc-embed.el index f3d81e58279..61299b6d68c 100644 --- a/lisp/calc/calc-embed.el +++ b/lisp/calc/calc-embed.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-ext.el b/lisp/calc/calc-ext.el index 09b9bf59c76..5907688baa0 100644 --- a/lisp/calc/calc-ext.el +++ b/lisp/calc/calc-ext.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -660,7 +660,7 @@ (define-key calc-alg-map "\e\C-m" 'calc-last-args-stub) (define-key calc-alg-map "\e\177" 'calc-pop-above) )) - + ;; The following is a relic for backward compatability only. ;; The calc-define property list is now the recommended method. (if (and (boundp 'calc-ext-defs) @@ -1631,9 +1631,9 @@ calc-kill calc-kill-region calc-yank)))) ( * ( * ) ( * ) ) ( / ( / ) ( ) ) ( | ( | ) ( | ) ) - ( calcFunc-land ( calcFunc-land ) + ( calcFunc-land ( calcFunc-land ) ( calcFunc-land ) ) - ( calcFunc-lor ( calcFunc-lor ) + ( calcFunc-lor ( calcFunc-lor ) ( calcFunc-lor ) ) )) @@ -2725,7 +2725,7 @@ calc-kill calc-kill-region calc-yank)))) (math-integerp int) (math-integerp num) (math-integerp den) (not (math-zerop den)) (list 'frac (math-add num (math-mul int den)) den))))) - + ;; Fractions ((string-match "^\\([0-9]*\\)[:/]\\([0-9]*\\)$" s) (let ((num (math-match-substring s 1)) @@ -2735,7 +2735,7 @@ calc-kill calc-kill-region calc-yank)))) (and num den (math-integerp num) (math-integerp den) (not (math-zerop den)) (list 'frac num den))))) - + ;; Modulo forms ((string-match "^\\(.*\\) *mod *\\(.*\\)$" s) (let* ((n (math-match-substring s 1)) @@ -2771,7 +2771,7 @@ calc-kill calc-kill-region calc-yank)))) (math-zerop (nth 1 minsec))) (math-add (list 'hms hours 0 0) minsec)) (t nil))))) - + ;; Minutes ((string-match "^\\([^'#^]+\\)[mM']\\(.*\\)$" s) (let* ((minutes (math-match-substring s 1)) @@ -2789,7 +2789,7 @@ calc-kill calc-kill-region calc-yank)))) (math-zerop (nth 2 seconds))) (math-add (list 'hms 0 minutes 0) seconds)) (t nil))))) - + ;; Seconds ((string-match "^\\([^\"#^]+\\)[sS\"]$" s) (let ((seconds (math-read-number (math-match-substring s 1)))) @@ -2797,7 +2797,7 @@ calc-kill calc-kill-region calc-yank)))) (not (math-negp seconds)) (Math-lessp seconds 60) (list 'hms 0 0 seconds)))) - + ;; Integer+fraction with explicit radix ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]\\)$" s) (let ((radix (string-to-int (math-match-substring s 1))) @@ -2811,7 +2811,7 @@ calc-kill calc-kill-region calc-yank)))) (list 'frac (math-add num (math-mul int den)) den))))) - + ;; Fraction with explicit radix ((string-match "^\\([0-9]+\\)\\(#\\|\\^\\^\\)\\([0-9a-zA-Z]*\\)[:/]\\([0-9a-zA-Z]*\\)$" s) (let ((radix (string-to-int (math-match-substring s 1))) @@ -2820,11 +2820,11 @@ calc-kill calc-kill-region calc-yank)))) (let ((num (if (> (length num) 0) (math-read-radix num radix) 1)) (den (if (> (length den) 0) (math-read-radix den radix) 1))) (and num den (not (math-zerop den)) (list 'frac num den))))) - + ;; Float with explicit radix and exponent ((or (string-match "^0*\\(\\([2-9]\\|1[0-4]\\)\\(#\\|\\^\\^\\)[0-9a-dA-D.]+\\)[eE]\\([-+]?[0-9]+\\)$" s) (string-match "^\\(\\([0-9]+\\)\\(#\\|\\^\\^\\)[0-9a-zA-Z.]+\\) *\\* *\\2\\.? *\\^ *\\([-+]?[0-9]+\\)$" s)) - (let ((radix (string-to-int (math-match-substring s 2))) + (let ((radix (string-to-int (math-match-substring s 2))) (mant (math-match-substring s 1)) (exp (math-match-substring s 4))) (let ((mant (math-read-number mant)) diff --git a/lisp/calc/calc-fin.el b/lisp/calc/calc-fin.el index 1ddf9c7832c..adb74b0e3a7 100644 --- a/lisp/calc/calc-fin.el +++ b/lisp/calc/calc-fin.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-forms.el b/lisp/calc/calc-forms.el index 580b53622d1..fcd395d4fd5 100644 --- a/lisp/calc/calc-forms.el +++ b/lisp/calc/calc-forms.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-frac.el b/lisp/calc/calc-frac.el index 0847f0756cb..443b647b4e9 100644 --- a/lisp/calc/calc-frac.el +++ b/lisp/calc/calc-frac.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-funcs.el b/lisp/calc/calc-funcs.el index d3722beb24f..65da1376da3 100644 --- a/lisp/calc/calc-funcs.el +++ b/lisp/calc/calc-funcs.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el index 9a1c7072c63..90ed192d0c8 100644 --- a/lisp/calc/calc-graph.el +++ b/lisp/calc/calc-graph.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -1399,7 +1399,7 @@ This \"dumb\" driver will be present in Gnuplot 3.0." (and calc-gnuplot-geometry (list "-geometry" calc-gnuplot-geometry))))) - (setq calc-gnuplot-process + (setq calc-gnuplot-process (apply 'start-process "gnuplot" calc-gnuplot-buffer diff --git a/lisp/calc/calc-help.el b/lisp/calc/calc-help.el index 91e47655be6..ba776055669 100644 --- a/lisp/calc/calc-help.el +++ b/lisp/calc/calc-help.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-incom.el b/lisp/calc/calc-incom.el index 47ac2b8b1b2..8d85a9edef6 100644 --- a/lisp/calc/calc-incom.el +++ b/lisp/calc/calc-incom.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-keypd.el b/lisp/calc/calc-keypd.el index e82dce3d0b5..7d94a239cf5 100644 --- a/lisp/calc/calc-keypd.el +++ b/lisp/calc/calc-keypd.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-lang.el b/lisp/calc/calc-lang.el index 9e180ab8294..661905b207e 100644 --- a/lisp/calc/calc-lang.el +++ b/lisp/calc/calc-lang.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -253,7 +253,7 @@ ( conjg . calcFunc-conj ) ( log . calcFunc-ln ) ( nint . calcFunc-round ) - ( real . calcFunc-re ))) + ( real . calcFunc-re ))) (put 'fortran 'math-input-filter 'calc-input-case-filter) (put 'fortran 'math-output-filter 'calc-output-case-filter) diff --git a/lisp/calc/calc-macs.el b/lisp/calc/calc-macs.el index 232a8b46c43..1782a346118 100644 --- a/lisp/calc/calc-macs.el +++ b/lisp/calc/calc-macs.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-maint.el b/lisp/calc/calc-maint.el index a663e98082e..a597fb80868 100644 --- a/lisp/calc/calc-maint.el +++ b/lisp/calc/calc-maint.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-map.el b/lisp/calc/calc-map.el index 6a2170df28f..b7cf8f71ba5 100644 --- a/lisp/calc/calc-map.el +++ b/lisp/calc/calc-map.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-math.el b/lisp/calc/calc-math.el index 17066b467d8..093679232e5 100644 --- a/lisp/calc/calc-math.el +++ b/lisp/calc/calc-math.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-misc.el b/lisp/calc/calc-misc.el index 8a388a447e0..648840a5bbf 100644 --- a/lisp/calc/calc-misc.el +++ b/lisp/calc/calc-misc.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-mode.el b/lisp/calc/calc-mode.el index 41e341e34fd..5febb343e3f 100644 --- a/lisp/calc/calc-mode.el +++ b/lisp/calc/calc-mode.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -459,7 +459,7 @@ (defun calc-symbolic-mode (n) (interactive "P") (calc-wrapper - + (message (if (calc-change-mode 'calc-symbolic-mode n nil t) "Inexact computations like sqrt(2) are deferred" "Numerical computations are always done immediately")))) diff --git a/lisp/calc/calc-mtx.el b/lisp/calc/calc-mtx.el index aa425658ac2..8f331e3e965 100644 --- a/lisp/calc/calc-mtx.el +++ b/lisp/calc/calc-mtx.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el index c472b3cb9be..21318deede4 100644 --- a/lisp/calc/calc-poly.el +++ b/lisp/calc/calc-poly.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-prog.el b/lisp/calc/calc-prog.el index 976c2a7cf1e..3ea68584b4b 100644 --- a/lisp/calc/calc-prog.el +++ b/lisp/calc/calc-prog.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -930,7 +930,7 @@ (def (or (assq key (calc-user-key-map)) (assq (upcase key) (calc-user-key-map)) (assq (downcase key) (calc-user-key-map)) - (and (eq key ?\') + (and (eq key ?\') (cons nil (intern (completing-read (format "Record in %s the function: " diff --git a/lisp/calc/calc-rewr.el b/lisp/calc/calc-rewr.el index 02a92a2721d..21553ed0ddb 100644 --- a/lisp/calc/calc-rewr.el +++ b/lisp/calc/calc-rewr.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -1442,14 +1442,14 @@ btrack nil) (aset regs 0 expr) (while pc - + (and tracing (progn (terpri) (princ (car pc)) (if (and (natnump (nth 1 (car pc))) (< (nth 1 (car pc)) (length regs))) (princ (format "\n part = %s" (aref regs (nth 1 (car pc)))))))) - + (cond ((eq (setq op (car (setq inst (car pc)))) 'func) (if (and (consp (setq part (aref regs (car (cdr inst))))) (eq (car part) @@ -1462,14 +1462,14 @@ (not (or inst part)))) (setq pc (cdr pc)) (math-rwfail))) - + ((eq op 'same) (if (or (equal (setq part (aref regs (nth 1 inst))) (setq mark (aref regs (nth 2 inst)))) (Math-equal part mark)) (setq pc (cdr pc)) (math-rwfail))) - + ((and (eq op 'try) calc-matrix-mode (not (eq calc-matrix-mode 'scalar)) @@ -1487,7 +1487,7 @@ (aset mark 1 (cdr part))) (aset mark 0 (cdr part)) (aset mark 2 0)) - + ((eq op 'try) (if (and (consp (setq part (aref regs (car (cdr inst))))) (memq (car part) (nth 2 inst)) @@ -1545,7 +1545,7 @@ (aset regs (nth 4 inst) part) (aset mark 2 3)) (math-rwfail)))) - + ((eq op 'try2) (setq part (nth 1 inst) ; try instr mark (nth 3 part) @@ -1588,7 +1588,7 @@ (car (aref mark 1))) ((eq op 3) (nth 5 part)) (t (aref mark 1))))) - + ((eq op 'select) (setq pc (cdr pc)) (if (and (consp (setq part (aref regs (nth 1 inst)))) @@ -1597,7 +1597,7 @@ (if math-rewrite-selections (math-rwfail) (aset regs (nth 2 inst) part)))) - + ((eq op 'same-neg) (if (or (equal (setq part (aref regs (nth 1 inst))) (setq mark (math-neg @@ -1605,7 +1605,7 @@ (Math-equal part mark)) (setq pc (cdr pc)) (math-rwfail))) - + ((eq op 'backtrack) (setq inst (car (car btrack)) ; "try" or "alt" instr pc (cdr (car btrack)) @@ -1676,7 +1676,7 @@ ((eq op 4) (setq btrack (cdr btrack))) (t (math-rwfail t)))) - + ((eq op 'integer) (if (Math-integerp (setq part (aref regs (nth 1 inst)))) (setq pc (cdr pc)) @@ -1686,7 +1686,7 @@ (if (Math-integerp part) (setq pc (cdr pc)) (math-rwfail))))) - + ((eq op 'real) (if (Math-realp (setq part (aref regs (nth 1 inst)))) (setq pc (cdr pc)) @@ -1696,7 +1696,7 @@ (if (Math-realp part) (setq pc (cdr pc)) (math-rwfail))))) - + ((eq op 'constant) (if (math-constp (setq part (aref regs (nth 1 inst)))) (setq pc (cdr pc)) @@ -1706,7 +1706,7 @@ (if (math-constp part) (setq pc (cdr pc)) (math-rwfail))))) - + ((eq op 'negative) (if (math-looks-negp (setq part (aref regs (nth 1 inst)))) (setq pc (cdr pc)) @@ -1716,7 +1716,7 @@ (if (math-looks-negp part) (setq pc (cdr pc)) (math-rwfail))))) - + ((eq op 'rel) (setq part (math-compare (aref regs (nth 1 inst)) (aref regs (nth 3 inst))) @@ -1741,7 +1741,7 @@ (memq part '(0 1)))) (setq pc (cdr pc)) (math-rwfail))) - + ((eq op 'func-def) (if (and (consp (setq part (aref regs (car (cdr inst))))) (eq (car part) @@ -1831,33 +1831,33 @@ (math-rwapply-replace-regs (nth 1 inst))))) (setq pc (cdr pc)) (math-rwfail))) - + ((eq op 'let) (aset regs (nth 1 inst) (math-rweval (math-normalize (math-rwapply-replace-regs (nth 2 inst))))) (setq pc (cdr pc))) - + ((eq op 'copy) (aset regs (nth 2 inst) (aref regs (nth 1 inst))) (setq pc (cdr pc))) - + ((eq op 'copy-neg) (aset regs (nth 2 inst) (math-rwapply-neg (aref regs (nth 1 inst)))) (setq pc (cdr pc))) - + ((eq op 'alt) (setq btrack (cons pc btrack) pc (nth 1 inst))) - + ((eq op 'end-alt) (while (and btrack (not (eq (car btrack) (nth 1 inst)))) (setq btrack (cdr btrack))) (setq btrack (cdr btrack) pc (cdr pc))) - + ((eq op 'done) (setq result (math-rwapply-replace-regs (nth 1 inst))) (if (or (and (eq (car-safe result) '+) @@ -1877,7 +1877,7 @@ (if part (math-rwapply-remember expr result)) (setq rules nil)) (setq pc nil)) - + (t (error "%s is not a valid rewrite opcode" op)))))) (setq rules (cdr rules))) result))) diff --git a/lisp/calc/calc-rules.el b/lisp/calc/calc-rules.el index a6bd75cb256..90abce22186 100644 --- a/lisp/calc/calc-rules.el +++ b/lisp/calc/calc-rules.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-sel.el b/lisp/calc/calc-sel.el index dbc2b07a192..07820a44b22 100644 --- a/lisp/calc/calc-sel.el +++ b/lisp/calc/calc-sel.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -50,7 +50,7 @@ (if once (progn (setq calc-keep-selection nil) (message "(Selection will apply to next command only)"))) - (calc-change-current-selection + (calc-change-current-selection (if found (if (and num (> (setq num (prefix-numeric-value num)) 0)) (progn @@ -113,7 +113,7 @@ (calc-prepare-selection) (let ((found (calc-find-selected-part)) (entry calc-selection-cache-entry)) - (calc-change-current-selection + (calc-change-current-selection (and found (let ((sel (nth 2 entry)) old index op) diff --git a/lisp/calc/calc-stat.el b/lisp/calc/calc-stat.el index 4bc167321d7..2f844969bdb 100644 --- a/lisp/calc/calc-stat.el +++ b/lisp/calc/calc-stat.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-store.el b/lisp/calc/calc-store.el index ddb75dff6bc..dadc2e45aba 100644 --- a/lisp/calc/calc-store.el +++ b/lisp/calc/calc-store.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-stuff.el b/lisp/calc/calc-stuff.el index 19edc38492f..33f8d964e67 100644 --- a/lisp/calc/calc-stuff.el +++ b/lisp/calc/calc-stuff.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -209,7 +209,7 @@ With a prefix, push that prefix as a number onto the stack." (defun calc-clean-num (num) (interactive "P") (calc-clean (- (if num - (prefix-numeric-value num) + (prefix-numeric-value num) (if (and (>= last-command-char ?0) (<= last-command-char ?9)) (- last-command-char ?0) diff --git a/lisp/calc/calc-trail.el b/lisp/calc/calc-trail.el index 5480b5c114c..ebea9a4868b 100644 --- a/lisp/calc/calc-trail.el +++ b/lisp/calc/calc-trail.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-undo.el b/lisp/calc/calc-undo.el index 4db7f8a9f94..a90a3e16680 100644 --- a/lisp/calc/calc-undo.el +++ b/lisp/calc/calc-undo.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-units.el b/lisp/calc/calc-units.el index 369e793d3d9..952606788e5 100644 --- a/lisp/calc/calc-units.el +++ b/lisp/calc/calc-units.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -63,12 +63,12 @@ ( tpt "in/72.27" "Point (TeX conventions)" ) ( Ang "1e-10 m" "Angstrom" ) ( mfi "mi+ft+in" "Miles + feet + inches" ) - + ;; Area ( hect "10000 m^2" "*Hectare" ) ( acre "mi^2 / 640" "Acre" ) ( b "1e-28 m^2" "Barn" ) - + ;; Volume ( l "1e-3 m^3" "*Liter" ) ( L "1e-3 m^3" "Liter" ) @@ -83,7 +83,7 @@ ( vol "tsp+tbsp+ozfl+cup+pt+qt+gal" "Gallons + ... + teaspoons" ) ( galC "4.54609 l" "Canadian Gallon" ) ( galUK "4.546092 l" "UK Gallon" ) - + ;; Time ( s nil "*Second" ) ( sec "s" "Second" ) @@ -99,8 +99,8 @@ ( mph "mi/hr" "*Miles per hour" ) ( kph "km/hr" "Kilometers per hour" ) ( knot "nmi/hr" "Knot" ) - ( c "2.99792458e8 m/s" "Speed of light" ) - + ( c "2.99792458e8 m/s" "Speed of light" ) + ;; Acceleration ( ga "9.80665 m/s^2" "*\"g\" acceleration" ) diff --git a/lisp/calc/calc-vec.el b/lisp/calc/calc-vec.el index 86a4c2bbcf0..9762eab7584 100644 --- a/lisp/calc/calc-vec.el +++ b/lisp/calc/calc-vec.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index c8afb087ef5..351a8ed2e5a 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -131,7 +131,7 @@ (defun calc-clean-newlines (s) (cond - + ;; Omit leading/trailing whitespace ((or (string-match "\\`[ \n\r]+\\([^\001]*\\)\\'" s) (string-match "\\`\\([^\001]*\\)[ \n\r]+\\'" s)) @@ -141,7 +141,7 @@ ((string-match "\\`\\(.*\\)[\n\r]+\\([^\001]*\\)\\'" s) (calc-clean-newlines (concat (math-match-substring s 1) "," (math-match-substring s 2)))) - + (t s))) diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el index 3c50a359465..6312b20919d 100644 --- a/lisp/calc/calc.el +++ b/lisp/calc/calc.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001, 2002 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; Keywords: convenience, extensions ;; Version: 2.02g @@ -146,57 +146,57 @@ ;; Subject: Re: fix for `Cannot open load file: calc-alg-3' ;; To: walters@debian.org ;; Date: Sat, 24 Nov 2001 21:44:21 +0000 (UTC) -;; +;; ;; Could you add logistic curve fitting to the current list? -;; +;; ;; (I guess the key binding for a logistic curve would have to be `s' ;; since a logistic curve is an `s' curve; both `l' and `L' are already ;; taken for logarithms.) -;; +;; ;; Here is the current list for curve fitting; -;; +;; ;; `1' ;; Linear or multilinear. a + b x + c y + d z. -;; +;; ;; `2-9' ;; Polynomials. a + b x + c x^2 + d x^3. -;; +;; ;; `e' ;; Exponential. a exp(b x) exp(c y). -;; +;; ;; `E' ;; Base-10 exponential. a 10^(b x) 10^(c y). -;; +;; ;; `x' ;; Exponential (alternate notation). exp(a + b x + c y). -;; +;; ;; `X' ;; Base-10 exponential (alternate). 10^(a + b x + c y). -;; +;; ;; `l' ;; Logarithmic. a + b ln(x) + c ln(y). -;; +;; ;; `L' ;; Base-10 logarithmic. a + b log10(x) + c log10(y). -;; +;; ;; `^' ;; General exponential. a b^x c^y. -;; +;; ;; `p' ;; Power law. a x^b y^c. -;; +;; ;; `q' ;; Quadratic. a + b (x-c)^2 + d (x-e)^2. -;; +;; ;; `g' ;; Gaussian. (a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2). -;; -;; +;; +;; ;; Logistic curves are used a great deal in ecology, and in predicting ;; human actions, such as use of different kinds of energy in a country ;; (wood, coal, oil, natural gas, etc.) or the number of scientific ;; papers a person publishes, or the number of movies made. -;; +;; ;; (The less information on which to base the curve, the higher the error ;; rate. Theodore Modis ran some Monte Carlo simulations and produced ;; what may be useful set of confidence levels for different amounts of @@ -645,17 +645,17 @@ scientific notation in calc-mode.") ;; The following modes use specially-formatted data. (put 'calc-mode 'mode-class 'special) (put 'calc-trail-mode 'mode-class 'special) - + ;; Define "inexact-result" as an e-lisp error symbol. (put 'inexact-result 'error-conditions '(error inexact-result calc-error)) (put 'inexact-result 'error-message "Calc internal error (inexact-result)") - + ;; Define "math-overflow" and "math-underflow" as e-lisp error symbols. (put 'math-overflow 'error-conditions '(error math-overflow calc-error)) (put 'math-overflow 'error-message "Floating-point overflow occurred") (put 'math-underflow 'error-conditions '(error math-underflow calc-error)) (put 'math-underflow 'error-message "Floating-point underflow occurred") - + (defconst calc-version "2.02g") (defconst calc-version-date "Mon Nov 19 2001") (defvar calc-trail-pointer nil) ; "Current" entry in trail buffer. @@ -848,7 +848,7 @@ scientific notation in calc-mode.") math-find-user-tokens math-read-expr-list math-read-exprs math-read-if math-read-token math-remove-dashes) - ("calc-misc" calc-Need-calc-misc + ("calc-misc" calc-Need-calc-misc calc-do-handle-whys calc-do-refresh calc-num-prefix-name calc-record-list calc-record-why calc-report-bug calc-roll-down-stack calc-roll-up-stack calc-temp-minibuffer-message calcFunc-floor @@ -3364,7 +3364,7 @@ Also looks for the equivalent TeX words, \\gets and \\evalto." (push (or input last-command-event) unread-command-events))) (defun calc-clear-unread-commands () - (if (featurep 'xemacs) + (if (featurep 'xemacs) (calc-emacs-type-lucid (setq unread-command-event nil)) (setq unread-command-events nil))) diff --git a/lisp/calc/calcalg2.el b/lisp/calc/calcalg2.el index 7eefc51af3c..9bde5fad57e 100644 --- a/lisp/calc/calcalg2.el +++ b/lisp/calc/calcalg2.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -1292,7 +1292,7 @@ (unwind-protect (let ((p math-integral-cache) cur-record) - (display-buffer (get-buffer-create "*Integral Cache*")) + (display-buffer (get-buffer-create "*Integral Cache*")) (set-buffer (get-buffer "*Integral Cache*")) (erase-buffer) (while p @@ -2116,7 +2116,7 @@ (setq t2 (math-simplify (math-sub (car t1) (math-mul high 2))) - t3 (math-simplify + t3 (math-simplify (math-sub (car t1) (math-mul low 2)))))) @@ -3095,7 +3095,7 @@ (mapcar (function (lambda (x) (cons 'vec (cdr x)))) solns) (mapcar (function (lambda (x) (cons 'vec x))) eqn-list))))) (math-normalize - (cons 'vec + (cons 'vec (if solns (mapcar (function (lambda (x) (cons 'calcFunc-eq x))) solns) (mapcar 'car eqn-list))))))) diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el index 9cbcb89b00f..4025e337ae1 100644 --- a/lisp/calc/calcalg3.el +++ b/lisp/calc/calcalg3.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. @@ -1314,7 +1314,7 @@ ;;; Open Romberg method; "qromo" in section 4.4. -(defun math-ninteg-romberg (func expr lo hi mode) +(defun math-ninteg-romberg (func expr lo hi mode) (let ((curh '(float 1 0)) (h nil) (s nil) diff --git a/lisp/calc/calccomp.el b/lisp/calc/calccomp.el index 3176c40e2a4..2379b2ff5fd 100644 --- a/lisp/calc/calccomp.el +++ b/lisp/calc/calccomp.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calc/calcsel2.el b/lisp/calc/calcsel2.el index eb3f1c8392e..25a5b529e6f 100644 --- a/lisp/calc/calcsel2.el +++ b/lisp/calc/calcsel2.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1990, 1991, 1992, 1993, 2001 Free Software Foundation, Inc. ;; Author: David Gillespie <daveg@synaptics.com> -;; Maintainers: D. Goel <deego@gnufans.org> +;; Maintainers: D. Goel <deego@gnufans.org> ;; Colin Walters <walters@debian.org> ;; This file is part of GNU Emacs. diff --git a/lisp/calendar/appt.el b/lisp/calendar/appt.el index 95eaeba07ba..c3f4d77fcae 100644 --- a/lisp/calendar/appt.el +++ b/lisp/calendar/appt.el @@ -34,36 +34,36 @@ ;;; And to many others for bug fixes and suggestions. ;;; ;;; -;;; This functions in this file will alert the user of a +;;; This functions in this file will alert the user of a ;;; pending appointment based on their diary file. ;;; ;;; A message will be displayed in the mode line of the Emacs buffer ;;; and (if you request) the terminal will beep and display a message -;;; from the diary in the mini-buffer, or you can choose to +;;; from the diary in the mini-buffer, or you can choose to ;;; have a message displayed in a new buffer. ;;; ;;; The variable `appt-message-warning-time' allows the -;;; user to specify how much notice they want before the appointment. The +;;; user to specify how much notice they want before the appointment. The ;;; variable `appt-issue-message' specifies whether the user wants ;;; to be notified of a pending appointment. -;;; +;;; ;;; In order to use the appt package, you only need ;;; to load it---provided you have appointments. ;;; ;;; Before that, you can also set some options if you want ;;; (setq view-diary-entries-initially t) ;;; (setq appt-issue-message t) -;;; +;;; ;;; This is an example of what can be in your diary file: ;;; Monday ;;; 9:30am Coffee break -;;; 12:00pm Lunch -;;; -;;; Based upon the above lines in your .emacs and diary files, +;;; 12:00pm Lunch +;;; +;;; Based upon the above lines in your .emacs and diary files, ;;; the calendar and diary will be displayed when you enter ;;; Emacs and your appointments list will automatically be created. ;;; You will then be reminded at 9:20am about your coffee break -;;; and at 11:50am to go to lunch. +;;; and at 11:50am to go to lunch. ;;; ;;; Use describe-function on appt-check for a description of other variables ;;; that can be used to personalize the notification system. @@ -146,7 +146,7 @@ as the first thing on a line." ;;;###autoload (defcustom appt-display-diary t - "*Non-nil means to display the next days diary on the screen. + "*Non-nil means to display the next days diary on the screen. This will occur at midnight when the appointment list is updated." :type 'boolean :group 'appt) @@ -164,13 +164,13 @@ The number before each time/message is the time in minutes from midnight.") "*Number of minutes to wait between checking the appointment list." :type 'integer :group 'appt) - + (defvar appt-buffer-name " *appt-buf*" "Name of the appointments buffer.") - + (defvar appt-disp-window-function 'appt-disp-window "Function called to display appointment window.") - + (defvar appt-delete-window-function 'appt-delete-window "Function called to remove appointment window and buffer.") @@ -192,11 +192,11 @@ Note: the time must be the first thing in the line in the diary for a warning to be issued. The format of the time can be either 24 hour or am/pm. -Example: +Example: 02/23/89 18:00 Dinner - + Thursday 11:45am Lunch meeting. @@ -231,7 +231,7 @@ The following variables control appointment notification: Function called to display appointment window. You can customize appt.el by setting this variable to a function different from the one provided with this package. - + `appt-delete-window-function' Function called to remove appointment window and buffer. You can customize appt.el by setting this variable to a function different @@ -264,7 +264,7 @@ The following variables control appointment notification: (cur-min (nth 1 now)) (cur-comp-time (+ (* cur-hour 60) cur-min))) - ;; At the first check in any given day, update our + ;; At the first check in any given day, update our ;; appointments to today's list. (if (or (null appt-prev-comp-time) @@ -290,11 +290,11 @@ The following variables control appointment notification: (let ((appt-comp-time (car (car (car appt-time-msg-list))))) (setq min-to-app (- appt-comp-time cur-comp-time)) - (while (and appt-time-msg-list + (while (and appt-time-msg-list (< appt-comp-time cur-comp-time)) - (setq appt-time-msg-list (cdr appt-time-msg-list)) + (setq appt-time-msg-list (cdr appt-time-msg-list)) (if appt-time-msg-list - (setq appt-comp-time + (setq appt-comp-time (car (car (car appt-time-msg-list)))))) ;; If we have an appointment between midnight and @@ -302,8 +302,8 @@ The following variables control appointment notification: ;; we must begin to issue a message before midnight. ;; Midnight is considered 0 minutes and 11:59pm is ;; 1439 minutes. Therefore we must recalculate the minutes - ;; to appointment variable. It is equal to the number of - ;; minutes before midnight plus the number of + ;; to appointment variable. It is equal to the number of + ;; minutes before midnight plus the number of ;; minutes after midnight our appointment is. (if (and (< appt-comp-time appt-message-warning-time) @@ -312,7 +312,7 @@ The following variables control appointment notification: (setq min-to-app (+ (- (1+ appt-max-time) cur-comp-time)) appt-comp-time)) - ;; issue warning if the appointment time is + ;; issue warning if the appointment time is ;; within appt-message-warning time (when (and (<= min-to-app appt-message-warning-time) @@ -337,7 +337,7 @@ The following variables control appointment notification: ;;; else (if appt-visible - (message "%s" + (message "%s" (car (cdr (car appt-time-msg-list))))) (if appt-audible @@ -379,11 +379,11 @@ The following variables control appointment notification: ;; before splitting the window. (if (equal (selected-window) (minibuffer-window)) - (if (other-window 1) + (if (other-window 1) (select-window (other-window 1)) (if (display-multi-frame-p) (select-frame (other-frame 1))))) - + (let* ((this-buffer (current-buffer)) (this-window (selected-window)) (appt-disp-buf (set-buffer (get-buffer-create appt-buffer-name)))) @@ -397,7 +397,7 @@ The following variables control appointment notification: (appt-select-lowest-window) (split-window)) (pop-to-buffer appt-disp-buf)) - (setq mode-line-format + (setq mode-line-format (concat "-------------------- Appointment in " min-to-app " minutes. " new-time " %-")) (erase-buffer) @@ -408,7 +408,7 @@ The following variables control appointment notification: (select-window this-window) (if appt-audible (beep 1)))) - + (defun appt-delete-window () "Function called to undisplay appointment messages. Usually just deletes the appointment buffer." @@ -440,12 +440,12 @@ The time should be in either 24 hour format or am/pm format." (if (string-match "[0-9]?[0-9]:[0-9][0-9]\\(am\\|pm\\)?" new-appt-time) nil (error "Unacceptable time-string")) - + (let* ((appt-time-string (concat new-appt-time " " new-appt-msg)) (appt-time (list (appt-convert-time new-appt-time))) (time-msg (cons appt-time (list appt-time-string)))) (setq appt-time-msg-list (nconc appt-time-msg-list (list time-msg))) - (setq appt-time-msg-list (appt-sort-list appt-time-msg-list)))) + (setq appt-time-msg-list (appt-sort-list appt-time-msg-list)))) ;;;###autoload (defun appt-delete () @@ -454,13 +454,13 @@ The time should be in either 24 hour format or am/pm format." (let* ((tmp-msg-list appt-time-msg-list)) (while tmp-msg-list (let* ((element (car tmp-msg-list)) - (prompt-string (concat "Delete " + (prompt-string (concat "Delete " ;; We want to quote any doublequotes ;; in the string, as well as put ;; doublequotes around it. (prin1-to-string (substring-no-properties - (car (cdr element)) 0)) + (car (cdr element)) 0)) " from list? ")) (test-input (y-or-n-p prompt-string))) (setq tmp-msg-list (cdr tmp-msg-list)) @@ -468,7 +468,7 @@ The time should be in either 24 hour format or am/pm format." (setq appt-time-msg-list (delq element appt-time-msg-list))))) (appt-check) (message ""))) - + (eval-when-compile (defvar number) (defvar original-date) @@ -502,7 +502,7 @@ They specify the range of dates that the diary is being processed for." (if diary-entries-list ;; Cycle through the entry-list (diary-entries-list) - ;; looking for entries beginning with a time. If + ;; looking for entries beginning with a time. If ;; the entry begins with a time, add it to the ;; appt-time-msg-list. Then sort the list. @@ -514,8 +514,8 @@ They specify the range of dates that the diary is being processed for." (car entry-list) (list (calendar-current-date)))) (setq entry-list (cdr entry-list))) ;; Parse the entries for today. - (while (and entry-list - (calendar-date-equal + (while (and entry-list + (calendar-date-equal (calendar-current-date) (car (car entry-list)))) (let ((time-string (cadr (car entry-list)))) (while (string-match @@ -559,10 +559,10 @@ They specify the range of dates that the diary is being processed for." (appt-comp-time (car (car (car appt-time-msg-list))))) (while (and appt-time-msg-list (< appt-comp-time cur-comp-time)) - (setq appt-time-msg-list (cdr appt-time-msg-list)) + (setq appt-time-msg-list (cdr appt-time-msg-list)) (if appt-time-msg-list (setq appt-comp-time (car (car (car appt-time-msg-list)))))))))) - + (defun appt-sort-list (appt-list) "Simple sort to put the appointments list APPT-LIST in order. @@ -593,24 +593,24 @@ it from the original list." (min 0)) (string-match ":\\([0-9][0-9]\\)" time2conv) - (setq min (string-to-int + (setq min (string-to-int (match-string 1 time2conv))) - + (string-match "[0-9]?[0-9]:" time2conv) - (setq hr (string-to-int + (setq hr (string-to-int (match-string 0 time2conv))) - + ;; convert the time appointment time into 24 hour time - + (cond ((and (string-match "pm" time2conv) (< hr 12)) (setq hr (+ 12 hr))) ((and (string-match "am" time2conv) (= hr 12)) (setq hr 0))) - + ;; convert the actual time ;; into minutes for comparison ;; against the actual time. - + (setq conv-time (+ (* hr 60) min)) conv-time)) diff --git a/lisp/calendar/cal-china.el b/lisp/calendar/cal-china.el index 473db48e09d..968926ce58a 100644 --- a/lisp/calendar/cal-china.el +++ b/lisp/calendar/cal-china.el @@ -57,7 +57,7 @@ (defvar chinese-calendar-terrestrial-branch ["Zi" "Chou" "Yin" "Mao" "Chen" "Si" "Wu" "Wei" "Shen" "You" "Xu" "Hai"]) -(defcustom chinese-calendar-time-zone +(defcustom chinese-calendar-time-zone '(if (< year 1928) (+ 465 (/ 40.0 60.0)) 480) diff --git a/lisp/calendar/cal-coptic.el b/lisp/calendar/cal-coptic.el index 282facef138..37d45c7ce4c 100644 --- a/lisp/calendar/cal-coptic.el +++ b/lisp/calendar/cal-coptic.el @@ -77,7 +77,7 @@ Gregorian date Sunday, December 31, 1 BC." (/ year 4) ;; Leap days in prior years (* 30 (1- month)) ;; Days in prior months this year day))) ;; Days so far this month - + (defun calendar-coptic-from-absolute (date) "Compute the Coptic equivalent for absolute date DATE. diff --git a/lisp/calendar/cal-dst.el b/lisp/calendar/cal-dst.el index f7f28be988e..2c6c2a30335 100644 --- a/lisp/calendar/cal-dst.el +++ b/lisp/calendar/cal-dst.el @@ -278,7 +278,7 @@ example, -300 for New York City, -480 for Los Angeles.") (defvar calendar-daylight-time-offset (or (car (cdr calendar-current-time-zone-cache)) 60) "*Number of minutes difference between daylight savings and standard time. - + If the locale never uses daylight savings time, set this to 0.") (defvar calendar-standard-time-zone-name @@ -290,7 +290,7 @@ For example, \"EST\" in New York City, \"PST\" for Los Angeles.") (or (car (nthcdr 3 calendar-current-time-zone-cache)) "EDT") "*Abbreviated name of daylight-savings time zone at `calendar-location-name'. For example, \"EDT\" in New York City, \"PDT\" for Los Angeles.") - + ;;;###autoload (put 'calendar-daylight-savings-starts 'risky-local-variable t) (defvar calendar-daylight-savings-starts @@ -331,11 +331,11 @@ For example, if daylight savings time ends on the last Sunday in October: '(calendar-nth-named-day -1 0 10 year) If the locale never uses daylight savings time, set this to nil.") - + (defvar calendar-daylight-savings-starts-time (or (car (nthcdr 6 calendar-current-time-zone-cache)) 120) "*Number of minutes after midnight that daylight savings time starts.") - + (defvar calendar-daylight-savings-ends-time (or (car (nthcdr 7 calendar-current-time-zone-cache)) calendar-daylight-savings-starts-time) diff --git a/lisp/calendar/cal-hebrew.el b/lisp/calendar/cal-hebrew.el index 4d68a75b476..29abaebb9b4 100644 --- a/lisp/calendar/cal-hebrew.el +++ b/lisp/calendar/cal-hebrew.el @@ -115,9 +115,9 @@ Gregorian date Sunday, December 31, 1 BC." day))) (if ;; If Rosh HaShanah would occur on Sunday, Wednesday, or Friday (memq (% alternative-day 7) (list 0 3 5)) - ;; Then postpone it one (more) day and return + ;; Then postpone it one (more) day and return (1+ alternative-day) - ;; Else return + ;; Else return alternative-day))) (defun hebrew-calendar-days-in-year (year) @@ -316,7 +316,7 @@ nil if it is not visible in the current calendar window." (list (calendar-gregorian-from-absolute (+ abs-r-h 22)) "Simchat Torah"))) (optional - (list + (list (list (calendar-gregorian-from-absolute (calendar-dayname-on-or-before 6 (- abs-r-h 4))) "Selichot (night)") @@ -350,7 +350,7 @@ nil if it is not visible in the current calendar window." (filter-visible-calendar-holidays mandatory))) (if all-hebrew-calendar-holidays (setq output-list - (append + (append (filter-visible-calendar-holidays optional) output-list))) output-list))) @@ -401,7 +401,7 @@ nil if it is not visible in the current calendar window." (list (calendar-gregorian-from-absolute (+ abs-p 50)) "Shavuot"))) (optional - (list + (list (list (calendar-gregorian-from-absolute (calendar-dayname-on-or-before 6 (- abs-p 43))) "Shabbat Shekalim") @@ -467,7 +467,7 @@ nil if it is not visible in the current calendar window." (filter-visible-calendar-holidays mandatory))) (if all-hebrew-calendar-holidays (setq output-list - (append + (append (filter-visible-calendar-holidays optional) output-list))) output-list))) @@ -481,7 +481,7 @@ nil if it is not visible in the current calendar window." (list 5 9 (+ displayed-year 3760))))) (filter-visible-calendar-holidays - (list + (list (list (calendar-gregorian-from-absolute (if (= (% abs-t-a 7) 6) (- abs-t-a 20) (- abs-t-a 21))) "Tzom Tammuz") @@ -513,7 +513,7 @@ not be marked in the calendar. This function is provided for use with the (mark (regexp-quote diary-nonmarking-symbol))) (calendar-for-loop i from 1 to number do (let* ((d diary-date-forms) - (hdate (calendar-hebrew-from-absolute + (hdate (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian gdate))) (month (extract-calendar-month hdate)) (day (extract-calendar-day hdate)) @@ -683,7 +683,7 @@ is provided for use as part of the nongregorian-diary-marking-hook." (setq mm 0) (setq mm - (cdr + (cdr (assoc-ignore-case mm-name (calendar-make-alist @@ -775,7 +775,7 @@ Prefix arg will make the entry nonmarking." (make-diary-entry (concat hebrew-diary-entry-symbol - (calendar-date-string + (calendar-date-string (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian (calendar-cursor-to-date t))) @@ -794,7 +794,7 @@ Prefix arg will make the entry nonmarking." (make-diary-entry (concat hebrew-diary-entry-symbol - (calendar-date-string + (calendar-date-string (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian (calendar-cursor-to-date t))))) @@ -814,7 +814,7 @@ Prefix arg will make the entry nonmarking." (make-diary-entry (concat hebrew-diary-entry-symbol - (calendar-date-string + (calendar-date-string (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian (calendar-cursor-to-date t))))) @@ -900,7 +900,7 @@ from the cursor position." "Omer count diary entry. Entry applies if date is within 50 days after Passover. -An optional parameter MARK specifies a face or single-character string to +An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." (let* ((passover (calendar-absolute-from-hebrew @@ -909,7 +909,7 @@ use when highlighting the day in the calendar." (week (/ omer 7)) (day (% omer 7))) (if (and (> omer 0) (< omer 50)) - (cons mark + (cons mark (format "Day %d%s of the omer (until sunset)" omer (if (zerop week) @@ -930,7 +930,7 @@ although the date of death is specified by the civil calendar, the proper Hebrew calendar yahrzeit is determined. If `european-calendar-style' is t, the order of the parameters is changed to DEATH-DAY, DEATH-MONTH, DEATH-YEAR. -An optional parameter MARK specifies a face or single-character string to +An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." (let* ((h-date (calendar-hebrew-from-absolute (calendar-absolute-from-gregorian @@ -959,7 +959,7 @@ use when highlighting the day in the calendar." "Rosh Hodesh diary entry. Entry applies if date is Rosh Hodesh, the day before, or the Saturday before. -An optional parameter MARK specifies a face or single-character string to +An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." (let* ((d (calendar-absolute-from-gregorian date)) (h-date (calendar-hebrew-from-absolute d)) @@ -976,7 +976,7 @@ use when highlighting the day in the calendar." (h-yesterday (extract-calendar-day (calendar-hebrew-from-absolute (1- d))))) (if (or (= h-day 30) (and (= h-day 1) (/= h-month 7))) - (cons mark + (cons mark (format "Rosh Hodesh %s" (if (= h-day 30) @@ -990,7 +990,7 @@ use when highlighting the day in the calendar." (format "%s (second day)" this-month) this-month)))) (if (= (% d 7) 6) ;; Saturday--check for Shabbat Mevarchim - (cons mark + (cons mark (cond ((and (> h-day 22) (/= h-month 6) (= 29 last-day)) (format "Mevarchim Rosh Hodesh %s (%s)" (aref h-month-names @@ -1019,7 +1019,7 @@ use when highlighting the day in the calendar." (defun diary-parasha (&optional mark) "Parasha diary entry--entry applies if date is a Saturday. -An optional parameter MARK specifies a face or single-character string to +An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." (let ((d (calendar-absolute-from-gregorian date))) (if (= (% d 7) 6) ;; Saturday diff --git a/lisp/calendar/cal-islam.el b/lisp/calendar/cal-islam.el index ecb8aae691a..9ca2861e6b7 100644 --- a/lisp/calendar/cal-islam.el +++ b/lisp/calendar/cal-islam.el @@ -209,7 +209,7 @@ not be marked in the calendar. This function is provided for use with the (mark (regexp-quote diary-nonmarking-symbol))) (calendar-for-loop i from 1 to number do (let* ((d diary-date-forms) - (idate (calendar-islamic-from-absolute + (idate (calendar-islamic-from-absolute (calendar-absolute-from-gregorian gdate))) (month (extract-calendar-month idate)) (day (extract-calendar-day idate)) @@ -450,7 +450,7 @@ Prefix arg will make the entry nonmarking." (make-diary-entry (concat islamic-diary-entry-symbol - (calendar-date-string + (calendar-date-string (calendar-islamic-from-absolute (calendar-absolute-from-gregorian (calendar-cursor-to-date t))) @@ -468,7 +468,7 @@ Prefix arg will make the entry nonmarking." (make-diary-entry (concat islamic-diary-entry-symbol - (calendar-date-string + (calendar-date-string (calendar-islamic-from-absolute (calendar-absolute-from-gregorian (calendar-cursor-to-date t))))) @@ -487,7 +487,7 @@ Prefix arg will make the entry nonmarking." (make-diary-entry (concat islamic-diary-entry-symbol - (calendar-date-string + (calendar-date-string (calendar-islamic-from-absolute (calendar-absolute-from-gregorian (calendar-cursor-to-date t))))) diff --git a/lisp/calendar/cal-iso.el b/lisp/calendar/cal-iso.el index 12598f1547c..97c9cbeee62 100644 --- a/lisp/calendar/cal-iso.el +++ b/lisp/calendar/cal-iso.el @@ -81,7 +81,7 @@ date Sunday, December 31, 1 BC." (defun calendar-iso-date-string (&optional date) "String of ISO date of Gregorian DATE. Defaults to today's date if DATE is not given." - (let* ((d (calendar-absolute-from-gregorian + (let* ((d (calendar-absolute-from-gregorian (or date (calendar-current-date)))) (day (% d 7)) (iso-date (calendar-iso-from-absolute d))) diff --git a/lisp/calendar/cal-julian.el b/lisp/calendar/cal-julian.el index b409145fe35..830a1df143b 100644 --- a/lisp/calendar/cal-julian.el +++ b/lisp/calendar/cal-julian.el @@ -118,14 +118,14 @@ Driven by the variable `calendar-date-display-form'." (mapcar 'list (append month-array nil)) nil t) (calendar-make-alist month-array 1)))) - (last + (last (if (and (zerop (% year 4)) (= month 2)) 29 (aref [31 28 31 30 31 30 31 31 30 31 30 31] (1- month)))) (day (calendar-read (format "Julian calendar day (%d-%d): " (if (and (= year 1) (= month 1)) 3 1) last) - '(lambda (x) + '(lambda (x) (and (< (if (and (= year 1) (= month 1)) 2 0) x) (<= x last)))))) (list (list month day year)))) diff --git a/lisp/calendar/cal-mayan.el b/lisp/calendar/cal-mayan.el index 34401ab548b..b19d3fac014 100644 --- a/lisp/calendar/cal-mayan.el +++ b/lisp/calendar/cal-mayan.el @@ -137,7 +137,7 @@ but some use 1137140. Using 1232041 gives you Spinden's correlation; using 365))) (defun calendar-next-haab-date (haab-date &optional noecho) - "Move cursor to next instance of Mayan HAAB-DATE. + "Move cursor to next instance of Mayan HAAB-DATE. Echo Mayan date if NOECHO is t." (interactive (list (calendar-read-mayan-haab-date))) (calendar-goto-date @@ -149,7 +149,7 @@ Echo Mayan date if NOECHO is t." (or noecho (calendar-print-mayan-date))) (defun calendar-previous-haab-date (haab-date &optional noecho) - "Move cursor to previous instance of Mayan HAAB-DATE. + "Move cursor to previous instance of Mayan HAAB-DATE. Echo Mayan date if NOECHO is t." (interactive (list (calendar-read-mayan-haab-date))) (calendar-goto-date @@ -199,7 +199,7 @@ Echo Mayan date if NOECHO is t." 260))) (defun calendar-next-tzolkin-date (tzolkin-date &optional noecho) - "Move cursor to next instance of Mayan TZOLKIN-DATE. + "Move cursor to next instance of Mayan TZOLKIN-DATE. Echo Mayan date if NOECHO is t." (interactive (list (calendar-read-mayan-tzolkin-date))) (calendar-goto-date @@ -211,7 +211,7 @@ Echo Mayan date if NOECHO is t." (or noecho (calendar-print-mayan-date))) (defun calendar-previous-tzolkin-date (tzolkin-date &optional noecho) - "Move cursor to previous instance of Mayan TZOLKIN-DATE. + "Move cursor to previous instance of Mayan TZOLKIN-DATE. Echo Mayan date if NOECHO is t." (interactive (list (calendar-read-mayan-tzolkin-date))) (calendar-goto-date @@ -230,7 +230,7 @@ Echo Mayan date if NOECHO is t." (defun calendar-mayan-tzolkin-haab-on-or-before (tzolkin-date haab-date date) "Absolute date that is Mayan TZOLKIN-DATE and HAAB-DATE. Latest such date on or before DATE. -Returns nil if such a tzolkin-haab combination is impossible." +Returns nil if such a tzolkin-haab combination is impossible." (let* ((haab-difference (calendar-mayan-haab-difference (calendar-mayan-haab-from-absolute 0) @@ -253,7 +253,7 @@ Returns nil if such a tzolkin-haab combination is impossible." (haab-day (calendar-read "Haab kin (0-19): " '(lambda (x) (and (>= x 0) (< x 20))))) - (haab-month-list (append calendar-mayan-haab-month-name-array + (haab-month-list (append calendar-mayan-haab-month-name-array (and (< haab-day 5) '("Uayeb")))) (haab-month (cdr (assoc-ignore-case @@ -272,7 +272,7 @@ Returns nil if such a tzolkin-haab combination is impossible." (tzolkin-name-list (append calendar-mayan-tzolkin-names-array nil)) (tzolkin-name (cdr (assoc-ignore-case - (completing-read "Tzolkin uinal: " + (completing-read "Tzolkin uinal: " (mapcar 'list tzolkin-name-list) nil t) (calendar-make-alist tzolkin-name-list 1))))) @@ -326,7 +326,7 @@ Long count is a list (baktun katun tun uinal kin)" (defun calendar-mayan-date-string (&optional date) "String of Mayan date of Gregorian DATE. Defaults to today's date if DATE is not given." - (let* ((d (calendar-absolute-from-gregorian + (let* ((d (calendar-absolute-from-gregorian (or date (calendar-current-date)))) (tzolkin (calendar-mayan-tzolkin-from-absolute d)) (haab (calendar-mayan-haab-from-absolute d)) @@ -348,7 +348,7 @@ Defaults to today's date if DATE is not given." (let (lc) (while (not lc) (let ((datum - (calendar-string-to-mayan-long-count + (calendar-string-to-mayan-long-count (read-string "Mayan long count (baktun.katun.tun.uinal.kin): " (calendar-mayan-long-count-to-string (calendar-mayan-long-count-from-absolute @@ -361,7 +361,7 @@ Defaults to today's date if DATE is not given." (calendar-gregorian-from-absolute (calendar-absolute-from-mayan-long-count date))) (or noecho (calendar-print-mayan-date))) - + (defun calendar-mayan-long-count-common-era (lc) "T if long count represents date in the Common Era." (let ((base (calendar-mayan-long-count-from-absolute 1))) diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el index cbfcef69cca..cae09805e9d 100644 --- a/lisp/calendar/cal-tex.el +++ b/lisp/calendar/cal-tex.el @@ -48,7 +48,7 @@ (autoload 'calendar-iso-from-absolute "cal-iso" nil t) ;;; -;;; Customizable variables +;;; Customizable variables ;;; (defcustom cal-tex-which-days '(0 1 2 3 4 5 6) @@ -153,9 +153,9 @@ characters with diacritical marks to their LaTeX equivalents, use ;;; (defvar cal-tex-day-prefix "\\caldate{%s}{%s}" - "The initial LaTeX code for a day. + "The initial LaTeX code for a day. The holidays, diary entries, bottom string, and the text follow.") - + (defvar cal-tex-day-name-format "\\myday{%s}%%" "The format for LaTeX code for a day name. The names are taken from calendar-day-name-array.") @@ -164,7 +164,7 @@ calendar-day-name-array.") "\\def\\calmonth#1#2% {\\begin{center}% \\Huge\\bf\\uppercase{#1} #2 \\\\[1cm]% -\\end{center}}% +\\end{center}}% \\vspace*{-1.5cm}% % " @@ -174,7 +174,7 @@ calendar-day-name-array.") "\\def\\calmonth#1#2#3#4% {\\begin{center}% \\Huge\\bf #1 #2---#3 #4\\\\[1cm]% -\\end{center}}% +\\end{center}}% \\vspace*{-1.5cm}% % " @@ -517,7 +517,7 @@ Calendar is condensed onto one page." (cal-tex-end-document))) (run-hooks 'cal-tex-hook)) -(defun cal-tex-insert-days (month year diary-list holidays day-format) +(defun cal-tex-insert-days (month year diary-list holidays day-format) "Insert LaTeX commands for a range of days in monthly calendars. LaTeX commands are inserted for the days of the MONTH in YEAR. Diary entries on DIARY-LIST are included. Holidays on HOLIDAYS are included. @@ -532,7 +532,7 @@ Each day is formatted using format DAY-FORMAT." (calendar-for-loop i from 1 to last do (setq date (list month i year)) (if (memq (calendar-day-of-week date) cal-tex-which-days) - (progn + (progn (insert (format day-format (cal-tex-month-name month) i)) (cal-tex-arg (cal-tex-latexify-list diary-list date)) (cal-tex-arg (cal-tex-latexify-list holidays date)) @@ -549,21 +549,21 @@ Each day is formatted using format DAY-FORMAT." "Insert the names of the days at top of a monthly calendar." (calendar-for-loop i from 0 to 6 do (if (memq i cal-tex-which-days) - (insert (format cal-tex-day-name-format + (insert (format cal-tex-day-name-format (cal-tex-LaTeXify-string - (aref calendar-day-name-array + (aref calendar-day-name-array (mod (+ calendar-week-start-day i) 7)))))) (cal-tex-comment))) (defun cal-tex-insert-month-header (n month year end-month end-year) "Create a title for a calendar. -A title is inserted for a calendar with N months starting with +A title is inserted for a calendar with N months starting with MONTH YEAR and ending with END-MONTH END-YEAR." (let ((month-name (cal-tex-month-name month)) (end-month-name (cal-tex-month-name end-month))) (if (= 1 n) (insert (format "\\calmonth{%s}{%s}\n\\vspace*{-0.5cm}" - month-name year) ) + month-name year) ) (insert (format "\\calmonth{%s}{%s}{%s}{%s}\n\\vspace*{-0.5cm}" month-name year end-month-name end-year)))) (cal-tex-comment)) @@ -579,7 +579,7 @@ blank, no days are inserted." (- (calendar-day-of-week (list month 1 year)) calendar-week-start-day) 7))) - (calendar-for-loop i from 0 to (1- blank-days) do + (calendar-for-loop i from 0 to (1- blank-days) do (if (memq i cal-tex-which-days) (insert (format day-format " " " ") "{}{}{}{}%\n")))))) @@ -594,7 +594,7 @@ The entry is formatted using DAY-FORMAT." (- (calendar-day-of-week (list month last-day year)) calendar-week-start-day) 7))) - (calendar-for-loop i from (1+ blank-days) to 6 do + (calendar-for-loop i from (1+ blank-days) to 6 do (if (memq i cal-tex-which-days) (insert (format day-format "" "") "{}{}{}{}%\n")))))) @@ -631,8 +631,8 @@ in the calendar starting in MONTH YEAR." (defun cal-tex-number-weeks (month year n) "Determine the number of weeks in a range of dates. -Compute the number of weeks in the calendar starting with MONTH and YEAR, -and lasting N months, including only the days in WHICH-DAYS. As it stands, +Compute the number of weeks in the calendar starting with MONTH and YEAR, +and lasting N months, including only the days in WHICH-DAYS. As it stands, this is only an upper bound." (let ((d (list month 1 year))) (increment-calendar-month month year (1- n)) @@ -687,7 +687,7 @@ Holidays are included if `cal-tex-holidays' is t." (cal-tex-e-center) (cal-tex-hspace "-.2in") (cal-tex-b-parbox "l" "7in") - (calendar-for-loop j from 1 to 7 do + (calendar-for-loop j from 1 to 7 do (cal-tex-week-hours date holidays "3.1") (setq date (cal-tex-incr-date date))) (cal-tex-e-parbox) @@ -739,7 +739,7 @@ Holidays are included if `cal-tex-holidays' is t." (cal-tex-e-center) (cal-tex-hspace "-.2in") (cal-tex-b-parbox "l" "\\textwidth") - (calendar-for-loop j from 1 to 3 do + (calendar-for-loop j from 1 to 3 do (cal-tex-week-hours date holidays "5") (setq date (cal-tex-incr-date date))) (cal-tex-e-parbox) @@ -767,7 +767,7 @@ Holidays are included if `cal-tex-holidays' is t." (insert "}") (cal-tex-nl) (cal-tex-b-parbox "l" "\\textwidth") - (calendar-for-loop j from 4 to 7 do + (calendar-for-loop j from 4 to 7 do (cal-tex-week-hours date holidays "5") (setq date (cal-tex-incr-date date))) (cal-tex-e-parbox) @@ -825,7 +825,7 @@ Holidays are included if `cal-tex-holidays' is t." (cal-tex-nl ".5cm") (cal-tex-e-center) (cal-tex-b-parbox "l" "\\textwidth") - (calendar-for-loop j from 1 to 7 do + (calendar-for-loop j from 1 to 7 do (cal-tex-b-parbox "t" "\\textwidth") (cal-tex-b-parbox "t" "\\textwidth") (cal-tex-rule "0pt" "\\textwidth" ".2mm") @@ -870,13 +870,13 @@ Holidays are included if `cal-tex-holidays' is t." (cal-tex-end-document) (run-hooks 'cal-tex-hook))) -(defvar cal-tex-LaTeX-hourbox +(defvar cal-tex-LaTeX-hourbox "\\newcommand{\\hourbox}[2]% {\\makebox[2em]{\\rule{0cm}{#2ex}#1}\\rule{3in}{.15mm}}\n" "One hour and a line on the right.") (defun cal-tex-week-hours (date holidays height) - "Insert hourly entries for DATE with HOLIDAYS, with line height HEIGHT." + "Insert hourly entries for DATE with HOLIDAYS, with line height HEIGHT." (let ((month (extract-calendar-month date)) (day (extract-calendar-day date)) (year (extract-calendar-year date)) @@ -971,14 +971,14 @@ Holidays are included if `cal-tex-holidays' is t." (calendar-for-loop i from 8 to 12 do (insert (format "{\\large\\sf %d}\\\\\n" i))) (calendar-for-loop i from 1 to 5 do - (insert (format "{\\large\\sf %d}\\\\\n" + (insert (format "{\\large\\sf %d}\\\\\n" (if cal-tex-24 (+ i 12) i)))))) (cal-tex-nl ".5cm") (if weekend (progn (cal-tex-vspace "1cm") (insert "\\ \\vfill") - (insert (format "{\\Large\\bf %s,} %s/%s/%s\\\\\n" + (insert (format "{\\Large\\bf %s,} %s/%s/%s\\\\\n" dayname1 month1 day1 year1)) (cal-tex-rule "0pt" "7.5cm" ".5mm") (cal-tex-nl "1.5cm") @@ -1070,7 +1070,7 @@ Holidays are included if `cal-tex-holidays' is t." (cal-tex-month-name (extract-calendar-month d)) (extract-calendar-year d)))))) (insert "%\n") - (calendar-for-loop j from 1 to 7 do + (calendar-for-loop j from 1 to 7 do (if (= (mod i 2) 1) (insert "\\rightday") (insert "\\leftday")) @@ -1091,7 +1091,7 @@ Holidays are included if `cal-tex-holidays' is t." (defun cal-tex-cursor-filofax-week (&optional arg) "One-week-at-a-glance Filofax style calendar for week indicated by cursor. Optional prefix argument specifies number of weeks. -Weeks start on Monday. +Weeks start on Monday. Diary entries are included if `cal-tex-diary' is t. Holidays are included if `cal-tex-holidays' is t." (interactive "p") @@ -1179,7 +1179,7 @@ Holidays are included if `cal-tex-holidays' is t." (cal-tex-month-name (extract-calendar-month d)) (extract-calendar-year d)))))) (insert "%\n") - (calendar-for-loop j from 1 to 3 do + (calendar-for-loop j from 1 to 3 do (insert "\\leftday") (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date))) (cal-tex-arg (int-to-string (extract-calendar-day date))) @@ -1214,7 +1214,7 @@ Holidays are included if `cal-tex-holidays' is t." (cal-tex-month-name (extract-calendar-month d)) (extract-calendar-year d)))))) (insert "%\n") - (calendar-for-loop j from 1 to 2 do + (calendar-for-loop j from 1 to 2 do (insert "\\rightday") (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date))) (cal-tex-arg (int-to-string (extract-calendar-day date))) @@ -1223,7 +1223,7 @@ Holidays are included if `cal-tex-holidays' is t." (cal-tex-arg (eval cal-tex-daily-string)) (insert "%\n") (setq date (cal-tex-incr-date date))) - (calendar-for-loop j from 1 to 2 do + (calendar-for-loop j from 1 to 2 do (insert "\\weekend") (cal-tex-arg (cal-tex-LaTeXify-string (calendar-day-name date))) (cal-tex-arg (int-to-string (extract-calendar-day date))) @@ -1241,7 +1241,7 @@ Holidays are included if `cal-tex-holidays' is t." (defun cal-tex-cursor-filofax-daily (&optional arg) "Day-per-page Filofax style calendar for week indicated by cursor. -Optional prefix argument specifies number of weeks. Weeks start on Monday. +Optional prefix argument specifies number of weeks. Weeks start on Monday. Diary entries are included if `cal-tex-diary' is t. Holidays are included if `cal-tex-holidays' is t. Pages are ruled if `cal-tex-rules' is t." @@ -1309,7 +1309,7 @@ Pages are ruled if `cal-tex-rules' is t." (cal-tex-b-document) (cal-tex-cmd "\\pagestyle{empty}") (calendar-for-loop i from 1 to n do - (calendar-for-loop j from 1 to 5 do + (calendar-for-loop j from 1 to 5 do (let ((odd (/= 0 (% j 2)))) (insert (if odd "\\righthead" "\\lefthead")) (cal-tex-arg (calendar-date-string date)) @@ -1325,7 +1325,7 @@ Pages are ruled if `cal-tex-rules' is t." (cal-tex-newpage) (setq date (cal-tex-incr-date date))) (insert "%\n") - (calendar-for-loop j from 1 to 2 do + (calendar-for-loop j from 1 to 2 do (insert "\\lefthead") (cal-tex-arg (calendar-date-string date)) (insert "\\weekend") @@ -1436,7 +1436,7 @@ Optional prefix argument specifies number of days." (cal-tex-hfill) (insert "}") (cal-tex-banner "end of cal-tex-daily-page"))) - + ;;; ;;; Mini calendars ;;; @@ -1471,7 +1471,7 @@ COLSEP gives the column separation; 1mm is the default." (setq str (concat str (cal-tex-LaTeXify-string - (substring (aref calendar-day-name-array + (substring (aref calendar-day-name-array (mod (+ calendar-week-start-day i) 7)) 0 2)) (if (/= i 6) @@ -1538,12 +1538,12 @@ FINAL-SEPARATOR is t." (defun cal-tex-end-document () "Finish the LaTeX document. -Insert the trailer to LaTeX document, pop to LaTeX buffer, add +Insert the trailer to LaTeX document, pop to LaTeX buffer, add informative header, and run HOOK." (cal-tex-e-document) (latex-mode) (pop-to-buffer cal-tex-buffer) - (goto-char (point-min)) + (goto-char (point-min)) (cal-tex-comment " This buffer was produced by cal-tex.el.") (cal-tex-comment " To print a calendar, type") (cal-tex-comment " M-x tex-buffer RET") @@ -1552,8 +1552,8 @@ informative header, and run HOOK." (defun cal-tex-insert-preamble (weeks landscape size &optional append) "Initialize the output buffer. -Select the output buffer, and insert the preamble for a calendar of -WEEKS weeks. Insert code for landscape mode if LANDSCAPE is true. +Select the output buffer, and insert the preamble for a calendar of +WEEKS weeks. Insert code for landscape mode if LANDSCAPE is true. Use pointsize SIZE. Optional argument APPEND, if t, means add to end of without erasing current contents." (let ((width "18cm") @@ -1565,7 +1565,7 @@ without erasing current contents." (if (not append) (progn (cal-tex-preamble size) - (if (not landscape) + (if (not landscape) (progn (cal-tex-cmd "\\oddsidemargin -1.75cm") (cal-tex-cmd "\\def\\holidaymult{.06}")) @@ -1583,16 +1583,16 @@ without erasing current contents." (/ 1.1 (length cal-tex-which-days)))) (cal-tex-cmd "\\setlength{\\cellheight}" height) (insert (format "\\setlength{\\cellheight}{%f\\cellheight}\n" - (/ 1.0 weeks))) + (/ 1.0 weeks))) (cal-tex-cmd "\\ \\par") (cal-tex-vspace "-3cm"))) (defvar cal-tex-LaTeX-subst-list '(("\"". "``") ("\"". "''");; Quote changes meaning when list is reversed. - ("@" . "\\verb|@|") - ("&" . "\\&") - ("%" . "\\%") + ("@" . "\\verb|@|") + ("&" . "\\&") + ("%" . "\\%") ("$" . "\\$") ("#" . "\\#") ("_" . "\\_") @@ -1658,11 +1658,11 @@ without erasing current contents." (defun cal-tex-nl (&optional skip comment) "End a line with \\. If SKIP, then add that much spacing. Add COMMENT if present" - (insert "\\\\") - (if skip + (insert "\\\\") + (if skip (insert "[" skip "]")) (cal-tex-comment comment)) - + (defun cal-tex-arg (&optional text) "Insert optional TEXT surrounded by braces." (insert "{") diff --git a/lisp/calendar/cal-x.el b/lisp/calendar/cal-x.el index 3dae0e9c05b..416230ef52d 100644 --- a/lisp/calendar/cal-x.el +++ b/lisp/calendar/cal-x.el @@ -42,7 +42,7 @@ (defvar calendar-frame nil "Frame in which to display the calendar.") (defvar diary-frame nil "Frame in which to display the diary.") - + ;; This should not specify the font. That's up to the user. ;; Certainly it should not specify auto-lower and auto-raise ;; since most users won't like that. @@ -51,7 +51,7 @@ (unsplittable . t) (minibuffer . nil)) "Parameters of the diary frame, if the diary is in its own frame. Location and color should be set in .Xdefaults.") - + (defvar calendar-frame-parameters '((name . "Calendar") (title . "Calendar") (minibuffer . nil) (height . 10) (width . 80) (unsplittable . t) (vertical-scroll-bars . nil)) @@ -63,11 +63,11 @@ Location and color should be set in .Xdefaults.") (minibuffer . nil)) "Parameters of the frame that displays both the calendar and the diary. Location and color should be set in .Xdefaults.") - + (defvar calendar-after-frame-setup-hooks nil "Hooks to be run just after setting up a calendar frame. Can be used to change frame parameters, such as font, color, location, etc.") - + (defun calendar-one-frame-setup (&optional arg) "Start calendar and display it in a dedicated frame together with the diary." (if (not (display-multi-frame-p)) diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index e3730614acd..f83ba4eb134 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el @@ -1721,7 +1721,7 @@ If optional NOABBREV is t, do not allow abbreviations in names." '("[0-9]?[0-9]\\(:?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)\\(-[0-9]?[0-9]\\(:?[0-9][0-9]\\)?\\(am\\|pm\\|AM\\|PM\\)\\)?" . font-lock-function-name-face))) "Forms to highlight in diary-mode") - + (provide 'diary-lib) diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index debd05766a4..c6e7f11c7cf 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -149,7 +149,7 @@ The optional LABEL is used to label the buffer created." (name (if (string-equal choice "Equinoxes/Solstices") choice (if (member choice '("Ask" "")) - "Holidays" + "Holidays" (format "%s Holidays" choice))))) (list start-year end-year which name))) (message "Computing holidays...") @@ -466,7 +466,7 @@ date. If date is nil, or if the date is not visible, there is no holiday." (filter-visible-calendar-holidays mandatory))) (if all-christian-calendar-holidays (setq output-list - (append + (append (filter-visible-calendar-holidays optional) output-list))) output-list))) diff --git a/lisp/calendar/lunar.el b/lisp/calendar/lunar.el index 2a4666ba701..011509514c0 100644 --- a/lisp/calendar/lunar.el +++ b/lisp/calendar/lunar.el @@ -64,7 +64,7 @@ (increment-calendar-month end-month end-year 3) (increment-calendar-month start-month start-year -1) (let* ((end-date (list (list end-month 1 end-year))) - (start-date (list (list start-month + (start-date (list (list start-month (calendar-last-day-of-month start-month start-year) start-year))) @@ -239,7 +239,7 @@ This function is suitable for execution in a .emacs file." (defun diary-phases-of-moon (&optional mark) "Moon phases diary entry. -An optional parameter MARK specifies a face or single-character string to +An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." (let* ((index (* 4 (truncate diff --git a/lisp/calendar/solar.el b/lisp/calendar/solar.el index 10c385ac4a2..effccbf8b0f 100644 --- a/lisp/calendar/solar.el +++ b/lisp/calendar/solar.el @@ -194,8 +194,8 @@ delta. At present, delta = 0.01 degrees, so the value of the variable '("Autumnal Equinox" "Winter Solstice" "Vernal Equinox" "Summer Solstice") "List of season changes for the southern hemisphere.") -(defvar solar-sidereal-time-greenwich-midnight - nil +(defvar solar-sidereal-time-greenwich-midnight + nil "Sidereal time at Greenwich at midnight (universal time).") (defvar solar-northern-spring-or-summer-season nil @@ -239,7 +239,7 @@ Returns nil if nothing was entered." (condition-case nil (tan (degrees-to-radians (mod x 360.0))) (solar-tangent-degrees x))) - + (defun solar-xy-to-quadrant (x y) "Determines the quadrant of the point X, Y." (if (> x 0) @@ -399,7 +399,7 @@ Format used is given by `calendar-time-display-form'." (floor (* 60 (- time (floor time)))))) (defun solar-exact-local-noon (date) - "Date and Universal Time of local noon at *local date* date. + "Date and Universal Time of local noon at *local date* date. The date may be different from the one asked for, but it will be the right local date. The second component of date should be an integer." @@ -408,12 +408,12 @@ local date. The second component of date should be an integer." (te (solar-time-equation date ut))) (setq ut (- ut te)) (if (>= ut 24) - (progn + (progn (setq nd (list (car date) (+ 1 (car (cdr date))) (car (cdr (cdr date))))) (setq ut (- ut 24)))) (if (< ut 0) - (progn + (progn (setq nd (list (car date) (- (car (cdr date)) 1) (car (cdr (cdr date))))) (setq ut (+ ut 24)))) @@ -477,10 +477,10 @@ Corresponding value is nil if there is no sunrise/sunset." (defun solar-julian-ut-centuries (date) "Number of Julian centuries elapsed since 1 Jan, 2000 at noon U.T. for Gregorian DATE." - (/ (- (calendar-absolute-from-gregorian date) + (/ (- (calendar-absolute-from-gregorian date) (calendar-absolute-from-gregorian '(1 1.5 2000))) 36525.0)) - + (defun solar-ephemeris-time(time) "Ephemeris Time at moment TIME. @@ -534,7 +534,7 @@ calendar-time-zone are used to interpret local time." (setq end-long long))) (/ (+ start end) 2.0))) -(defun solar-horizontal-coordinates +(defun solar-horizontal-coordinates (time latitude longitude for-sunrise-sunset) "Azimuth and height of the sun at TIME, LATITUDE, and LONGITUDE. @@ -557,7 +557,7 @@ The azimuth is given in degrees as well as the height (between -180 and 180)." (* (solar-tangent-degrees de) (solar-cosine-degrees latitude))) (solar-sin-degrees ah))) - (height (solar-arcsin + (height (solar-arcsin (+ (* (solar-sin-degrees latitude) (solar-sin-degrees de)) (* (solar-cosine-degrees latitude) (solar-cosine-degrees de) @@ -573,7 +573,7 @@ elapsed at 0 Universal Time, and the second component being the universal time. For instance, the pair corresponding to November 28, 1995 at 16 UT is \(-0.040945 16), -0.040945 being the number of julian centuries elapsed between Jan 1, 2000 at 12 UT and November 28, 1995 at 0 UT." - (let* ((tm (solar-ephemeris-time time)) + (let* ((tm (solar-ephemeris-time time)) (ec (solar-ecliptic-coordinates tm for-sunrise-sunset))) (list (solar-right-ascension (car ec) (car (cdr ec))) (solar-declination (car ec) (car (cdr ec)))))) @@ -585,16 +585,16 @@ at moment `time', expressed in julian centuries of Ephemeris Time since January 1st, 2000, at 12 ET." (let* ((l (+ 280.46645 (* 36000.76983 time) - (* 0.0003032 time time))) ; sun mean longitude + (* 0.0003032 time time))) ; sun mean longitude (ml (+ 218.3165 - (* 481267.8813 time))) ; moon mean longitude + (* 481267.8813 time))) ; moon mean longitude (m (+ 357.52910 (* 35999.05030 time) (* -0.0001559 time time) - (* -0.00000048 time time time))) ; sun mean anomaly + (* -0.00000048 time time time))) ; sun mean anomaly (i (+ 23.43929111 (* -0.013004167 time) (* -0.00000016389 time time) - (* 0.0000005036 time time time))); mean inclination + (* 0.0000005036 time time time))); mean inclination (c (+ (* (+ 1.914600 (* -0.004817 time) (* -0.000014 time time)) @@ -602,8 +602,8 @@ since January 1st, 2000, at 12 ET." (* (+ 0.019993 (* -0.000101 time)) (solar-sin-degrees (* 2 m))) (* 0.000290 - (solar-sin-degrees (* 3 m))))) ; center equation - (L (+ l c)) ; total longitude + (solar-sin-degrees (* 3 m))))) ; center equation + (L (+ l c)) ; total longitude (omega (+ 125.04 (* -1934.136 time))) ; longitude of moon's ascending node ; on the ecliptic @@ -624,13 +624,13 @@ since January 1st, 2000, at 12 ET." (* -0.00478 (solar-sin-degrees omega)))) ; apparent longitude of sun (y (if (not for-sunrise-sunset) - (* (solar-tangent-degrees (/ i 2)) + (* (solar-tangent-degrees (/ i 2)) (solar-tangent-degrees (/ i 2))) nil)) (time-eq (if (not for-sunrise-sunset) (/ (* 12 (+ (* y (solar-sin-degrees (* 2 l))) (* -2 ecc (solar-sin-degrees m)) - (* 4 ecc y (solar-sin-degrees m) + (* 4 ecc y (solar-sin-degrees m) (solar-cosine-degrees (* 2 l))) (* -0.5 y y (solar-sin-degrees (* 4 l))) (* -1.25 ecc ecc (solar-sin-degrees (* 2 m))))) @@ -807,7 +807,7 @@ T0 must correspond to 0 hours UT." (nut-i (solar-ecliptic-coordinates et nil)) (nut (car (cdr (cdr (cdr nut-i))))) ; nutation (i (car (cdr nut-i)))) ; inclination - (mod (+ (mod (+ mean-sid-time + (mod (+ (mod (+ mean-sid-time (/ (/ (* nut (solar-cosine-degrees i)) 15) 3600)) 24.0) 24.0) 24.0))) @@ -895,7 +895,7 @@ This function is suitable for execution in a .emacs file." "Type \\[delete-other-windows] to remove temp window." "Type \\[switch-to-buffer] RET to remove temp window.") "Type \\[switch-to-buffer-other-window] RET to restore old contents of temp window.")))))) - + (defun calendar-sunrise-sunset () "Local time of sunrise and sunset for date under cursor. Accurate to a few seconds." @@ -924,7 +924,7 @@ Accurate to a few seconds." "Local time of candle lighting diary entry--applies if date is a Friday. No diary entry if there is no sunset on that date. -An optional parameter MARK specifies a face or single-character string to +An optional parameter MARK specifies a face or single-character string to use when highlighting the day in the calendar." (if (not (and calendar-latitude calendar-longitude calendar-time-zone)) (solar-setup)) @@ -942,7 +942,7 @@ use when highlighting the day in the calendar." (defun solar-equinoxes/solstices (k year) "Date of equinox/solstice K for YEAR. K=0, spring equinox; K=1, summer solstice; K=2, fall equinox; -K=3, winter solstice. +K=3, winter solstice. RESULT is a gregorian local date. Accurate to less than a minute between 1951 and 2050." @@ -951,13 +951,13 @@ Accurate to less than a minute between 1951 and 2050." (W (- (* 35999.373 T) 2.47)) (Delta-lambda (+ 1 (* 0.0334 (solar-cosine-degrees W)) (* 0.0007 (solar-cosine-degrees (* 2 W))))) - (S (apply '+ (mapcar '(lambda(x) - (* (car x) (solar-cosine-degrees + (S (apply '+ (mapcar '(lambda(x) + (* (car x) (solar-cosine-degrees (+ (* (car (cdr (cdr x))) T) - (car (cdr x)))))) + (car (cdr x)))))) solar-seasons-data))) (JDE (+ JDE0 (/ (* 0.00001 S) Delta-lambda))) - (correction (+ 102.3 (* 123.5 T) (* 32.5 T T))) + (correction (+ 102.3 (* 123.5 T) (* 32.5 T T))) ; ephemeris time correction (JD (- JDE (/ correction 86400))) (date (calendar-gregorian-from-absolute (floor (- JD 1721424.5)))) @@ -969,7 +969,7 @@ Accurate to less than a minute between 1951 and 2050." ; from Meeus, 1991, page 166 (defun solar-mean-equinoxes/solstices (k year) - "Julian day of mean equinox/solstice K for YEAR. + "Julian day of mean equinox/solstice K for YEAR. K=0, spring equinox; K=1, summer solstice; K=2, fall equinox; K=3, winter solstice. These formulas are only to be used between 1000 BC and 3000 AD." (let ((y (/ year 1000.0)) @@ -1061,7 +1061,7 @@ Requires floating point." (if calendar-time-zone calendar-daylight-savings-ends)) (calendar-time-zone (if calendar-time-zone calendar-time-zone 0)) (k (1- (/ m 3))) - (d0 (solar-equinoxes/solstices k y)) + (d0 (solar-equinoxes/solstices k y)) (d1 (list (car d0) (floor (car (cdr d0))) (car (cdr (cdr d0))))) (h0 (* 24 (- (car (cdr d0)) (floor (car (cdr d0)))))) (adj (dst-adjust-time d1 h0)) diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el index ced48e6fe38..2d1bd25ebec 100644 --- a/lisp/calendar/timeclock.el +++ b/lisp/calendar/timeclock.el @@ -125,7 +125,7 @@ If this variable is nil, no questions will be asked." The first time that a user clocks in each day, this function will be called to determine what the length of the current workday is. If the return value is nil, or equal to `timeclock-workday', nothing special -will be done. If it is a quantity different from `timeclock-workday', +will be done. If it is a quantity different from `timeclock-workday', however, a record will be output to the timelog file to note the fact that that day has a different length from the norm." :type '(choice (const nil) function) diff --git a/lisp/emacs-lisp/authors.el b/lisp/emacs-lisp/authors.el index 166c16bf86f..325d3903e89 100644 --- a/lisp/emacs-lisp/authors.el +++ b/lisp/emacs-lisp/authors.el @@ -92,7 +92,7 @@ files.") ("Per Abrahamsen" "Per Abhiddenware") ("Peter S. Galbraith" "Peter S Galbraith") ("Richard M. Stallman" "Richard M. Stallman,,," "Richard Stallman" - "rms" "rms@gnu.org") + "rms" "rms@gnu.org") ("Robert J. Chassell" "Bob Chassell") ("Roland B. Roberts" "Roland B Roberts" "Roland Roberts") ("Rui-Tao Dong" "Rui-Tao Dong ~{6-Hpln~}") @@ -110,7 +110,7 @@ files.") "Alist of author aliases. Each entry is of the form (REALNAME REGEXP...). If an author's name -matches one of the REGEXPs, use REALNAME instead. +matches one of the REGEXPs, use REALNAME instead. If REALNAME is nil, ignore that author.") @@ -321,7 +321,7 @@ the file name." (setq authors-checked-files-alist (cons (cons file valid) authors-checked-files-alist)) (unless valid - (setq authors-invalid-file-names + (setq authors-invalid-file-names (cons (format "%s:%d: unrecognized `%s' for %s" log-file (1+ (count-lines (point-min) pos)) @@ -510,7 +510,7 @@ TABLE is a hash table to add author information to." CHANGES is an alist of entries (FILE (ACTION . COUNT) ...), as produced by `authors-scan-change-log'. The element added to `authors-author-list' is (AUTHOR WROTE CHANGED), where -WROTE and CHANGED are lists of the files written and changed by AUTHOR." +WROTE and CHANGED are lists of the files written and changed by AUTHOR." (when author (let ((nchanged 0) wrote-list @@ -549,7 +549,7 @@ WROTE and CHANGED are lists of the files written and changed by AUTHOR." (defun authors (root) "Extract author information from change logs and Lisp source files. ROOT is the root directory under which to find the files. If called -interactively, ROOT is read from the minibuffer. +interactively, ROOT is read from the minibuffer. Result is a buffer *Authors* containing authorship information, and a buffer *Authors Errors* containing references to unknown files." (interactive "DEmacs source directory: ") @@ -575,14 +575,14 @@ buffer *Authors Errors* containing references to unknown files." (set-buffer (get-buffer-create buffer-name)) (erase-buffer) (set-buffer-file-coding-system authors-coding-system) - (insert + (insert "Many people have contributed code included in the Free Software Foundation's distribution of GNU Emacs. To show our appreciation for their public spirit, we list here in alphabetical order a condensed list of their contributions.\n") (let (authors-author-list a) (maphash #'authors-add-to-author-list table) - (setq authors-author-list + (setq authors-author-list (sort authors-author-list (lambda (a b) (string-lessp (car a) (car b))))) (dolist (a authors-author-list) @@ -607,7 +607,7 @@ list of their contributions.\n") (insert "\n ")) (insert " " file)) (insert "\n"))))) - (insert "\nLocal" " Variables:\ncoding: " + (insert "\nLocal" " Variables:\ncoding: " (symbol-name authors-coding-system) "\nEnd:\n") (message "Generating buffer %s... done" buffer-name) (unless noninteractive diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index e37acb1b305..21af0d866ea 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -318,7 +318,7 @@ are used." (setq autoload form)) (let ((autoload-print-form-outbuf outbuf)) (autoload-print-form autoload))) - + ;; Copy the rest of the line to the output. (princ (buffer-substring (progn diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el index f4db8bf1350..eafa63d6e32 100644 --- a/lisp/emacs-lisp/backquote.el +++ b/lisp/emacs-lisp/backquote.el @@ -142,7 +142,7 @@ Vectors work just like lists. Nested backquotes are permitted." ;; Scan this list-level, setting LISTS to a list of forms, ;; each of which produces a list of elements ;; that should go in this level. - ;; The order of LISTS is backwards. + ;; The order of LISTS is backwards. ;; If there are non-splicing elements (constant or variable) ;; at the beginning, put them in FIRSTLIST, ;; as a list of tagged values (TAG . FORM). @@ -172,7 +172,7 @@ Vectors work just like lists. Nested backquotes are permitted." (if (or rest list) (setq lists (cons (backquote-listify list (backquote-process rest)) lists))) - ;; Turn LISTS into a form that produces the combined list. + ;; Turn LISTS into a form that produces the combined list. (setq expression (if (or (cdr lists) (eq (car-safe (car lists)) backquote-splice-symbol)) diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index 46040da8d92..312d4b386b3 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -33,22 +33,22 @@ ;; and encoding binary data formats like these is made simple using a ;; structure specification which closely resembles the C style ;; structure declarations. -;; +;; ;; Encoded (binary) data is stored in a unibyte string or vector, -;; while the decoded data is stored in an alist with (FIELD . VALUE) +;; while the decoded data is stored in an alist with (FIELD . VALUE) ;; pairs. ;; Example: - + ;; Consider the following C structures: -;; +;; ;; struct header { ;; unsigned long dest_ip; ;; unsigned long src_ip; ;; unsigned short dest_port; ;; unsigned short src_port; ;; }; -;; +;; ;; struct data { ;; unsigned char type; ;; unsigned char opcode; @@ -56,22 +56,22 @@ ;; unsigned char id[8]; /* nul-terminated string */ ;; unsigned char data[/* (length + 3) & ~3 */]; ;; }; -;; +;; ;; struct packet { ;; struct header header; ;; unsigned char items; ;; unsigned char filler[3]; ;; struct data item[/* items */]; ;; }; -;; +;; ;; The corresponding Lisp bindat specification looks like this: -;; +;; ;; (setq header-spec ;; '((dest-ip ip) ;; (src-ip ip) ;; (dest-port u16) ;; (src-port u16))) -;; +;; ;; (setq data-spec ;; '((type u8) ;; (opcode u8) @@ -79,20 +79,20 @@ ;; (id strz 8) ;; (data vec (length)) ;; (align 4))) -;; +;; ;; (setq packet-spec ;; '((header struct header-spec) ;; (items u8) ;; (fill 3) ;; (item repeat (items) ;; ((struct data-spec))))) -;; +;; ;; ;; A binary data representation may look like -;; [ 192 168 1 100 192 168 1 101 01 28 21 32 2 0 0 0 +;; [ 192 168 1 100 192 168 1 101 01 28 21 32 2 0 0 0 ;; 2 3 5 0 ?A ?B ?C ?D ?E ?F 0 0 1 2 3 4 5 0 0 0 ;; 1 4 7 0 ?B ?C ?D ?E ?F ?G 0 0 6 7 8 9 10 11 12 0 ] -;; +;; ;; The corresponding decoded structure looks like ;; ;; ((header @@ -176,7 +176,7 @@ ;; A `union' specification ;; ([FIELD] union TAG_VAL (TAG SPEC) ... [(t SPEC)]) -;; is interpreted by evalling TAG_VAL and then comparing that to +;; is interpreted by evalling TAG_VAL and then comparing that to ;; each TAG using equal; if a match is found, the corresponding SPEC ;; is used. ;; If TAG is a form (eval EXPR), EXPR is evalled with `tag' bound to the @@ -204,7 +204,7 @@ (string-to-char (substring raw-data pos (1+ pos))) (aref raw-data pos)) (setq pos (1+ pos)))) - + (defun bindat--unpack-u16 () (let* ((a (bindat--unpack-u8)) (b (bindat--unpack-u8))) (logior (lsh a 8) b))) @@ -341,7 +341,7 @@ (setq struct (cons (cons field data) struct)) (setq struct (append data struct)))))) struct)) - + (defun bindat-unpack (spec raw-data &optional pos) "Return structured data according to SPEC for binary data in RAW-DATA. RAW-DATA is a string or vector. Optional third arg POS specifies the @@ -365,7 +365,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." struct) -;; Calculate raw-data length of structured data +;; Calculate raw-data length of structured data (defvar bindat--fixed-length-alist '((u8 . 1) (byte . 1) @@ -398,7 +398,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (setq len (apply 'bindat-get-field struct len))) (if (not len) (setq len 1)) - (cond + (cond ((eq type 'eval) (if field (setq struct (cons (cons field (eval len)) struct)) @@ -446,7 +446,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (defun bindat--pack-u8 (v) (aset raw-data pos (logand v 255)) (setq pos (1+ pos))) - + (defun bindat--pack-u16 (v) (aset raw-data pos (logand (lsh v -8) 255)) (aset raw-data (1+ pos) (logand v 255)) @@ -513,7 +513,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (aset raw-data (+ pos i) (aref v i)) (setq i (1+ i))) (setq pos (+ pos len)))) - (t + (t (setq pos (+ pos len))))) (defun bindat--pack-group (struct spec) @@ -540,7 +540,7 @@ e.g. corresponding to STRUCT.FIELD1[INDEX2].FIELD3..." (setq len (apply 'bindat-get-field struct len))) (if (not len) (setq len 1)) - (cond + (cond ((eq type 'eval) (if field (setq struct (cons (cons field (eval len)) struct)) @@ -601,7 +601,7 @@ only that many elements from VECT." (setq i (1- i) s (cons (format (if (= i 0) fmt fmt2) (aref vect i)) s))) (apply 'concat s))) - + (defun bindat-vector-to-dec (vect &optional sep) "Format vector VECT in decimal format separated by dots. If optional second arg SEP is a string, use that as separator." diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 7ccd2698b2c..0bf5a7904c2 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -31,7 +31,7 @@ ;; You can, however, make a faster pig." ;; ;; Or, to put it another way, the emacs byte compiler is a VW Bug. This code -;; makes it be a VW Bug with fuel injection and a turbocharger... You're +;; makes it be a VW Bug with fuel injection and a turbocharger... You're ;; still not going to make it go faster than 70 mph, but it might be easier ;; to get it there. ;; @@ -62,17 +62,17 @@ ;; Simple defsubsts often produce forms like ;; (let ((v1 (f1)) (v2 (f2)) ...) ;; (FN v1 v2 ...)) -;; It would be nice if we could optimize this to +;; It would be nice if we could optimize this to ;; (FN (f1) (f2) ...) ;; but we can't unless FN is dynamically-safe (it might be dynamically ;; referring to the bindings that the lambda arglist established.) ;; One of the uncountable lossages introduced by dynamic scope... ;; -;; Maybe there should be a control-structure that says "turn on +;; Maybe there should be a control-structure that says "turn on ;; fast-and-loose type-assumptive optimizations here." Then when ;; we see a form like (car foo) we can from then on assume that ;; the variable foo is of type cons, and optimize based on that. -;; But, this won't win much because of (you guessed it) dynamic +;; But, this won't win much because of (you guessed it) dynamic ;; scope. Anything down the stack could change the value. ;; (Another reason it doesn't work is that it is perfectly valid ;; to call car with a null argument.) A better approach might @@ -107,7 +107,7 @@ ;; ;; However, if there was even a single let-binding around the COND, ;; it could not be byte-compiled, because there would be an "unbind" -;; byte-op between the final "call" and "return." Adding a +;; byte-op between the final "call" and "return." Adding a ;; Bunbind_all byteop would fix this. ;; ;; (defun foo (x y z) ... (foo a b c)) @@ -129,8 +129,8 @@ ;; ;; Wouldn't it be nice if Emacs Lisp had lexical scope. ;; -;; Idea: the form (lexical-scope) in a file means that the file may be -;; compiled lexically. This proclamation is file-local. Then, within +;; Idea: the form (lexical-scope) in a file means that the file may be +;; compiled lexically. This proclamation is file-local. Then, within ;; that file, "let" would establish lexical bindings, and "let-dynamic" ;; would do things the old way. (Or we could use CL "declare" forms.) ;; We'd have to notice defvars and defconsts, since those variables should @@ -140,10 +140,10 @@ ;; in the file being compiled (doing a boundp check isn't good enough.) ;; Fdefvar() would have to be modified to add something to the plist. ;; -;; A major disadvantage of this scheme is that the interpreter and compiler -;; would have different semantics for files compiled with (dynamic-scope). +;; A major disadvantage of this scheme is that the interpreter and compiler +;; would have different semantics for files compiled with (dynamic-scope). ;; Since this would be a file-local optimization, there would be no way to -;; modify the interpreter to obey this (unless the loader was hacked +;; modify the interpreter to obey this (unless the loader was hacked ;; in some grody way, but that's a really bad idea.) ;; Other things to consider: @@ -157,7 +157,7 @@ ;;;;; error free also they may act as true-constants. ;;;(disassemble (lambda (x) (and (point) (foo)))) -;;;;; When +;;;;; When ;;;;; - all but one arguments to a function are constant ;;;;; - the non-constant argument is an if-expression (cond-expression?) ;;;;; then the outer function can be distributed. If the guarding @@ -285,7 +285,7 @@ form)))))) ;;; ((lambda ...) ...) -;;; +;;; (defun byte-compile-unfold-lambda (form &optional name) (or name (setq name "anonymous lambda")) (let ((lambda (car form)) @@ -338,13 +338,13 @@ (byte-compile-warn "attempt to open-code `%s' with too many arguments" name)) form) - + ;; The following leads to infinite recursion when loading a ;; file containing `(defsubst f () (f))', and then trying to ;; byte-compile that file. ;(setq body (mapcar 'byte-optimize-form body))) - - (let ((newform + + (let ((newform (if bindings (cons 'let (cons (nreverse bindings) body)) (cons 'progn body)))) @@ -427,21 +427,21 @@ (cons (byte-optimize-form (nth 1 form) t) (cons (byte-optimize-form (nth 2 form) for-effect) (byte-optimize-body (cdr (cdr (cdr form))) t))))) - + ((memq fn '(save-excursion save-restriction save-current-buffer)) ;; those subrs which have an implicit progn; it's not quite good ;; enough to treat these like normal function calls. ;; This can turn (save-excursion ...) into (save-excursion) which ;; will be optimized away in the lap-optimize pass. (cons fn (byte-optimize-body (cdr form) for-effect))) - + ((eq fn 'with-output-to-temp-buffer) ;; this is just like the above, except for the first argument. (cons fn (cons (byte-optimize-form (nth 1 form) nil) (byte-optimize-body (cdr (cdr form)) for-effect)))) - + ((eq fn 'if) (when (< (length form) 3) (byte-compile-warn "too few arguments for `if'")) @@ -450,7 +450,7 @@ (cons (byte-optimize-form (nth 2 form) for-effect) (byte-optimize-body (nthcdr 3 form) for-effect))))) - + ((memq fn '(and or)) ; remember, and/or are control structures. ;; take forms off the back until we can't any more. ;; In the future it could conceivably be a problem that the @@ -474,7 +474,7 @@ (byte-compile-warn "misplaced interactive spec: `%s'" (prin1-to-string form)) nil) - + ((memq fn '(defun defmacro function condition-case save-window-excursion)) ;; These forms are compiled as constants or by breaking out @@ -490,7 +490,7 @@ (cons fn (cons (byte-optimize-form (nth 1 form) for-effect) (cdr (cdr form))))) - + ((eq fn 'catch) ;; the body of a catch is compiled (and thus optimized) as a ;; top-level form, so don't do it here. The tag is never @@ -523,7 +523,7 @@ (not (eq form (setq form (compiler-macroexpand form))))) (byte-optimize-form form for-effect)) - + ((not (symbolp fn)) (byte-compile-warn "`%s' is a malformed function" (prin1-to-string fn)) @@ -552,7 +552,7 @@ ;; appending a nil here might not be necessary, but it can't hurt. (byte-optimize-form (cons 'progn (append (cdr form) '(nil))) t)) - + (t ;; Otherwise, no args can be considered to be for-effect, ;; even if the called function is for-effect, because we @@ -622,7 +622,7 @@ ((keywordp ,form)))) ;; If the function is being called with constant numeric args, -;; evaluate as much as possible at compile-time. This optimizer +;; evaluate as much as possible at compile-time. This optimizer ;; assumes that the function is associative, like + or *. (defun byte-optimize-associative-math (form) (let ((args nil) @@ -816,7 +816,7 @@ (cons (/ (nth 1 form) last) (byte-compile-butlast (cdr (cdr form))))) last nil)))) - (cond + (cond ;;; ((null (cdr (cdr form))) ;;; (nth 1 form)) ((eq (nth 1 form) 0) @@ -912,7 +912,7 @@ (put 'cdr-safe 'byte-optimizer 'byte-optimize-predicate) -;; I'm not convinced that this is necessary. Doesn't the optimizer loop +;; I'm not convinced that this is necessary. Doesn't the optimizer loop ;; take care of this? - Jamie ;; I think this may some times be necessary to reduce ie (quote 5) to 5, ;; so arithmetic optimizers recognize the numeric constant. - Hallvard @@ -1169,7 +1169,7 @@ nil form)) -;;; enumerating those functions which need not be called if the returned +;;; enumerating those functions which need not be called if the returned ;;; value is not used. That is, something like ;;; (progn (list (something-with-side-effects) (yow)) ;;; (foo)) @@ -1233,7 +1233,7 @@ zerop)) (side-effect-and-error-free-fns '(arrayp atom - bobp bolp bool-vector-p + bobp bolp bool-vector-p buffer-end buffer-list buffer-size buffer-string bufferp car-safe case-table-p cdr-safe char-or-string-p commandp cons consp current-buffer current-global-map current-indentation @@ -1440,7 +1440,7 @@ byte-current-buffer byte-interactive-p)) (defconst byte-compile-side-effect-free-ops - (nconc + (nconc '(byte-varref byte-nth byte-memq byte-car byte-cdr byte-length byte-aref byte-symbol-value byte-get byte-concat2 byte-concat3 byte-sub1 byte-add1 byte-eqlsign byte-gtr byte-lss byte-leq byte-geq byte-diff byte-negate @@ -1472,7 +1472,7 @@ ;;; varbind pop-up-windows ;;; not ;;; -;;; we break the program, because it will appear that pop-up-windows and +;;; we break the program, because it will appear that pop-up-windows and ;;; old-pop-ups are not EQ when really they are. So we have to know what ;;; the BOOL variables are, and not perform this optimization on them. @@ -1619,7 +1619,7 @@ ;; goto-X-if-non-nil goto-Y X: --> goto-Y-if-nil X: ;; ;; it is wrong to do the same thing for the -else-pop variants. - ;; + ;; ((and (or (eq 'byte-goto-if-nil (car lap0)) (eq 'byte-goto-if-not-nil (car lap0))) ; gotoX (eq 'byte-goto (car lap1)) ; gotoY @@ -1722,7 +1722,7 @@ str (concat str " %s") i (1+ i)))) (if opt-p - (let ((tagstr + (let ((tagstr (if (eq 'TAG (car (car tmp))) (format "%d:" (car (cdr (car tmp)))) (or (car tmp) "")))) @@ -1903,7 +1903,7 @@ (byte-goto-if-not-nil-else-pop . byte-goto-if-nil-else-pop)))) newtag) - + (nth 1 newtag) ) (setcdr tmp (cons (setcdr lap0 newtag) (cdr tmp))) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 8269d9dec9e..7cd808ebbe7 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -426,7 +426,7 @@ be re-created.") ;; end of a word in a conglomerate. (modify-syntax-entry ?- "w" checkdoc-syntax-table) ) - + ;;; Compatibility ;; @@ -940,7 +940,7 @@ Optional argument TAKE-NOTES causes all errors to be logged." (checkdoc-show-diagnostics))) (goto-char p)) (if (interactive-p) (message "Checking interactive message text...done."))) - + ;;;###autoload (defun checkdoc-eval-defun () "Evaluate the current form with `eval-defun' and check its documentation. @@ -2340,7 +2340,7 @@ The default boundary is the entire buffer." (while (setq type (checkdoc-message-text-next-string end)) (setq e (checkdoc-message-text-engine type))) e)) - + (defun checkdoc-message-text-next-string (end) "Move cursor to the next checkable message string after point. Return the message classification. diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index 3bdb3382bc1..4edc3d0c6e5 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el @@ -132,7 +132,7 @@ If nil, indent backquoted lists as data, i.e., like quoted lists." (+ loop-indentation lisp-loop-keyword-indentation)) (t (+ loop-indentation lisp-loop-forms-indentation))))) - + ;;;###autoload (defun common-lisp-indent-function (indent-point state) @@ -140,8 +140,8 @@ If nil, indent backquoted lists as data, i.e., like quoted lists." (looking-at "([Ll][Oo][Oo][Pp]")) (common-lisp-loop-part-indentation indent-point state) (common-lisp-indent-function-1 indent-point state))) - - + + (defun common-lisp-indent-function-1 (indent-point state) (let ((normal-indent (current-column))) ;; Walk up list levels until we see something diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 63be5bcb612..e8c8acbe84c 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1368,7 +1368,7 @@ lexical closures as in Common Lisp." (set (car cl-closure-vars) [bad-lexical-ref]) (list (car x) (cadr x) (car cl-closure-vars)))) bindings)) - (ebody + (ebody (cl-macroexpand-all (cons 'progn body) (nconc (mapcar (function (lambda (x) diff --git a/lisp/emacs-lisp/cl-specs.el b/lisp/emacs-lisp/cl-specs.el index d22127c3dee..21353755ed6 100644 --- a/lisp/emacs-lisp/cl-specs.el +++ b/lisp/emacs-lisp/cl-specs.el @@ -7,7 +7,7 @@ ;; LCD Archive Entry: ;; cl-specs.el|Daniel LaLiberte|liberte@holonexus.org ;; |Edebug specs for cl.el -;; |$Date: 2001/07/16 12:22:59 $|1.1| +;; |$Date: 2002/10/01 17:00:27 $|1.1| ;; This file is part of GNU Emacs. @@ -53,22 +53,22 @@ (def-edebug-spec ecase case) (def-edebug-spec do ((&rest &or symbolp (symbolp &optional form form)) - (form body) + (form body) cl-declarations body)) (def-edebug-spec do* do) -(def-edebug-spec dolist +(def-edebug-spec dolist ((symbolp form &optional form) cl-declarations body)) (def-edebug-spec dotimes dolist) (def-edebug-spec do-symbols ((symbolp &optional form form) cl-declarations body)) -(def-edebug-spec do-all-symbols +(def-edebug-spec do-all-symbols ((symbolp &optional form) cl-declarations body)) ;; Multiple values (def-edebug-spec multiple-value-list (form)) (def-edebug-spec multiple-value-call (function-form body)) -(def-edebug-spec multiple-value-bind +(def-edebug-spec multiple-value-bind ((&rest symbolp) form cl-declarations body)) (def-edebug-spec multiple-value-setq ((&rest symbolp) form)) (def-edebug-spec multiple-value-prog1 (form body)) @@ -84,11 +84,11 @@ (def-edebug-spec flet ((&rest (defun*)) cl-declarations body)) (def-edebug-spec labels flet) -(def-edebug-spec macrolet - ((&rest (&define name (&rest arg) cl-declarations-or-string def-body)) +(def-edebug-spec macrolet + ((&rest (&define name (&rest arg) cl-declarations-or-string def-body)) cl-declarations body)) -(def-edebug-spec symbol-macrolet +(def-edebug-spec symbol-macrolet ((&rest (symbol sexp)) cl-declarations body)) (def-edebug-spec destructuring-bind @@ -105,13 +105,13 @@ (def-edebug-spec letf* letf) -(def-edebug-spec defsetf - (&define name +(def-edebug-spec defsetf + (&define name [&or [symbolp &optional stringp] [cl-lambda-list (symbolp)]] cl-declarations-or-string def-body)) -(def-edebug-spec define-setf-method +(def-edebug-spec define-setf-method (&define name cl-lambda-list cl-declarations-or-string def-body)) (def-edebug-spec define-modify-macro @@ -128,8 +128,8 @@ (def-edebug-spec incf (place &optional form)) (def-edebug-spec decf incf) (def-edebug-spec push (form place)) ; different for CL -(def-edebug-spec pushnew - (form place &rest +(def-edebug-spec pushnew + (form place &rest &or [[&or ":test" ":test-not" ":key"] function-form] [edebug-keywordp form])) (def-edebug-spec pop (place)) ; different for CL @@ -180,7 +180,7 @@ ;; Declarations -(def-edebug-spec cl-decl-spec +(def-edebug-spec cl-decl-spec ((symbolp &rest sexp))) (def-edebug-spec cl-declarations @@ -214,17 +214,17 @@ (&or ([&or (symbolp arg) arg] &optional def-form arg) arg)) ;; The lambda list for macros is different from that of normal lambdas. -;; Note that &environment is only allowed as first or last items in the +;; Note that &environment is only allowed as first or last items in the ;; top level list. (def-edebug-spec cl-macro-list (([&optional "&environment" arg] [&rest cl-macro-arg] - [&optional ["&optional" &rest + [&optional ["&optional" &rest &or (cl-macro-arg &optional def-form cl-macro-arg) arg]] [&optional [[&or "&rest" "&body"] cl-macro-arg]] - [&optional ["&key" [&rest - [&or ([&or (symbolp cl-macro-arg) arg] + [&optional ["&key" [&rest + [&or ([&or (symbolp cl-macro-arg) arg] &optional def-form cl-macro-arg) arg]] &optional "&allow-other-keys"]] @@ -239,11 +239,11 @@ (def-edebug-spec cl-macro-list1 (([&optional "&whole" arg] ;; only allowed at lower levels [&rest cl-macro-arg] - [&optional ["&optional" &rest + [&optional ["&optional" &rest &or (cl-macro-arg &optional def-form cl-macro-arg) arg]] [&optional [[&or "&rest" "&body"] cl-macro-arg]] - [&optional ["&key" [&rest - [&or ([&or (symbolp cl-macro-arg) arg] + [&optional ["&key" [&rest + [&or ([&or (symbolp cl-macro-arg) arg] &optional def-form cl-macro-arg) arg]] &optional "&allow-other-keys"]] @@ -262,7 +262,7 @@ def-body)) (def-edebug-spec defsubst* defun*) -(def-edebug-spec defmacro* +(def-edebug-spec defmacro* (&define name cl-macro-list cl-declarations-or-string def-body)) (def-edebug-spec define-compiler-macro defmacro*) @@ -280,7 +280,7 @@ (def-edebug-spec function-form ;; form at the end could also handle "function", ;; but recognize it specially to avoid wrapping function forms. - (&or ([&or "quote" "function"] &or symbolp lambda-expr) + (&or ([&or "quote" "function"] &or symbolp lambda-expr) ("function*" function*) form)) @@ -293,7 +293,7 @@ (&define ; makes top-level form not be wrapped [&or symbolp (gate - symbolp &rest + symbolp &rest (&or [":conc-name" &or stringp "nil"] [":constructor" symbolp &optional cl-lambda-list] [":copier" symbolp] @@ -329,7 +329,7 @@ (def-edebug-spec loop ([&optional ["named" symbolp]] - [&rest + [&rest &or ["repeat" form] loop-for-as @@ -351,36 +351,36 @@ &rest ["and" loop-for-as-subclause])) (def-edebug-spec loop-for-as-subclause - (loop-var + (loop-var loop-type-spec - &or + &or [[&or "in" "on" "in-ref" "across-ref"] form &optional ["by" function-form]] ["=" form &optional ["then" form]] ["across" form] - ["being" + ["being" [&or "the" "each"] - &or - [[&or "element" "elements"] + &or + [[&or "element" "elements"] [&or "of" "in" "of-ref"] form &optional "using" ["index" symbolp]];; is this right? [[&or "hash-key" "hash-keys" "hash-value" "hash-values"] [&or "of" "in"] - hash-table-p &optional ["using" ([&or "hash-value" "hash-values" + hash-table-p &optional ["using" ([&or "hash-value" "hash-values" "hash-key" "hash-keys"] sexp)]] - + [[&or "symbol" "present-symbol" "external-symbol" "symbols" "present-symbols" "external-symbols"] [&or "in" "of"] package-p] - + ;; Extensions for Emacs Lisp, including Lucid Emacs. [[&or "frame" "frames" "screen" "screens" "buffer" "buffers"]] - [[&or "window" "windows"] + [[&or "window" "windows"] [&or "of" "in"] form] [[&or "overlay" "overlays" @@ -388,23 +388,23 @@ [&or "of" "in"] form &optional [[&or "from" "to"] form]] - [[&or "interval" "intervals"] + [[&or "interval" "intervals"] [&or "in" "of"] form &optional [[&or "from" "to"] form] ["property" form]] - + [[&or "key-code" "key-codes" "key-seq" "key-seqs" - "key-binding" "key-bindings"] + "key-binding" "key-bindings"] [&or "in" "of"] form &optional ["using" ([&or "key-code" "key-codes" "key-seq" "key-seqs" - "key-binding" "key-bindings"] + "key-binding" "key-bindings"] sexp)]] ;; For arbitrary extensions, recognize anything else. [symbolp &rest &or symbolp form] ] - + ;; arithmetic - must be last since all parts are optional. [[&optional [[&or "from" "downfrom" "upfrom"] form]] [&optional [[&or "to" "downto" "upto" "below" "above"] form]] @@ -412,10 +412,10 @@ ])) (def-edebug-spec loop-initial-final - (&or ["initially" + (&or ["initially" ;; [&optional &or "do" "doing"] ;; CLtL2 doesn't allow this. &rest loop-non-atomic-expr] - ["finally" &or + ["finally" &or [[&optional &or "do" "doing"] &rest loop-non-atomic-expr] ["return" form]])) @@ -425,11 +425,11 @@ (def-edebug-spec loop-clause (&or [[&or "while" "until" "always" "never" "thereis"] form] - + [[&or "collect" "collecting" "append" "appending" "nconc" "nconcing" - "concat" "vconcat"] form + "concat" "vconcat"] form [&optional ["into" loop-var]]] [[&or "count" "counting" @@ -455,7 +455,7 @@ (def-edebug-spec loop-var ;; The symbolp must be last alternative to recognize e.g. (a b . c) - ;; loop-var => + ;; loop-var => ;; (loop-var . [&or nil loop-var]) ;; (symbolp . [&or nil loop-var]) ;; (symbolp . loop-var) diff --git a/lisp/emacs-lisp/crm.el b/lisp/emacs-lisp/crm.el index 26a34204008..46293bf94f3 100644 --- a/lisp/emacs-lisp/crm.el +++ b/lisp/emacs-lisp/crm.el @@ -85,7 +85,7 @@ ;; -tip: use M-f and M-b for ease of navigation among elements. ;;; History: -;; +;; ;; 2000-04-10: ;; ;; first revamped version @@ -211,7 +211,7 @@ and return t." ;; no candidate found nil (progn - ;; + ;; (setq crm-beginning-of-element (match-beginning 1)) (setq crm-end-of-element end-index) ;; string to the left of the current element @@ -226,7 +226,7 @@ and return t." "Return t if CANDIDATE is an exact match for a valid completion." (let ((completions ;; TODO: verify whether the arguments are appropriate - (all-completions + (all-completions candidate crm-completion-table minibuffer-completion-predicate))) (if (member candidate completions) t @@ -271,20 +271,20 @@ The meanings of the return values are: minibuffer-completion-predicate)) (setq last crm-last-exact-completion) (setq crm-last-exact-completion nil) - + (catch 'crm-exit - + (if (null completion) ; no possible completion (progn (crm-temp-echo-area-glyphs " [No match]") (throw 'crm-exit 0))) - + (if (eq completion t) ; was already an exact and unique completion (throw 'crm-exit 1)) - + (setq completedp (null (string-equal completion crm-current-element))) - + (if completedp (progn (erase-buffer) @@ -295,7 +295,7 @@ The meanings of the return values are: (backward-char (length crm-right-of-element)) ;; TODO: is this correct? (setq crm-current-element completion))) - + (if (null (crm-test-completion crm-current-element)) (progn (if completedp ; some completion happened @@ -306,13 +306,13 @@ The meanings of the return values are: (throw 'crm-exit 6)) (if completedp (throw 'crm-exit 4))) - + (setq crm-last-exact-completion completion) (if (not (null last)) (progn (if (not (null (equal crm-current-element last))) (crm-minibuffer-completion-help)))) - + ;; returning -- was already an exact completion (throw 'crm-exit 3))))) @@ -472,24 +472,24 @@ to the location of mismatch and do not exit. This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c" (interactive) - + (if (not (crm-find-current-element)) nil (let (result) - + (setq result (catch 'crm-exit - + (if (eq (point-min) (point-max)) (throw 'crm-exit t)) - + ;; TODO: this test is suspect? (if (not (null (crm-test-completion crm-current-element))) (throw 'crm-exit "check")) - + ;; TODO: determine how to detect errors (let ((result (crm-do-completion))) - + (cond ((or (eq 1 result) (eq 3 result)) @@ -501,7 +501,7 @@ This function is modeled after `minibuffer_complete_and_exit' in src/minibuf.c" nil) (throw 'crm-exit "check"))) (nil))))) - + (if (null result) nil (if (equal result "check") @@ -541,7 +541,7 @@ and TAB to `crm-minibuffer-complete'." (define-key crm-local-completion-map (kbd "TAB") (function crm-minibuffer-complete))) - + (unless crm-local-must-match-map (setq crm-local-must-match-map (make-sparse-keymap)) (set-keymap-parent crm-local-must-match-map diff --git a/lisp/emacs-lisp/cust-print.el b/lisp/emacs-lisp/cust-print.el index 435465f427b..a8cf6acd177 100644 --- a/lisp/emacs-lisp/cust-print.el +++ b/lisp/emacs-lisp/cust-print.el @@ -34,7 +34,7 @@ ;; print-length since the standard routines are being replaced. Also, ;; to print custom types constructed from lists and vectors, use ;; custom-print-list and custom-print-vector. See the documentation -;; strings of these variables for more details. +;; strings of these variables for more details. ;; If the results of your expressions contain circular references to ;; other parts of the same structure, the standard Emacs print @@ -131,7 +131,7 @@ ;;This is defined by emacs.") (defcustom print-level nil - "*Controls how many levels deep a nested data object will print. + "*Controls how many levels deep a nested data object will print. If nil, printing proceeds recursively and may lead to max-lisp-eval-depth being exceeded or an error may occur: @@ -147,7 +147,7 @@ level 1." (defcustom print-circle nil - "*Controls the printing of recursive structures. + "*Controls the printing of recursive structures. If nil, printing proceeds recursively and may lead to `max-lisp-eval-depth' being exceeded or an error may occur: @@ -196,7 +196,7 @@ Don't modify this variable directly. Use `add-custom-printer' and (defun add-custom-printer (pred printer) "Add a pair of PREDICATE and PRINTER to `custom-printers'. Any pair that has the same PREDICATE is first removed." - (setq custom-printers (cons (cons pred printer) + (setq custom-printers (cons (cons pred printer) (delq (assq pred custom-printers) custom-printers))) ;; Rather than updating here, we could wait until cust-print-top-level is called. @@ -220,9 +220,9 @@ Any pair that has the same PREDICATE is first removed." ;; (byte-compile `(lambda (object) (cond - ,@(mapcar (function + ,@(mapcar (function (lambda (pair) - `((,(car pair) object) + `((,(car pair) object) (,(cdr pair) object)))) custom-printers) ;; Otherwise return nil. @@ -236,7 +236,7 @@ Any pair that has the same PREDICATE is first removed." ;;==================================================== (defun cust-print-set-function-cell (symbol-pair) - (defalias (car symbol-pair) + (defalias (car symbol-pair) (symbol-function (car (cdr symbol-pair))))) (defun cust-print-original-princ (object &optional stream)) ; dummy def @@ -268,7 +268,7 @@ by running `custom-print-uninstall'." (error custom-error) )) t) - + (defun custom-print-uninstall () "Reset print functions to their emacs subroutines." (interactive) @@ -335,7 +335,7 @@ second argument NOESCAPE is non-nil. This is the custom-print replacement for the standard `prin1-to-string'." (let ((buf (get-buffer-create " *custom-print-temp*"))) - ;; We must erase the buffer before printing in case an error + ;; We must erase the buffer before printing in case an error ;; occurred during the last prin1-to-string and we are in debugger. (save-excursion (set-buffer buf) @@ -364,7 +364,7 @@ This is the custom-print replacement for the standard `print'." (defun custom-format (fmt &rest args) - "Format a string out of a control-string and arguments. + "Format a string out of a control-string and arguments. The first argument is a control string. It, and subsequent arguments substituted into it, become the value, which is a string. It may contain %s or %d or %c to substitute successive following arguments. @@ -385,8 +385,8 @@ characters." (custom-prin1-to-string arg) arg))) args))) - - + + (defun custom-message (fmt &rest args) "Print a one-line message at the bottom of the screen. The first argument is a control string. @@ -401,7 +401,7 @@ See `custom-format' for the details." ;; It doesn't work to princ the result of custom-format as in: ;; (cust-print-original-princ (apply 'custom-format fmt args)) ;; because the echo area requires special handling - ;; to avoid duplicating the output. + ;; to avoid duplicating the output. ;; cust-print-original-message does it right. (apply 'cust-print-original-message fmt (mapcar (function (lambda (arg) @@ -409,7 +409,7 @@ See `custom-format' for the details." (custom-prin1-to-string arg) arg))) args))) - + (defun custom-error (fmt &rest args) "Signal an error, making error message by passing all args to `format'. @@ -435,12 +435,12 @@ See `custom-format' for the details." ;; Set up for printing. (let ((standard-output (or stream standard-output)) ;; circle-table will be non-nil if anything is circular. - (circle-table (and print-circle + (circle-table (and print-circle (cust-print-preprocess-circle-tree object))) (cust-print-current-level (or print-level -1))) (defalias 'cust-print-original-printer emacs-printer) - (defalias 'cust-print-low-level-prin + (defalias 'cust-print-low-level-prin (cond ((or custom-printers circle-table @@ -451,7 +451,7 @@ See `custom-format' for the details." (or print-level print-length))) 'cust-print-print-object) (t 'cust-print-original-printer))) - (defalias 'cust-print-prin + (defalias 'cust-print-prin (if circle-table 'cust-print-print-circular 'cust-print-low-level-prin)) (cust-print-prin object) @@ -461,7 +461,7 @@ See `custom-format' for the details." (defun cust-print-print-object (object) ;; Test object type and print accordingly. ;; Could be called as either cust-print-low-level-prin or cust-print-prin. - (cond + (cond ((null object) (cust-print-original-printer object)) ((cust-print-use-custom-printer object) object) ((consp object) (cust-print-list object)) @@ -561,7 +561,7 @@ See `custom-format' for the details." ;;================================== (defun cust-print-preprocess-circle-tree (object) - ;; Fill up the table. + ;; Fill up the table. (let (;; Table of tags for each object in an object to be printed. ;; A tag is of the form: ;; ( <object> <nil-t-or-id-number> ) @@ -600,8 +600,8 @@ See `custom-format' for the details." (defun cust-print-walk-circle-tree (object) (let (read-equivalent-p tag) (while object - (setq read-equivalent-p - (or (numberp object) + (setq read-equivalent-p + (or (numberp object) (and (symbolp object) ;; Check if it is uninterned. (eq object (intern-soft (symbol-name object))))) @@ -617,7 +617,7 @@ See `custom-format' for the details." (cons (list object) (cdr circle-table))))) (setq object - (cond + (cond (tag ;; No need to descend since we have already. nil) diff --git a/lisp/emacs-lisp/debug.el b/lisp/emacs-lisp/debug.el index f4cdfd5a057..43e4d781a77 100644 --- a/lisp/emacs-lisp/debug.el +++ b/lisp/emacs-lisp/debug.el @@ -338,7 +338,7 @@ That buffer should be current already." ;; Make the unchanged part of the backtrace inaccessible ;; so it won't be scanned. (narrow-to-region (point-min) new-end))) - + ;; Scan the new part of the backtrace, inserting xrefs. (goto-char (point-min)) (while (progn diff --git a/lisp/emacs-lisp/disass.el b/lisp/emacs-lisp/disass.el index bf9e9d04ccc..47a5a0c3428 100644 --- a/lisp/emacs-lisp/disass.el +++ b/lisp/emacs-lisp/disass.el @@ -88,7 +88,7 @@ redefine OBJECT if it is a symbol." (setq macro t obj (cdr obj))) (if (and (listp obj) (eq (car obj) 'byte-code)) - (setq obj (list 'lambda nil obj))) + (setq obj (list 'lambda nil obj))) (if (and (listp obj) (not (eq (car obj) 'lambda))) (error "not a function")) (if (consp obj) diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index a0c2ff11522..c0b77fcf428 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -228,7 +228,7 @@ With zero or negative ARG turn mode off. ,(if keymap keymap-sym `(if (boundp ',keymap-sym) (symbol-value ',keymap-sym)))) - + ;; If the mode is global, call the function according to the default. ,(if globalp `(if (and load-file-name (not (equal ,init-value ,mode))) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index b4f9c751d90..77c4244d8fe 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -39,7 +39,7 @@ ;; First evaluate a defun with C-M-x, then run the function. Step ;; through the code with SPC, mark breakpoints with b, go until a ;; breakpoint is reached with g, and quit execution with q. Use the -;; "?" command in edebug to describe other commands. +;; "?" command in edebug to describe other commands. ;; See the Emacs Lisp Reference Manual for more details. ;; If you wish to change the default edebug global command prefix, change: @@ -105,9 +105,9 @@ Use the command `edebug-all-forms' to toggle the value of this option." :group 'edebug) (defcustom edebug-eval-macro-args nil - "*Non-nil means all macro call arguments may be evaluated. + "*Non-nil means all macro call arguments may be evaluated. If this variable is nil, the default, Edebug will *not* wrap -macro call arguments as if they will be evaluated. +macro call arguments as if they will be evaluated. For each macro, a `edebug-form-spec' overrides this option. So to specify exceptions for macros that have some arguments evaluated and some not, you should specify an `edebug-form-spec'." @@ -120,7 +120,7 @@ That takes some time, so if your program does not care what happens to the window configurations, it is better to set this variable to nil. If the value is a list, only the listed windows are saved and -restored. +restored. `edebug-toggle-save-windows' may be used to change this variable." :type '(choice boolean (repeat string)) @@ -154,7 +154,7 @@ Go-nonstop, trace, Trace-fast, continue, and Continue-fast." (defcustom edebug-trace nil "*Non-nil means display a trace of function entry and exit. Tracing output is displayed in a buffer named `*edebug-trace*', one -function entry or exit per line, indented by the recursion level. +function entry or exit per line, indented by the recursion level. You can customize by replacing functions `edebug-print-trace-before' and `edebug-print-trace-after'." @@ -316,7 +316,7 @@ A lambda list keyword is a symbol that starts with `&'." (while (and (symbolp object) (fboundp object)) (setq object (symbol-function object))) object) - + (defun edebug-macrop (object) "Return the macro named by OBJECT, or nil if it is not a macro." (setq object (edebug-lookup-function object)) @@ -367,7 +367,7 @@ Return the result of the last expression in BODY." (defun edebug-pop-to-buffer (buffer &optional window) ;; Like pop-to-buffer, but select window where BUFFER was last shown. - ;; Select WINDOW if it provided and it still exists. Otherwise, + ;; Select WINDOW if it provided and it still exists. Otherwise, ;; if buffer is currently shown in several windows, choose one. ;; Otherwise, find a new window, possibly splitting one. (setq window (if (and (windowp window) (edebug-window-live-p window) @@ -430,10 +430,10 @@ Return the result of the last expression in BODY." (defun edebug-set-windows (window-info) ;; Set either a full window configuration or some window information. (if (listp window-info) - (mapcar (function + (mapcar (function (lambda (one-window-info) (if one-window-info - (apply (function + (apply (function (lambda (window buffer point start hscroll) (if (edebug-window-live-p window) (progn @@ -573,7 +573,7 @@ already is one.)" "Toggle edebugging of all definitions." (interactive) (setq edebug-all-defs (not edebug-all-defs)) - (message "Edebugging all definitions is %s." + (message "Edebugging all definitions is %s." (if edebug-all-defs "on" "off"))) @@ -581,7 +581,7 @@ already is one.)" "Toggle edebugging of all forms." (interactive) (setq edebug-all-forms (not edebug-all-forms)) - (message "Edebugging all forms is %s." + (message "Edebugging all forms is %s." (if edebug-all-forms "on" "off"))) @@ -601,7 +601,7 @@ already is one.)" ;;; Edebug internal data ;; The internal data that is needed for edebugging is kept in the -;; buffer-local variable `edebug-form-data'. +;; buffer-local variable `edebug-form-data'. (make-variable-buffer-local 'edebug-form-data) @@ -670,12 +670,12 @@ already is one.)" (setq edebug-form-data (cons new-entry edebug-form-data))) (defun edebug-clear-form-data-entry (entry) -;; If non-nil, clear ENTRY out of the form data. +;; If non-nil, clear ENTRY out of the form data. ;; Maybe clear the markers and delete the symbol's edebug property? (if entry (progn - ;; Instead of this, we could just find all contained forms. - ;; (put (car entry) 'edebug nil) ; + ;; Instead of this, we could just find all contained forms. + ;; (put (car entry) 'edebug nil) ; ;; (mapcar 'edebug-clear-form-data-entry ; dangerous ;; (get (car entry) 'edebug-dependents)) ;; (set-marker (nth 1 entry) nil) @@ -806,7 +806,7 @@ already is one.)" ;; We just read a list after a dot, which will be abbreviated out. (setq edebug-read-dotted-list nil) ;; Drop the corresponding offset pair. - ;; That is, nconc the reverse of the rest of the offsets + ;; That is, nconc the reverse of the rest of the offsets ;; with the cdr of last offset. (setcdr edebug-current-offset (nconc (nreverse (cdr (cdr edebug-current-offset))) @@ -827,9 +827,9 @@ already is one.)" (defmacro edebug-storing-offsets (point &rest body) `(unwind-protect - (progn + (progn (edebug-store-before-offset ,point) - ,@body) + ,@body) (edebug-store-after-offset (point)))) @@ -913,8 +913,8 @@ This controls how we read comma constructs.") (forward-char 1) (cond ((eq ?\' (following-char)) (forward-char 1) - (list - (edebug-storing-offsets (point) + (list + (edebug-storing-offsets (point) (if (featurep 'cl) 'function* 'function)) (edebug-read-storing-offsets stream))) ((memq (following-char) '(?: ?B ?O ?X ?b ?o ?x ?1 ?2 ?3 ?4 ?5 ?6 @@ -925,7 +925,7 @@ This controls how we read comma constructs.") (defun edebug-read-list (stream) (forward-char 1) ; skip \( - (prog1 + (prog1 (let ((elements)) (while (not (memq (edebug-next-token-class) '(rparen dot))) (if (eq (edebug-next-token-class) 'backquote) @@ -956,7 +956,7 @@ This controls how we read comma constructs.") (defun edebug-read-vector (stream) (forward-char 1) ; skip \[ - (prog1 + (prog1 (let ((elements)) (while (not (eq 'rbracket (edebug-next-token-class))) (setq elements (cons (edebug-read-storing-offsets stream) elements))) @@ -970,7 +970,7 @@ This controls how we read comma constructs.") (defun edebug-new-cursor (expressions offsets) ;; Return a new cursor for EXPRESSIONS with OFFSETS. - (if (vectorp expressions) + (if (vectorp expressions) (setq expressions (append expressions nil))) (cons expressions offsets)) @@ -1017,7 +1017,7 @@ This controls how we read comma constructs.") ;; This is a violation of the cursor encapsulation, but ;; there is plenty of that going on while matching. ;; The following test should always fail. - (if (edebug-empty-cursor cursor) + (if (edebug-empty-cursor cursor) (edebug-no-match cursor "Not enough arguments.")) (setcar cursor (cdr (car cursor))) (setcdr cursor (cdr (cdr cursor))) @@ -1027,7 +1027,7 @@ This controls how we read comma constructs.") (defun edebug-before-offset (cursor) ;; Return the before offset of the cursor. ;; If there is nothing left in the offsets, - ;; return one less than the offset itself, + ;; return one less than the offset itself, ;; which is the after offset for a list. (let ((offset (edebug-cursor-offsets cursor))) (if (consp offset) @@ -1134,7 +1134,7 @@ This controls how we read comma constructs.") defining-form-p (and (listp spec) (eq '&define (car spec))) ;; This is incorrect in general!! But OK most of the time. - def-name (if (and defining-form-p + def-name (if (and defining-form-p (eq 'name (car (cdr spec))) (eq 'symbol (edebug-next-token-class))) (edebug-original-read (current-buffer)))))) @@ -1144,13 +1144,13 @@ This controls how we read comma constructs.") (if (or edebug-all-defs edebug-all-forms) ;; If it is a defining form and we are edebugging defs, ;; then let edebug-list-form start it. - (let ((cursor (edebug-new-cursor + (let ((cursor (edebug-new-cursor (list (edebug-read-storing-offsets (current-buffer))) (list edebug-offsets)))) (car (edebug-make-form-wrapper cursor - (edebug-before-offset cursor) + (edebug-before-offset cursor) (1- (edebug-after-offset cursor)) (list (cons (symbol-name def-kind) (cdr spec)))))) @@ -1159,7 +1159,7 @@ This controls how we read comma constructs.") ;; This only works for defs with simple names. (put def-name 'edebug (point-marker)) ;; Also nil out dependent defs. - '(mapcar (function + '(mapcar (function (lambda (def) (put def-name 'edebug nil))) (get def-name 'edebug-dependents)) @@ -1167,13 +1167,13 @@ This controls how we read comma constructs.") ;; If all forms are being edebugged, explicitly wrap it. (edebug-all-forms - (let ((cursor (edebug-new-cursor + (let ((cursor (edebug-new-cursor (list (edebug-read-storing-offsets (current-buffer))) (list edebug-offsets)))) - (edebug-make-form-wrapper + (edebug-make-form-wrapper cursor - (edebug-before-offset cursor) - (edebug-after-offset cursor) + (edebug-before-offset cursor) + (edebug-after-offset cursor) nil))) ;; Not a defining form, and not edebugging. @@ -1207,11 +1207,11 @@ This controls how we read comma constructs.") ;; since it wraps the list of forms with a call to `edebug-enter'. ;; Uses the dynamically bound vars edebug-def-name and edebug-def-args. ;; Do this after parsing since that may find a name. - (setq edebug-def-name + (setq edebug-def-name (or edebug-def-name edebug-old-def-name (edebug-gensym "edebug-anon"))) `(edebug-enter (quote ,edebug-def-name) - ,(if edebug-inside-func + ,(if edebug-inside-func `(list ;; Doesn't work with more than one def-body!! ;; But the list will just be reversed. @@ -1222,7 +1222,7 @@ This controls how we read comma constructs.") (defvar edebug-form-begin-marker) ; the mark for def being instrumented - + (defvar edebug-offset-index) ; the next available offset index. (defvar edebug-offset-list) ; the list of offset positions. @@ -1238,10 +1238,10 @@ This controls how we read comma constructs.") (defun edebug-make-before-and-after-form (before-index form after-index) ;; Return the edebug form for the current function at offset BEFORE-INDEX - ;; given FORM. Looks like: + ;; given FORM. Looks like: ;; (edebug-after (edebug-before BEFORE-INDEX) AFTER-INDEX FORM) ;; Also increment the offset index for subsequent use. - (list 'edebug-after + (list 'edebug-after (list 'edebug-before before-index) after-index form)) @@ -1252,10 +1252,10 @@ This controls how we read comma constructs.") (defun edebug-unwrap (sexp) "Return the unwrapped SEXP or return it as is if it is not wrapped. -The SEXP might be the result of wrapping a body, which is a list of +The SEXP might be the result of wrapping a body, which is a list of expressions; a `progn' form will be returned enclosing these forms." (if (consp sexp) - (cond + (cond ((eq 'edebug-after (car sexp)) (nth 3 sexp)) ((eq 'edebug-enter (car sexp)) @@ -1285,8 +1285,8 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Skip the first offset. (edebug-set-cursor cursor (edebug-cursor-expressions cursor) (cdr (edebug-cursor-offsets cursor))) - (edebug-make-form-wrapper - cursor + (edebug-make-form-wrapper + cursor form-begin (1- form-end) speclist)) @@ -1298,8 +1298,8 @@ expressions; a `progn' form will be returned enclosing these forms." ;; This is a hack, but I havent figured out a simpler way yet. (let* ((form-data-entry (edebug-get-form-data-entry form-begin form-end)) ;; Set this marker before parsing. - (edebug-form-begin-marker - (if form-data-entry + (edebug-form-begin-marker + (if form-data-entry (edebug-form-data-begin form-data-entry) ;; Buffer must be current-buffer for this to work: (set-marker (make-marker) form-begin)))) @@ -1316,37 +1316,37 @@ expressions; a `progn' form will be returned enclosing these forms." edebug-def-interactive edebug-inside-func;; whether wrapped code executes inside a function. ) - + (setq result (if speclist (edebug-match cursor speclist) ;; else wrap as an enter-form. (edebug-make-enter-wrapper (list (edebug-form cursor))))) - + ;; Set the name here if it was not set by edebug-make-enter-wrapper. - (setq edebug-def-name + (setq edebug-def-name (or edebug-def-name edebug-old-def-name (edebug-gensym "edebug-anon"))) ;; Add this def as a dependent of containing def. Buggy. '(if (and edebug-containing-def-name (not (get edebug-containing-def-name 'edebug-dependents))) (put edebug-containing-def-name 'edebug-dependents - (cons edebug-def-name - (get edebug-containing-def-name + (cons edebug-def-name + (get edebug-containing-def-name 'edebug-dependents)))) ;; Create a form-data-entry or modify existing entry's markers. ;; In the latter case, pointers to the entry remain eq. (if (not form-data-entry) - (setq form-data-entry + (setq form-data-entry (edebug-make-form-data-entry - edebug-def-name + edebug-def-name edebug-form-begin-marker ;; Buffer must be current-buffer. (set-marker (make-marker) form-end) )) - (edebug-set-form-data-entry + (edebug-set-form-data-entry form-data-entry edebug-def-name ;; in case name is changed form-begin form-end)) @@ -1367,7 +1367,7 @@ expressions; a `progn' form will be returned enclosing these forms." (let ((window ;; Find the best window for this buffer. (or (get-buffer-window (current-buffer)) (selected-window)))) - (setq edebug-top-window-data + (setq edebug-top-window-data (cons window (window-start window))))) ;; Store the edebug data in symbol's property list. @@ -1390,14 +1390,14 @@ expressions; a `progn' form will be returned enclosing these forms." (defun edebug-clear-coverage (name) - ;; Create initial coverage vector. + ;; Create initial coverage vector. ;; Only need one per expression, but it is simpler to use stop points. - (put name 'edebug-coverage + (put name 'edebug-coverage (make-vector (length edebug-offset-list) 'unknown))) (defun edebug-form (cursor) - ;; Return the instrumented form for the following form. + ;; Return the instrumented form for the following form. ;; Add the point offsets to the edebug-offset-list for the form. (let* ((form (edebug-top-element-required cursor "Expected form")) (offset (edebug-top-offset cursor))) @@ -1413,13 +1413,13 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Find out if this is a defining form from first symbol. ;; An indirect spec would not work here, yet. (if (and (consp spec) (eq '&define (car spec))) - (edebug-defining-form - new-cursor + (edebug-defining-form + new-cursor (car offset);; before the form - (edebug-after-offset cursor) + (edebug-after-offset cursor) (cons (symbol-name head) (cdr spec))) ;; Wrap a regular form. - (edebug-make-before-and-after-form + (edebug-make-before-and-after-form (edebug-inc-offset (car offset)) (edebug-list-form new-cursor) ;; After processing the list form, the new-cursor is left @@ -1496,7 +1496,7 @@ expressions; a `progn' form will be returned enclosing these forms." (edebug-move-cursor cursor) (edebug-interactive-p-name)) (t - (cons head (edebug-list-form-args + (cons head (edebug-list-form-args head (edebug-move-cursor cursor)))))) ((consp head) @@ -1518,7 +1518,7 @@ expressions; a `progn' form will be returned enclosing these forms." (defconst edebug-max-depth 150) ;; maximum number of matching recursions. -;;; Failure to match +;;; Failure to match ;; This throws to no-match, if there are higher alternatives. ;; Otherwise it signals an error. The place of the error is found @@ -1563,15 +1563,15 @@ expressions; a `progn' form will be returned enclosing these forms." (defun edebug-match-specs (cursor specs remainder-handler) ;; Append results of matching the list of specs. ;; The first spec is handled and the remainder-handler handles the rest. - (let ((edebug-matching-depth + (let ((edebug-matching-depth (if (> edebug-matching-depth edebug-max-depth) (error "too deep - perhaps infinite loop in spec?") (1+ edebug-matching-depth)))) (cond ((null specs) nil) - + ;; Is the spec dotted? - ((atom specs) + ((atom specs) (let ((edebug-dotted-spec t));; Containing spec list was dotted. (edebug-match-specs cursor (list specs) remainder-handler))) @@ -1590,7 +1590,7 @@ expressions; a `progn' form will be returned enclosing these forms." (t;; Process normally. (let* ((spec (car specs)) - (rest) + (rest) (first-char (and (symbolp spec) (aref (symbol-name spec) 0)))) ;;(message "spec = %s first char = %s" spec first-char) (sit-for 1) (nconc @@ -1638,18 +1638,18 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Match a symbol spec. (let* ((spec (get-edebug-spec symbol))) (cond - (spec + (spec (if (consp spec) ;; It is an indirect spec. (edebug-match cursor spec) ;; Otherwise it should be the symbol name of a function. ;; There could be a bug here - maybe need to do edebug-match bindings. (funcall spec cursor))) - + ((null symbol) ;; special case this. (edebug-match-nil cursor)) - ((fboundp symbol) ; is it a predicate? + ((fboundp symbol) ; is it a predicate? (let ((sexp (edebug-top-element-required cursor "Expected" symbol))) ;; Special case for edebug-`. (if (and (listp sexp) (eq (car sexp) ',)) @@ -1700,7 +1700,7 @@ expressions; a `progn' form will be returned enclosing these forms." (if (null specs) (setq specs edebug-&rest)) ;; Reuse the &optional handler with this as the remainder handler. (edebug-&optional-wrapper cursor specs remainder-handler)) - + (defun edebug-match-&rest (cursor specs) ;; Repeatedly use specs until failure. (let ((edebug-&rest specs) ;; remember these @@ -1745,7 +1745,7 @@ expressions; a `progn' form will be returned enclosing these forms." (edebug-no-match cursor "Unexpected")) ;; This means nothing matched, so it is OK. nil) ;; So, return nothing - + (def-edebug-spec &key edebug-match-&key) @@ -1753,11 +1753,11 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Following specs must look like (<name> <spec>) ... ;; where <name> is the name of a keyword, and spec is its spec. ;; This really doesn't save much over the expanded form and takes time. - (edebug-match-&rest + (edebug-match-&rest cursor - (cons '&or + (cons '&or (mapcar (function (lambda (pair) - (vector (format ":%s" (car pair)) + (vector (format ":%s" (car pair)) (car (cdr pair))))) specs)))) @@ -1771,7 +1771,7 @@ expressions; a `progn' form will be returned enclosing these forms." (defun edebug-match-list (cursor specs) ;; The spec is a list, but what kind of list, and what context? (if edebug-dotted-spec - ;; After dotted spec but form did not contain dot, + ;; After dotted spec but form did not contain dot, ;; so match list spec elements as if spliced in. (prog1 (let ((edebug-dotted-spec)) @@ -1792,27 +1792,27 @@ expressions; a `progn' form will be returned enclosing these forms." (edebug-move-cursor cursor) (setq edebug-gate t) form) - (t + (t (error "Bad spec: %s" specs))))) ((listp form) (prog1 - (list (edebug-match-sublist + (list (edebug-match-sublist ;; First offset is for the list form itself. ;; Treat nil as empty list. - (edebug-new-cursor form (cdr (edebug-top-offset cursor))) + (edebug-new-cursor form (cdr (edebug-top-offset cursor))) specs)) (edebug-move-cursor cursor))) ((and (eq 'vector spec) (vectorp form)) ;; Special case: match a vector with the specs. (let ((result (edebug-match-sublist - (edebug-new-cursor + (edebug-new-cursor form (cdr (edebug-top-offset cursor))) (cdr specs)))) (edebug-move-cursor cursor) (list (apply 'vector result)))) - + (t (edebug-no-match cursor "Expected" specs))) ))) @@ -1823,11 +1823,11 @@ expressions; a `progn' form will be returned enclosing these forms." ;;edebug-best-error ;;edebug-error-point ) - (prog1 + (prog1 ;; match with edebug-match-specs so edebug-best-error is not bound. (edebug-match-specs cursor specs 'edebug-match-specs) (if (not (edebug-empty-cursor cursor)) - (if edebug-best-error + (if edebug-best-error (apply 'edebug-no-match cursor edebug-best-error) ;; A failed &rest or &optional spec may leave some args. (edebug-no-match cursor "Failed matching" specs) @@ -1860,7 +1860,7 @@ expressions; a `progn' form will be returned enclosing these forms." ;; This should only be called inside of a spec list to match the remainder ;; of the current list. e.g. ("lambda" &define args def-body) (edebug-make-form-wrapper - cursor + cursor (edebug-before-offset cursor) ;; Find the last offset in the list. (let ((offsets (edebug-cursor-offsets cursor))) @@ -1872,9 +1872,9 @@ expressions; a `progn' form will be returned enclosing these forms." ;; The expression must be a function. ;; This will match any list form that begins with a symbol ;; that has an edebug-form-spec beginning with &define. In - ;; practice, only lambda expressions should be used. + ;; practice, only lambda expressions should be used. ;; I could add a &lambda specification to avoid confusion. - (let* ((sexp (edebug-top-element-required + (let* ((sexp (edebug-top-element-required cursor "Expected lambda expression")) (offset (edebug-top-offset cursor)) (head (and (consp sexp) (car sexp))) @@ -1884,10 +1884,10 @@ expressions; a `progn' form will be returned enclosing these forms." (if (and (consp spec) (eq '&define (car spec))) (prog1 (list - (edebug-defining-form + (edebug-defining-form (edebug-new-cursor sexp offset) (car offset);; before the sexp - (edebug-after-offset cursor) + (edebug-after-offset cursor) (cons (symbol-name head) (cdr spec)))) (edebug-move-cursor cursor)) (edebug-no-match cursor "Expected lambda expression") @@ -2064,7 +2064,7 @@ expressions; a `progn' form will be returned enclosing these forms." (def-edebug-spec \` (backquote-form)) -;; Supports quotes inside backquotes, +;; Supports quotes inside backquotes, ;; but only at the top level inside unquotes. (def-edebug-spec backquote-form (&or @@ -2130,10 +2130,10 @@ expressions; a `progn' form will be returned enclosing these forms." ;; advice.el by Hans Chalupsky (hans@cs.buffalo.edu) (def-edebug-spec ad-dolist ((symbolp form &optional form) body)) -(def-edebug-spec defadvice +(def-edebug-spec defadvice (&define name ;; thing being advised. - (name ;; class is [&or "before" "around" "after" - ;; "activation" "deactivation"] + (name ;; class is [&or "before" "around" "after" + ;; "activation" "deactivation"] name ;; name of advice &rest sexp ;; optional position and flags ) @@ -2241,7 +2241,7 @@ error is signaled again." (defun edebug-enter (edebug-function edebug-args edebug-body) ;; Entering FUNC. The arguments are ARGS, and the body is BODY. ;; Setup edebug variables and evaluate BODY. This function is called - ;; when a function evaluated with edebug-eval-top-level-form is entered. + ;; when a function evaluated with edebug-eval-top-level-form is entered. ;; Return the result of BODY. ;; Is this the first time we are entering edebug since @@ -2249,7 +2249,7 @@ error is signaled again." ;; More precisely, this tests whether Edebug is currently active. (if (not edebug-entered) (let ((edebug-entered t) - ;; Binding max-lisp-eval-depth here is OK, + ;; Binding max-lisp-eval-depth here is OK, ;; but not inside an unwind-protect. ;; Doing it here also keeps it from growing too large. (max-lisp-eval-depth (+ 100 max-lisp-eval-depth)) ; too much?? @@ -2278,7 +2278,7 @@ error is signaled again." (let (;; Don't keep reading from an executing kbd macro ;; within edebug unless edebug-continue-kbd-macro is ;; non-nil. Again, local binding may not be best. - (executing-kbd-macro + (executing-kbd-macro (if edebug-continue-kbd-macro executing-kbd-macro)) ;; Don't get confused by the user's keymap changes. @@ -2292,8 +2292,8 @@ error is signaled again." ;; This may be more than we need, however. (pre-command-hook nil) (post-command-hook nil)) - (setq edebug-execution-mode (or edebug-next-execution-mode - edebug-initial-mode + (setq edebug-execution-mode (or edebug-next-execution-mode + edebug-initial-mode edebug-execution-mode) edebug-next-execution-mode nil) (edebug-enter edebug-function edebug-args edebug-body)) @@ -2302,7 +2302,7 @@ error is signaled again." pre-command-hook edebug-outside-pre-command-hook post-command-hook edebug-outside-post-command-hook ))) - + (let* ((edebug-data (get edebug-function 'edebug)) (edebug-def-mark (car edebug-data)) ; mark at def start (edebug-freq-count (get edebug-function 'edebug-freq-count)) @@ -2326,7 +2326,7 @@ error is signaled again." (defun edebug-enter-trace (edebug-body) (let ((edebug-stack-depth (1+ edebug-stack-depth)) edebug-result) - (edebug-print-trace-before + (edebug-print-trace-before (format "%s args: %s" edebug-function edebug-args)) (prog1 (setq edebug-result (funcall edebug-body)) (edebug-print-trace-after @@ -2341,7 +2341,7 @@ The result of BODY is also printed." edebug-result) (edebug-print-trace-before ,msg) (prog1 (setq edebug-result (progn ,@body)) - (edebug-print-trace-after + (edebug-print-trace-after (format "%s result: %s" ,msg edebug-result))))) (defun edebug-print-trace-before (msg) @@ -2360,11 +2360,11 @@ MSG is printed after `::::} '." (defun edebug-slow-before (edebug-before-index) ;; Debug current function given BEFORE position. - ;; Called from functions compiled with edebug-eval-top-level-form. + ;; Called from functions compiled with edebug-eval-top-level-form. ;; Return the before index. (setcar edebug-offset-indices edebug-before-index) - ;; Increment frequency count + ;; Increment frequency count (aset edebug-freq-count edebug-before-index (1+ (aref edebug-freq-count edebug-before-index))) @@ -2383,7 +2383,7 @@ MSG is printed after `::::} '." ;; Return VALUE. (setcar edebug-offset-indices edebug-after-index) - ;; Increment frequency count + ;; Increment frequency count (aset edebug-freq-count edebug-after-index (1+ (aref edebug-freq-count edebug-after-index))) (if edebug-test-coverage (edebug-update-coverage)) @@ -2455,7 +2455,7 @@ MSG is printed after `::::} '." ;;; (edebug-trace "exp: %s" edebug-value) ;; Test whether we should break. - (setq edebug-break + (setq edebug-break (or edebug-global-break (and edebug-break-data (or (not edebug-break-condition) @@ -2469,12 +2469,12 @@ MSG is printed after `::::} '." (cdr (cdr edebug-data))))) ;; Display if mode is not go, continue, or Continue-fast - ;; or break, or input is pending, + ;; or break, or input is pending, (if (or (not (memq edebug-execution-mode '(go continue Continue-fast))) edebug-break (edebug-input-pending-p)) (edebug-display)) ; <--------------- display - + edebug-value ))) @@ -2525,7 +2525,7 @@ MSG is printed after `::::} '." (edebug-outside-mark (edebug-mark)) edebug-outside-windows ; window or screen configuration edebug-buffer-points - + edebug-eval-buffer ; declared here so we can kill it below (edebug-eval-result-list (and edebug-eval-list (edebug-eval-result-list))) @@ -2544,16 +2544,16 @@ MSG is printed after `::::} '." (if (not (buffer-name edebug-buffer)) (let ((debug-on-error nil)) (error "Buffer defining %s not found" edebug-function))) - + (if (eq 'after edebug-arg-mode) ;; Compute result string now before windows are modified. (edebug-compute-previous-result edebug-value)) (if edebug-save-windows ;; Save windows now before we modify them. - (setq edebug-outside-windows + (setq edebug-outside-windows (edebug-current-windows edebug-save-windows))) - + (if edebug-save-displayed-buffer-points (setq edebug-buffer-points (edebug-get-displayed-buffer-points))) @@ -2569,7 +2569,7 @@ MSG is printed after `::::} '." (setcar edebug-window-data (selected-window)) ;; Now display eval list, if any. - ;; This is done after the pop to edebug-buffer + ;; This is done after the pop to edebug-buffer ;; so that buffer-window correspondence is correct after quitting. (edebug-eval-display edebug-eval-result-list) ;; The evaluation list better not have deleted edebug-window-data. @@ -2578,21 +2578,21 @@ MSG is printed after `::::} '." (setq edebug-buffer-outside-point (point)) (goto-char edebug-point) - + (if (eq 'before edebug-arg-mode) ;; Check whether positions are up-to-date. ;; This assumes point is never before symbol. (if (not (memq (following-char) '(?\( ?\# ?\` ))) (let ((debug-on-error nil)) - (error "Source has changed - reevaluate definition of %s" + (error "Source has changed - reevaluate definition of %s" edebug-function) ))) (setcdr edebug-window-data (edebug-adjust-window (cdr edebug-window-data))) - + ;; Test if there is input, not including keyboard macros. - (if (edebug-input-pending-p) + (if (edebug-input-pending-p) (progn (setq edebug-execution-mode 'step edebug-stop t) @@ -2601,7 +2601,7 @@ MSG is printed after `::::} '." )) ;; Now display arrow based on mode. (edebug-overlay-arrow) - + (cond ((eq 'error edebug-arg-mode) ;; Display error message @@ -2614,12 +2614,12 @@ MSG is printed after `::::} '." (edebug-break (cond (edebug-global-break - (message "Global Break: %s => %s" + (message "Global Break: %s => %s" edebug-global-break-condition edebug-global-break-result)) (edebug-break-condition - (message "Break: %s => %s" - edebug-break-condition + (message "Break: %s => %s" + edebug-break-condition edebug-break-result)) ((not (eq edebug-execution-mode 'Continue-fast)) (message "Break")) @@ -2634,7 +2634,7 @@ MSG is printed after `::::} '." (not (eq edebug-execution-mode 'Continue-fast))) (sit-for 1)) ; Show break message. (edebug-previous-result))) - + (cond (edebug-break (cond @@ -2647,11 +2647,11 @@ MSG is printed after `::::} '." ((eq edebug-execution-mode 'Trace-fast) (edebug-sit-for 0)) ; Force update and continue. ) - + (unwind-protect (if (or edebug-stop (memq edebug-execution-mode '(step next)) - (eq edebug-arg-mode 'error)) + (eq edebug-arg-mode 'error)) (progn ;; (setq edebug-execution-mode 'step) ;; (edebug-overlay-arrow) ; This doesn't always show up. @@ -2672,7 +2672,7 @@ MSG is printed after `::::} '." (setq edebug-trace-window (get-buffer-window edebug-trace-buffer)) (if edebug-trace-window (setq edebug-trace-window-start - (and edebug-trace-window + (and edebug-trace-window (window-start edebug-trace-window)))) ;; Restore windows before continuing. @@ -2688,15 +2688,15 @@ MSG is printed after `::::} '." ;; Unrestore trace window's window-point. (if edebug-trace-window - (set-window-start edebug-trace-window + (set-window-start edebug-trace-window edebug-trace-window-start)) ;; Unrestore edebug-buffer's window-start, if displayed. (let ((window (car edebug-window-data))) - (if (and window (edebug-window-live-p window) + (if (and window (edebug-window-live-p window) (eq (window-buffer) edebug-buffer)) (progn - (set-window-start window (cdr edebug-window-data) + (set-window-start window (cdr edebug-window-data) 'no-force) ;; Unrestore edebug-buffer's window-point. ;; Needed in addition to setting the buffer point @@ -2731,7 +2731,7 @@ MSG is printed after `::::} '." ;; None of the following is done if quit or signal occurs. ;; Restore edebug-buffer's outside point. - ;; (edebug-trace "restore edebug-buffer point: %s" + ;; (edebug-trace "restore edebug-buffer point: %s" ;; edebug-buffer-outside-point) (let ((current-buffer (current-buffer))) (set-buffer edebug-buffer) @@ -2757,7 +2757,7 @@ MSG is printed after `::::} '." ;; Dynamically declared unbound vars (defvar edebug-outside-match-data) ; match data outside of edebug (defvar edebug-backtrace-buffer) ; each recursive edit gets its own -(defvar edebug-inside-windows) +(defvar edebug-inside-windows) (defvar edebug-interactive-p) (defvar edebug-outside-map) @@ -2841,7 +2841,7 @@ MSG is printed after `::::} '." ;; Declare global values local but using the same global value. ;; We could set these to the values for previous edebug call. (last-command-char last-command-char) - (last-command last-command) + (last-command last-command) (this-command this-command) (last-input-char last-input-char) @@ -2862,7 +2862,7 @@ MSG is printed after `::::} '." (debug-on-quit edebug-outside-debug-on-quit) ;; Don't keep defining a kbd macro. - (defining-kbd-macro + (defining-kbd-macro (if edebug-continue-kbd-macro defining-kbd-macro)) ;; others?? @@ -2906,7 +2906,7 @@ MSG is printed after `::::} '." ));; inner let ;; Reset global vars to outside values, in case they have been changed. - (setq + (setq last-command-char edebug-outside-last-command-char last-command-event edebug-outside-last-command-event last-command edebug-outside-last-command @@ -2931,7 +2931,7 @@ MSG is printed after `::::} '." (defun edebug-adjust-window (old-start) ;; If pos is not visible, adjust current window to fit following context. -;;; (message "window: %s old-start: %s window-start: %s pos: %s" +;;; (message "window: %s old-start: %s window-start: %s pos: %s" ;;; (selected-window) old-start (window-start) (point)) (sit-for 5) (if (not (pos-visible-in-window-p)) (progn @@ -2951,7 +2951,7 @@ MSG is printed after `::::} '." (beginning-of-line) (point))))))) (window-start)) - + (defconst edebug-arrow-alist @@ -2968,7 +2968,7 @@ MSG is printed after `::::} '." (defun edebug-overlay-arrow () ;; Set up the overlay arrow at beginning-of-line in current buffer. - ;; The arrow string is derived from edebug-arrow-alist and + ;; The arrow string is derived from edebug-arrow-alist and ;; edebug-execution-mode. (let ((pos (save-excursion (beginning-of-line) (point)))) (setq overlay-arrow-string @@ -2996,13 +2996,13 @@ configurations become the same as the current configuration." (setq edebug-inside-windows (edebug-current-windows t)) (edebug-set-windows edebug-outside-windows) ,@body;; Code to change edebug-save-windows - (setq edebug-outside-windows (edebug-current-windows + (setq edebug-outside-windows (edebug-current-windows edebug-save-windows)) ;; Problem: what about outside windows that are deleted inside? (edebug-set-windows edebug-inside-windows))) (defun edebug-toggle-save-selected-window () - "Toggle the saving and restoring of the selected window. + "Toggle the saving and restoring of the selected window. Also, each time you toggle it on, the inside and outside window configurations become the same as the current configuration." (interactive) @@ -3055,7 +3055,7 @@ Otherwise, toggle for all windows." (interactive) (if (not edebug-active) (error "Edebug is not active")) - (setq edebug-inside-windows + (setq edebug-inside-windows (edebug-current-windows edebug-save-windows)) (edebug-set-windows edebug-outside-windows) (goto-char edebug-outside-point) @@ -3075,15 +3075,15 @@ The default is one second." (save-window-excursion (edebug-pop-to-buffer edebug-outside-buffer) (goto-char edebug-outside-point) - (message "Current buffer: %s Point: %s Mark: %s" - (current-buffer) (point) + (message "Current buffer: %s Point: %s Mark: %s" + (current-buffer) (point) (if (marker-buffer (edebug-mark-marker)) (marker-position (edebug-mark-marker)) "<not set>")) (edebug-sit-for arg) (edebug-pop-to-buffer edebug-buffer (car edebug-window-data))))) -;; Joe Wells, here is a start at your idea of adding a buffer to the internal +;; Joe Wells, here is a start at your idea of adding a buffer to the internal ;; display list. Still need to use this list in edebug-display. '(defvar edebug-display-buffer-list nil @@ -3144,7 +3144,7 @@ The default is one second." (let* ((edebug-def-name (car edebug-stop-point)) (index (cdr edebug-stop-point)) (edebug-data (get edebug-def-name 'edebug)) - + ;; pull out parts of edebug-data (edebug-def-mark (car edebug-data)) (edebug-breakpoints (car (cdr edebug-data))) @@ -3163,7 +3163,7 @@ The default is one second." (car edebug-breakpoints))) (goto-char (+ edebug-def-mark (aref offset-vector (car breakpoint)))) - + (message "%s" (concat (if (nth 2 breakpoint) "Temporary " "") @@ -3179,13 +3179,13 @@ The default is one second." "Modify the breakpoint for the form at point or after it according to FLAG: set if t, clear if nil. Then move to that point. If CONDITION or TEMPORARY are non-nil, add those attributes to -the breakpoint. " +the breakpoint. " (let ((edebug-stop-point (edebug-find-stop-point))) (if edebug-stop-point (let* ((edebug-def-name (car edebug-stop-point)) (index (cdr edebug-stop-point)) (edebug-data (get edebug-def-name 'edebug)) - + ;; pull out parts of edebug-data (edebug-def-mark (car edebug-data)) (edebug-breakpoints (car (cdr edebug-data))) @@ -3209,7 +3209,7 @@ the breakpoint. " (if present (message "Breakpoint unset in %s" edebug-def-name) (message "No breakpoint here"))) - + (setcar (cdr edebug-data) edebug-breakpoints) (goto-char (+ edebug-def-mark (aref offset-vector index))) )))) @@ -3227,8 +3227,8 @@ With prefix argument, make it a temporary breakpoint." (defun edebug-set-global-break-condition (expression) - (interactive (list (read-minibuffer - "Global Condition: " + (interactive (list (read-minibuffer + "Global Condition: " (format "%s" edebug-global-break-condition)))) (setq edebug-global-break-condition expression)) @@ -3319,7 +3319,7 @@ Useful for exiting from trace or continue loop." '(defun edebug-forward () "Proceed to the exit of the next expression to be evaluated." (interactive) - (edebug-set-mode + (edebug-set-mode 'forward "Forward" "Edebug will stop after exiting the next expression.")) @@ -3381,7 +3381,7 @@ go to the end of the last sexp, or if that is the same point, then step." func)))))) (defun edebug-instrument-callee () - "Instrument the definition of the function or macro about to be called. + "Instrument the definition of the function or macro about to be called. Do this when stopped before the form or it will be too late. One side effect of using this command is that the next time the function or macro is called, Edebug will be called there as well." @@ -3399,8 +3399,8 @@ function or macro is called, Edebug will be called there as well." (defun edebug-step-in () - "Step into the definition of the function or macro about to be called. -This first does `edebug-instrument-callee' to ensure that it is + "Step into the definition of the function or macro about to be called. +This first does `edebug-instrument-callee' to ensure that it is instrumented. Then it does `edebug-on-entry' and switches to `go' mode." (interactive) (let ((func (edebug-instrument-callee))) @@ -3421,7 +3421,7 @@ cancelled the first time the function is entered." (interactive "aEdebug on entry to: ") (put function 'edebug-on-entry nil)) - + (if (not (fboundp 'edebug-original-debug-on-entry)) (fset 'edebug-original-debug-on-entry (symbol-function 'debug-on-entry))) '(fset 'debug-on-entry 'edebug-debug-on-entry) ;; Should we do this? @@ -3513,7 +3513,7 @@ Return the result of the last expression." `(save-excursion ; of current-buffer (if edebug-save-windows (progn - ;; After excursion, we will + ;; After excursion, we will ;; restore to current window configuration. (setq edebug-inside-windows (edebug-current-windows edebug-save-windows)) @@ -3565,7 +3565,7 @@ Return the result of the last expression." (edebug-set-windows edebug-inside-windows)) ;; Save values that may have been changed. - (setq + (setq edebug-outside-last-command-char last-command-char edebug-outside-last-command-event last-command-event edebug-outside-last-command last-command @@ -3601,11 +3601,11 @@ Return the result of the last expression." (eval edebug-expr))) (defun edebug-safe-eval (edebug-expr) - ;; Evaluate EXPR safely. + ;; Evaluate EXPR safely. ;; If there is an error, a string is returned describing the error. (condition-case edebug-err (edebug-eval edebug-expr) - (error (edebug-format "%s: %s" ;; could + (error (edebug-format "%s: %s" ;; could (get (car edebug-err) 'error-message) (car (cdr edebug-err)))))) @@ -3650,10 +3650,10 @@ Return the result of the last expression." (defun edebug-report-error (edebug-value) ;; Print an error message like command level does. ;; This also prints the error name if it has no error-message. - (message "%s: %s" + (message "%s: %s" (or (get (car edebug-value) 'error-message) (format "peculiar error (%s)" (car edebug-value))) - (mapconcat (function (lambda (edebug-arg) + (mapconcat (function (lambda (edebug-arg) ;; continuing after an error may ;; complain about edebug-arg. why?? (prin1-to-string edebug-arg))) @@ -3663,7 +3663,7 @@ Return the result of the last expression." (defvar print-level nil) (defvar print-circle nil) (defvar print-readably) ;; defined by lemacs -;; Alternatively, we could change the definition of +;; Alternatively, we could change the definition of ;; edebug-safe-prin1-to-string to only use these if defined. (defun edebug-safe-prin1-to-string (value) @@ -3682,9 +3682,9 @@ Return the result of the last expression." (format "Result: %s = %s" edebug-previous-value (single-key-description edebug-previous-value)) (if edebug-unwrap-results - (setq edebug-previous-value + (setq edebug-previous-value (edebug-unwrap* edebug-previous-value))) - (concat "Result: " + (concat "Result: " (edebug-safe-prin1-to-string edebug-previous-value))))) (defun edebug-previous-result () @@ -3695,10 +3695,10 @@ Return the result of the last expression." ;;; Read, Eval and Print (defun edebug-eval-expression (edebug-expr) - "Evaluate an expression in the outside environment. + "Evaluate an expression in the outside environment. If interactive, prompt for the expression. Print result in minibuffer." - (interactive (list (read-from-minibuffer + (interactive (list (read-from-minibuffer "Eval: " nil read-expression-map t 'read-expression-history))) (princ @@ -3713,12 +3713,12 @@ print value in minibuffer." (edebug-eval-expression (edebug-last-sexp))) (defun edebug-eval-print-last-sexp () - "Evaluate sexp before point in the outside environment; + "Evaluate sexp before point in the outside environment; print value into current buffer." (interactive) (let* ((edebug-form (edebug-last-sexp)) (edebug-result-string - (edebug-outside-excursion + (edebug-outside-excursion (edebug-safe-prin1-to-string (edebug-safe-eval edebug-form)))) (standard-output (current-buffer))) (princ "\n") @@ -3727,14 +3727,14 @@ print value into current buffer." (princ "\n") )) -;;; Edebug Minor Mode +;;; Edebug Minor Mode ;; Global GUD bindings for all emacs-lisp-mode buffers. (define-key emacs-lisp-mode-map "\C-x\C-a\C-s" 'edebug-step-mode) (define-key emacs-lisp-mode-map "\C-x\C-a\C-n" 'edebug-next-mode) (define-key emacs-lisp-mode-map "\C-x\C-a\C-c" 'edebug-go-mode) (define-key emacs-lisp-mode-map "\C-x\C-a\C-l" 'edebug-where) - + (defvar edebug-mode-map nil) (if edebug-mode-map @@ -3758,7 +3758,7 @@ print value into current buffer." (define-key edebug-mode-map "I" 'edebug-instrument-callee) (define-key edebug-mode-map "i" 'edebug-step-in) (define-key edebug-mode-map "o" 'edebug-step-out) - + ;; quitting and stopping (define-key edebug-mode-map "q" 'top-level) (define-key edebug-mode-map "Q" 'edebug-top-level-nonstop) @@ -3771,13 +3771,13 @@ print value into current buffer." (define-key edebug-mode-map "B" 'edebug-next-breakpoint) (define-key edebug-mode-map "x" 'edebug-set-conditional-breakpoint) (define-key edebug-mode-map "X" 'edebug-set-global-break-condition) - + ;; evaluation (define-key edebug-mode-map "r" 'edebug-previous-result) (define-key edebug-mode-map "e" 'edebug-eval-expression) (define-key edebug-mode-map "\C-x\C-e" 'edebug-eval-last-sexp) (define-key edebug-mode-map "E" 'edebug-visit-eval-list) - + ;; views (define-key edebug-mode-map "w" 'edebug-where) (define-key edebug-mode-map "v" 'edebug-view-outside) ;; maybe obsolete?? @@ -3788,7 +3788,7 @@ print value into current buffer." ;; misc (define-key edebug-mode-map "?" 'edebug-help) (define-key edebug-mode-map "d" 'edebug-backtrace) - + (define-key edebug-mode-map "-" 'negative-argument) ;; statistics @@ -3801,7 +3801,7 @@ print value into current buffer." (define-key edebug-mode-map "\C-x " 'edebug-set-breakpoint) (define-key edebug-mode-map "\C-c\C-d" 'edebug-unset-breakpoint) - (define-key edebug-mode-map "\C-c\C-t" + (define-key edebug-mode-map "\C-c\C-t" (function (lambda () (edebug-set-breakpoint t)))) (define-key edebug-mode-map "\C-c\C-l" 'edebug-where) )) @@ -3858,7 +3858,7 @@ print value into current buffer." In addition to all Emacs Lisp commands (except those that modify the buffer) there are local and global key bindings to several Edebug -specific commands. E.g. `edebug-step-mode' is bound to \\[edebug-step-mode] +specific commands. E.g. `edebug-step-mode' is bound to \\[edebug-step-mode] in the Edebug buffer and \\<global-map>\\[edebug-step-mode] in any buffer. Also see bindings for the eval list buffer, *edebug*. @@ -3899,7 +3899,7 @@ edebug-global-break-condition ;; Assumes in outside environment. ;; Don't do any edebug things now. (let ((edebug-execution-mode 'Go-nonstop) - (edebug-trace nil)) + (edebug-trace nil)) (mapcar 'edebug-safe-eval edebug-eval-list))) (defun edebug-eval-display-list (edebug-eval-result-list) @@ -3963,7 +3963,7 @@ May only be called from within edebug-recursive-edit." (progn (forward-sexp 1) (setq new-list (cons (edebug-last-sexp) new-list)))) - + (while (re-search-forward "^;" nil t) (forward-line 1) (skip-chars-forward " \t\n\r") @@ -3972,7 +3972,7 @@ May only be called from within edebug-recursive-edit." (progn (forward-sexp 1) (setq new-list (cons (edebug-last-sexp) new-list))))) - + (setq edebug-eval-list (nreverse new-list)) (edebug-eval-redisplay) (goto-char starting-point))) @@ -3998,7 +3998,7 @@ May only be called from within edebug-recursive-edit." (if edebug-eval-mode-map nil (setq edebug-eval-mode-map (copy-keymap lisp-interaction-mode-map)) - + (define-key edebug-eval-mode-map "\C-c\C-w" 'edebug-where) (define-key edebug-eval-mode-map "\C-c\C-d" 'edebug-delete-eval-item) (define-key edebug-eval-mode-map "\C-c\C-u" 'edebug-update-eval-list) @@ -4037,7 +4037,7 @@ Global commands prefixed by global-edebug-prefix: ;; edebug is not dependent on this, yet. (defun edebug (&optional edebug-arg-mode &rest debugger-args) - "Replacement for debug. + "Replacement for debug. If we are running an edebugged function, show where we last were. Otherwise call debug normally." ;; (message "entered: %s depth: %s edebug-recursion-depth: %s" @@ -4055,7 +4055,7 @@ show where we last were. Otherwise call debug normally." (edebug-break (null edebug-arg-mode)) ;; if called explicitly ) (edebug-display) - (if (eq edebug-arg-mode 'error) + (if (eq edebug-arg-mode 'error) nil edebug-value)) @@ -4081,7 +4081,7 @@ show where we last were. Otherwise call debug normally." last-ok-point) (backtrace) - ;; Clean up the backtrace. + ;; Clean up the backtrace. ;; Not quite right for current edebug scheme. (set-buffer edebug-backtrace-buffer) (setq truncate-lines t) @@ -4092,7 +4092,7 @@ show where we last were. Otherwise call debug normally." ;; Delete interspersed edebug internals. (while (re-search-forward "^ \(?edebug" nil t) (beginning-of-line) - (cond + (cond ((looking-at "^ \(edebug-after") ;; Previous lines may contain code, so just delete this line (setq last-ok-point (point)) @@ -4186,7 +4186,7 @@ reinstrument it." last-index i) ;; Find all indexes on same line. - (while (and (<= 0 (setq i (1- i))) + (while (and (<= 0 (setq i (1- i))) (<= start-of-line (aref edebug-points i)))) ;; Insert all the indices for this line. (forward-line 1) @@ -4202,10 +4202,10 @@ reinstrument it." (goto-char (+ (aref edebug-points i) def-mark)) (- (current-column) (if (= ?\( (following-char)) 0 1))))) - (insert (make-string + (insert (make-string (max 0 (- col (- (point) start-of-count-line))) ?\ ) (if (and (< 0 count) - (not (memq coverage + (not (memq coverage '(unknown ok-coverage)))) "=" "") (if (= count last-count) "" (int-to-string count)) @@ -4291,7 +4291,7 @@ It is removed when you hit any char." :style toggle :selected edebug-test-coverage] ["Save Windows" edebug-toggle-save-windows :style toggle :selected edebug-save-windows] - ["Save Point" + ["Save Point" (edebug-toggle 'edebug-save-displayed-buffer-points) :style toggle :selected edebug-save-displayed-buffer-points] )) @@ -4311,7 +4311,7 @@ It is removed when you hit any char." The condition is evaluated in the outside context. With prefix argument, make it a temporary breakpoint." ;; (interactive "P\nxCondition: ") - (interactive + (interactive (list current-prefix-arg ;; Read condition as follows; getting previous condition is cumbersome: @@ -4329,7 +4329,7 @@ With prefix argument, make it a temporary breakpoint." (cons edebug-break-condition read-expression-history) read-expression-history))) (prog1 - (read-from-minibuffer + (read-from-minibuffer "Condition: " nil read-expression-map t 'edebug-expression-history) (setq read-expression-history edebug-expression-history) @@ -4351,7 +4351,7 @@ With prefix argument, make it a temporary breakpoint." ;; Disabled before edebug-recursive-edit. (eval-when-compile (if edebug-unread-command-char-warning - (put 'unread-command-char 'byte-obsolete-variable + (put 'unread-command-char 'byte-obsolete-variable edebug-unread-command-char-warning))) (eval-when-compile @@ -4362,19 +4362,19 @@ With prefix argument, make it a temporary breakpoint." (defun byte-compile-resolve-functions (funcs) "Say it is OK for the named functions to be unresolved." - (mapcar - (function + (mapcar + (function (lambda (func) (setq byte-compile-unresolved-functions (delq (assq func byte-compile-unresolved-functions) byte-compile-unresolved-functions)))) funcs) nil) - + '(defun byte-compile-resolve-free-references (vars) "Say it is OK for the named variables to be referenced." - (mapcar - (function + (mapcar + (function (lambda (var) (setq byte-compile-free-references (delq var byte-compile-free-references)))) @@ -4383,26 +4383,26 @@ With prefix argument, make it a temporary breakpoint." '(defun byte-compile-resolve-free-assignments (vars) "Say it is OK for the named variables to be assigned." - (mapcar - (function + (mapcar + (function (lambda (var) (setq byte-compile-free-assignments (delq var byte-compile-free-assignments)))) vars) nil) - (byte-compile-resolve-functions - '(reporter-submit-bug-report + (byte-compile-resolve-functions + '(reporter-submit-bug-report edebug-gensym ;; also in cl.el ;; Interfaces to standard functions. - edebug-original-eval-defun + edebug-original-eval-defun edebug-original-read edebug-get-buffer-window edebug-mark edebug-mark-marker - edebug-input-pending-p + edebug-input-pending-p edebug-sit-for - edebug-prin1-to-string + edebug-prin1-to-string edebug-format ;; lemacs zmacs-deactivate-region @@ -4432,7 +4432,7 @@ With prefix argument, make it a temporary breakpoint." (add-hook 'cl-load-hook (function (lambda () (require 'cl-specs))))) -;;; edebug-cl-read and cl-read are available from liberte@cs.uiuc.edu +;;; edebug-cl-read and cl-read are available from liberte@cs.uiuc.edu (if (featurep 'cl-read) (add-hook 'edebug-setup-hook (function (lambda () (require 'edebug-cl-read)))) diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index 954a2afd514..7194d4e54d4 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -92,7 +92,7 @@ ;; In the mean time `grep '^(.*ewoc-[^-]' emacs-lisp/ewoc.el' can help ;; you find all the exported functions: -;; +;; ;; (defun ewoc-create (pretty-printer &optional header footer) ;; (defalias 'ewoc-data 'ewoc--node-data) ;; (defun ewoc-location (node) @@ -394,8 +394,8 @@ MAP-FUNCTION is applied to the first element first. If MAP-FUNCTION returns non-nil the element will be refreshed (its pretty-printer will be called once again). -Note that the buffer for EWOC will be current buffer when MAP-FUNCTION -is called. MAP-FUNCTION must restore the current buffer to BUFFER before +Note that the buffer for EWOC will be current buffer when MAP-FUNCTION +is called. MAP-FUNCTION must restore the current buffer to BUFFER before it returns, if it changes it. If more than two arguments are given, the remaining @@ -410,7 +410,7 @@ arguments will be passed to MAP-FUNCTION." (defun ewoc-filter (ewoc predicate &rest args) "Remove all elements in EWOC for which PREDICATE returns nil. -Note that the buffer for EWOC will be current-buffer when PREDICATE +Note that the buffer for EWOC will be current-buffer when PREDICATE is called. PREDICATE must restore the current buffer before it returns if it changes it. The PREDICATE is called with the element as its first argument. If any @@ -478,7 +478,7 @@ If the EWOC is empty, nil is returned." ;; best-guess is now a "best guess". ;; Find the correct node. First determine in which direction ;; it lies, and then move in that direction until it is found. - + (cond ;; Is pos after the guess? ((>= pos diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 4192209b7d8..74afa4a4a64 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -312,7 +312,7 @@ The library where VARIABLE is defined is searched for in FILE or `find-function-source-path', if non nil, otherwise in `load-path'." (if (not variable) (error "You didn't specify a variable")) - ;; Fixme: I think `symbol-file' should be fixed instead. -- fx + ;; Fixme: I think `symbol-file' should be fixed instead. -- fx (let ((library (or file (symbol-file (cons 'defvar variable))))) (find-function-search-for-symbol variable 'variable library))) diff --git a/lisp/emacs-lisp/gulp.el b/lisp/emacs-lisp/gulp.el index eb9f8af4105..a176a7ac013 100644 --- a/lisp/emacs-lisp/gulp.el +++ b/lisp/emacs-lisp/gulp.el @@ -103,7 +103,7 @@ is left in the `*gulp*' buffer at the end." (while (setq node (car m-p-alist)) (setq msg (gulp-create-message (cdr node) time)) (setq mail-setup-hook - (lambda () + (lambda () (mail-subject) (insert "It's time for Emacs updates again") (goto-char (point-max)) diff --git a/lisp/emacs-lisp/levents.el b/lisp/emacs-lisp/levents.el index 535d2d36650..13d13beb998 100644 --- a/lisp/emacs-lisp/levents.el +++ b/lisp/emacs-lisp/levents.el @@ -98,8 +98,8 @@ in is the second. This function contains knowledge about what the codes mean -- for example, the number 9 is converted to the character Tab, not the distinct character Control-I. -Beware that character-to-event and event-to-character are not strictly -inverse functions, since events contain much more information than the +Beware that character-to-event and event-to-character are not strictly +inverse functions, since events contain much more information than the ASCII character set can encode." ch) @@ -214,11 +214,11 @@ In this emulation, it returns nil for non-mouse-related events." (defun event-to-character (event &optional lenient) "Returns the closest ASCII approximation to the given event object. If the event isn't a keypress, this returns nil. -If the second argument is non-nil, then this is lenient in its +If the second argument is non-nil, then this is lenient in its translation; it will ignore modifier keys other than control and meta, -and will ignore the shift modifier on those characters which have no -shifted ASCII equivalent (Control-Shift-A for example, will be mapped to -the same ASCII code as Control-A.) If the second arg is nil, then nil +and will ignore the shift modifier on those characters which have no +shifted ASCII equivalent (Control-Shift-A for example, will be mapped to +the same ASCII code as Control-A.) If the second arg is nil, then nil will be returned for events which have no direct ASCII equivalent." (if (symbolp event) (and lenient diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el index bda307198f8..bdd174a024f 100644 --- a/lisp/emacs-lisp/lisp-mnt.el +++ b/lisp/emacs-lisp/lisp-mnt.el @@ -32,7 +32,7 @@ ;; First, it knows about the header conventions for library packages. ;; One entry point supports generating synopses from a library directory. ;; Another can be used to check for missing headers in library files. -;; +;; ;; Another entry point automatically addresses bug mail to a package's ;; maintainer or author. @@ -40,11 +40,11 @@ ;; This file is an example of the header conventions. Note the following ;; features: -;; +;; ;; * Header line --- makes it possible to extract a one-line summary of ;; the package's uses automatically for use in library synopses, KWIC ;; indexes and the like. -;; +;; ;; Format is three semicolons, followed by the filename, followed by ;; three dashes, followed by the summary. All fields space-separated. ;; @@ -55,13 +55,13 @@ ;; ;; Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. ;; ;; * A blank line -;; +;; ;; * Author line --- contains the name and net address of at least ;; the principal author. -;; +;; ;; If there are multiple authors, they should be listed on continuation ;; lines led by ;;<TAB>, like this: -;; +;; ;; ;; Author: Ashwin Ram <Ram-Ashwin@cs.yale.edu> ;; ;; Dave Sill <de5@ornl.gov> ;; ;; David Lawrence <tale@pawl.rpi.edu> @@ -69,10 +69,10 @@ ;; ;; Joe Wells <jbw@maverick.uswest.com> ;; ;; Dave Brennan <brennan@hal.com> ;; ;; Eric Raymond <esr@snark.thyrsus.com> -;; +;; ;; This field may have some special values; notably "FSF", meaning ;; "Free Software Foundation". -;; +;; ;; * Maintainer line --- should be a single name/address as in the Author ;; line, or an address only, or the string "FSF". If there is no maintainer ;; line, the person(s) in the Author field are presumed to be it. The example @@ -81,19 +81,19 @@ ;; that does "send mail to the author" without having to mine the name out by ;; hand. Please be careful about surrounding the network address with <> if ;; there's also a name in the field. -;; +;; ;; * Created line --- optional, gives the original creation date of the ;; file. For historical interest, basically. -;; +;; ;; * Version line --- intended to give the reader a clue if they're looking ;; at a different version of the file than the one they're accustomed to. This ;; may be an RCS or SCCS header. -;; +;; ;; * Adapted-By line --- this is for FSF's internal use. The person named ;; in this field was the one responsible for installing and adapting the ;; package for the distribution. (This file doesn't have one because the ;; author *is* one of the maintainers.) -;; +;; ;; * Keywords line --- used by the finder code (now under construction) ;; for finding Emacs Lisp code related to a topic. ;; @@ -104,13 +104,13 @@ ;; ;; * Commentary line --- enables Lisp code to find the developer's and ;; maintainers' explanations of the package internals. -;; +;; ;; * Change log line --- optional, exists to terminate the commentary ;; section and start a change-log part, if one exists. -;; +;; ;; * Code line --- exists so Lisp can know where commentary and/or ;; change-log sections end. -;; +;; ;; * Footer line --- marks end-of-file so it can be distinguished from ;; an expanded formfeed or the results of truncation. diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 60110149388..171f059d09f 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -403,16 +403,16 @@ which see." (defun last-sexp-setup-props (beg end value alt1 alt2) "Set up text properties for the output of `eval-last-sexp-1'. BEG and END are the start and end of the output in current-buffer. -VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the +VALUE is the Lisp value printed, ALT1 and ALT2 are strings for the alternative printed representations that can be displayed." (let ((map (make-sparse-keymap))) (define-key map "\C-m" 'last-sexp-toggle-display) (define-key map [down-mouse-2] 'mouse-set-point) (define-key map [mouse-2] 'last-sexp-toggle-display) (add-text-properties - beg end + beg end `(printed-value (,value ,alt1 ,alt2) - mouse-face highlight + mouse-face highlight keymap ,map help-echo "RET, mouse-2: toggle abbreviated display" rear-nonsticky (mouse-face keymap help-echo @@ -430,7 +430,7 @@ alternative printed representations that can be displayed." (point (point))) (delete-region beg end) (insert (nth 1 value)) - (last-sexp-setup-props beg (point) + (last-sexp-setup-props beg (point) (nth 0 value) (nth 2 value) (nth 1 value)) @@ -508,7 +508,7 @@ With argument, print output into current buffer." (not (null print-level))) (not (string= unabbreviated (buffer-substring-no-properties beg end)))) - (last-sexp-setup-props beg end value + (last-sexp-setup-props beg end value unabbreviated (buffer-substring-no-properties beg end)) )))))) diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index b209c210c4f..2e54f224a47 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -31,7 +31,7 @@ :prefix "pp-" :group 'lisp) -(defcustom pp-escape-newlines t +(defcustom pp-escape-newlines t "*Value of `print-escape-newlines' used by pp-* functions." :type 'boolean :group 'pp) diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index e62a62b0942..8740a68911f 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -269,7 +269,7 @@ Except for Lisp syntax this is the same as `reb-regexp'.") (define-key reb-lisp-mode-map "\C-c" (lookup-key reb-mode-map "\C-c")) -(defvar reb-subexp-mode-map +(defvar reb-subexp-mode-map (let ((m (make-keymap))) (suppress-keymap m) ;; Again share the "\C-c" keymap for the commands diff --git a/lisp/emacs-lisp/regexp-opt.el b/lisp/emacs-lisp/regexp-opt.el index 8ac4849d896..486cf006e4b 100644 --- a/lisp/emacs-lisp/regexp-opt.el +++ b/lisp/emacs-lisp/regexp-opt.el @@ -218,7 +218,7 @@ in REGEXP." (regexp-quote (concat (nreverse (string-to-list xiffus)))) close-group)) - + ;; Otherwise, divide the list into those that start with a ;; particular letter and those that do not, and recurse on them. (let* ((char (char-to-string (string-to-char (car strings)))) diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index a58a38bf213..3ac3538822d 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -78,8 +78,8 @@ ;; (and line-start ?\n))) ;; ;; "\\$[I]d: [^ ]+ \\([^ ]+\\) " -;; (rx (and "$Id: " -;; (1+ (not (in " "))) +;; (rx (and "$Id: " +;; (1+ (not (in " "))) ;; " " ;; (submatch (1+ (not (in " ")))) ;; " ")) @@ -90,7 +90,7 @@ ;; etc. ;;; History: -;; +;; ;;; Code: @@ -244,7 +244,7 @@ See also `rx-constituents'." (while (and (not (null op)) (symbolp op)) (setq op (cdr (assq op rx-constituents)))) op) - + (defun rx-check (form) "Check FORM according to its car's parsing info." @@ -396,7 +396,7 @@ FORM is either `(repeat N FORM1)' or `(repeat N M FORM1)'." (defun rx-kleene (form) "Parse and produce code from FORM. FORM is `(OP FORM1)', where OP is one of the `zero-or-one', -`zero-or-more' etc. operators. +`zero-or-more' etc. operators. If OP is one of `*', `+', `?', produce a greedy regexp. If OP is one of `*?', `+?', `??', produce a non-greedy regexp. If OP is anything else, produce a greedy regexp if `rx-greedy-flag' @@ -463,7 +463,7 @@ of all atomic regexps." (cdr (assq form rx-categories))) (error "Unknown category `%s'" form)) t) - + (defun rx-category (form) "Parse and produce code from FORM, which is `(category SYMBOL ...)'." @@ -511,7 +511,7 @@ NO-GROUP non-nil means don't put shy groups around the result." info) ((null info) (error "Unknown Rx form `%s'" form)) - (t + (t (funcall (nth 0 info) form))))) ((consp form) (let ((info (rx-info (car form)))) @@ -549,7 +549,7 @@ CHAR matches any character in SET. SET may be a character or string. Ranges of characters can be specified as `A-Z' in strings. -'(in SET)' +'(in SET)' like `any'. `(not (any SET))' @@ -751,7 +751,7 @@ CHAR `(one-or-more SEXP)' matches one or more occurrences of A. - + `(1+ SEXP)' like `one-or-more'. @@ -763,7 +763,7 @@ CHAR `(zero-or-one SEXP)' matches zero or one occurrences of A. - + `(optional SEXP)' like `zero-or-one'. diff --git a/lisp/emacs-lisp/shadow.el b/lisp/emacs-lisp/shadow.el index 3618cdd9ea2..82230b1d2ec 100644 --- a/lisp/emacs-lisp/shadow.el +++ b/lisp/emacs-lisp/shadow.el @@ -74,7 +74,7 @@ the file in position 2i+1. Emacs Lisp file suffixes \(.el and .elc\) are stripped from the file names in the list. See the documentation for `list-load-path-shadows' for further information." - + (or path (setq path load-path)) (let (true-names ; List of dirs considered. @@ -86,7 +86,7 @@ See the documentation for `list-load-path-shadows' for further information." files-seen-this-dir ; Files seen so far in this dir. file) ; The current file. - + (while path (setq dir (directory-file-name (file-truename (or (car path) ".")))) @@ -125,7 +125,7 @@ See the documentation for `list-load-path-shadows' for further information." ;; This test prevents us declaring that XXX.el shadows ;; XXX.elc (or vice-versa) when they are in the same directory. (setq files-seen-this-dir (cons file files-seen-this-dir)) - + (if (setq orig-dir (assoc file files)) ;; This file was seen before, we have a shadowing. ;; Report it unless the files are identical. @@ -202,7 +202,7 @@ considered to shadow a later file XXX.el, and vice-versa. When run interactively, the shadowings \(if any\) are displayed in a buffer called `*Shadows*'. Shadowings are located by calling the \(non-interactive\) companion function, `find-emacs-lisp-shadows'." - + (interactive) (let* ((path (copy-sequence load-path)) (tem path) diff --git a/lisp/emacs-lisp/syntax.el b/lisp/emacs-lisp/syntax.el index 89660e48d77..d7ad3bacd45 100644 --- a/lisp/emacs-lisp/syntax.el +++ b/lisp/emacs-lisp/syntax.el @@ -113,7 +113,7 @@ avoid a more expansive scan. Point is at POS when this function returns." ;; Default values. (unless pos (setq pos (point))) - ;; + ;; (let ((old-ppss (cdr syntax-ppss-last)) (old-pos (car syntax-ppss-last)) (ppss nil) @@ -129,7 +129,7 @@ Point is at POS when this function returns." (incf (car (aref syntax-ppss-stats 0))) (incf (cdr (aref syntax-ppss-stats 0)) (- pos old-pos)) (parse-partial-sexp old-pos pos nil nil old-ppss)) - + (cond ;; Use OLD-PPSS if possible and close enough. ((and (not old-pos) old-ppss @@ -253,7 +253,7 @@ Point is at POS when this function returns." syntax-ppss-max-span)) (push pair syntax-ppss-cache) (setcar syntax-ppss-cache pair))))))))) - + (setq syntax-ppss-last (cons pos ppss)) ppss))) diff --git a/lisp/emacs-lisp/tq.el b/lisp/emacs-lisp/tq.el index 3a32c0b5169..36b1cffbd85 100644 --- a/lisp/emacs-lisp/tq.el +++ b/lisp/emacs-lisp/tq.el @@ -25,7 +25,7 @@ ;; Boston, MA 02111-1307, USA. ;;; Commentary: - + ;; manages receiving a stream asynchronously, ;; parsing it into transactions, and then calling ;; handler functions @@ -68,7 +68,7 @@ to a tcp server on another machine." (defun tq-queue-head-closure (tq) (car (cdr (car (tq-queue tq))))) (defun tq-queue-empty (tq) (not (tq-queue tq))) (defun tq-queue-pop (tq) (setcar tq (cdr (car tq))) (null (car tq))) - + ;;; must add to queue before sending! (defun tq-enqueue (tq question regexp closure fn) diff --git a/lisp/emacs-lisp/unsafep.el b/lisp/emacs-lisp/unsafep.el index 9ac3beb1949..99ce30be98d 100644 --- a/lisp/emacs-lisp/unsafep.el +++ b/lisp/emacs-lisp/unsafep.el @@ -212,7 +212,7 @@ of symbols with local bindings." (defun unsafep-function (fun) "Return nil if FUN is a safe function \(either a safe lambda or a symbol that names a safe function). Otherwise -result is a reason code." +result is a reason code." (cond ((eq (car-safe fun) 'lambda) (unsafep fun unsafep-vars)) diff --git a/lisp/emulation/crisp.el b/lisp/emulation/crisp.el index 13aa47c7667..8a5410d48a7 100644 --- a/lisp/emulation/crisp.el +++ b/lisp/emulation/crisp.el @@ -338,7 +338,7 @@ consecutive use moves point to the end of the buffer." "Go back one buffer." (interactive) (switch-to-buffer (car (last (buffer-list))))) - + (defun crisp-meta-x-wrapper () "Wrapper function to conditionally override the normal M-x bindings. When `crisp-override-meta-x' is non-nil, M-x will exit Emacs (the diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 8a2efcc8b0e..24f4e5e946a 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el @@ -54,7 +54,7 @@ ;; This probably sounds strange and difficult to get used to - but ;; based on my own experience and the feedback from many users of ;; this package, it actually works very well and users adapt to it -;; instantly - or at least very quickly. So give it a try! +;; instantly - or at least very quickly. So give it a try! ;; ... and in the few cases where you make a mistake and accidentally ;; delete the region - you just undo the mistake (with C-z). ;; @@ -120,15 +120,15 @@ ;; -------------------- ;; Emacs' standard register support is also based on a separate set of ;; "register commands". -;; +;; ;; CUA's register support is activated by providing a numeric ;; prefix argument to the C-x, C-c, and C-v commands. For example, ;; to copy the selected region to register 2, enter [M-2 C-c]. ;; Or if you have activated the keypad prefix mode, enter [kp-2 C-c]. -;; +;; ;; And CUA will copy and paste normal region as well as rectangles ;; into the registers, i.e. you use exactly the same command for both. -;; +;; ;; In addition, the last highlighted text that is deleted (not ;; copied), e.g. by [delete] or by typing text over a highlighted ;; region, is automatically saved in register 0, so you can insert it @@ -140,7 +140,7 @@ ;; between the mark and point as a "virtual rectangle", and using a ;; completely separate set of "rectangle commands" [C-x r ...] on the ;; region to copy, kill, fill a.s.o. the virtual rectangle. -;; +;; ;; cua-mode's superior rectangle support is based on using a true visual ;; representation of the selected rectangle. To start a rectangle, use ;; [S-return] and extend it using the normal movement keys (up, down, @@ -154,12 +154,12 @@ ;; the rectangle is inserted into the existing lines in the buffer. ;; If overwrite-mode is active when you paste a rectangle, it is ;; inserted as normal (multi-line) text. -;; +;; ;; Furthermore, cua-mode's rectangles are not limited to the actual ;; contents of the buffer, so if the cursor is currently at the end of a ;; short line, you can still extend the rectangle to include more columns ;; of longer lines in the same rectangle. Sounds strange? Try it! -;; +;; ;; You can enable padding for just this rectangle by pressing [M-p]; ;; this works like entering `picture-mode' where the tabs and spaces ;; are automatically converted/inserted to make the rectangle truly @@ -185,7 +185,7 @@ ;; paragraph like this one, just place the cursor on the first character ;; of the first line, and enter the following: ;; S-return M-} ; ; <space> S-return - + ;; cua-mode's rectangle support also includes all the normal rectangle ;; functions with easy access: ;; @@ -202,7 +202,7 @@ ;; [M-m] copies the rectangle as normal multi-line text (for paste) ;; [M-n] fills each line of the rectangle with increasing numbers using ;; a supplied format string (prompt) -;; [M-o] opens the rectangle by moving the highlighted text to the +;; [M-o] opens the rectangle by moving the highlighted text to the ;; right of the rectangle and filling the rectangle with blanks. ;; [M-p] toggles rectangle padding, i.e. insert tabs and spaces to ;; make rectangles truly rectangular @@ -222,14 +222,14 @@ ;; are lost, but can be recovered using [C-z]. ;; CUA Global Mark -;; --------------- +;; --------------- ;; The final feature provided by CUA is the "global mark", which ;; makes it very easy to copy bits and pieces from the same and other ;; files into the current text. To enable and cancel the global mark, ;; use [S-C-space]. The cursor will blink when the global mark ;; is active. The following commands behave differently when the global ;; mark is set: -;; <ch> All characters (including newlines) you type are inserted +;; <ch> All characters (including newlines) you type are inserted ;; at the global mark! ;; [C-x] If you cut a region or rectangle, it is automatically inserted ;; at the global mark, and the global mark is advanced. @@ -289,7 +289,7 @@ If the value is t, these mappings are always enabled. If the value is 'shift, these keys are only enabled if the last region was marked with a shifted movement key. If the value is nil, these keys are never enabled." - :type '(choice (const :tag "Disabled" nil) + :type '(choice (const :tag "Disabled" nil) (const :tag "Shift region only" shift) (other :tag "Enabled" t)) :group 'cua) @@ -303,7 +303,7 @@ is not turned on." :type 'boolean :group 'cua) -(defcustom cua-prefix-override-inhibit-delay +(defcustom cua-prefix-override-inhibit-delay (if (featurep 'lisp-float-type) (/ (float 1) (float 5)) nil) "*If non-nil, time in seconds to delay before overriding prefix key. If there is additional input within this time, the prefix key is @@ -325,12 +325,12 @@ If the value is nil, use a shifted prefix key to inhibit the override." (defcustom cua-enable-register-prefix 'not-ctrl-u "*If non-nil, registers are supported via numeric prefix arg. If the value is t, any numeric prefix arg in the range 0 to 9 will be -interpreted as a register number. +interpreted as a register number. If the value is not-ctrl-u, using C-u to enter a numeric prefix is not -interpreted as a register number. +interpreted as a register number. If the value is ctrl-u-only, only numeric prefix entered with C-u is interpreted as a register number." - :type '(choice (const :tag "Disabled" nil) + :type '(choice (const :tag "Disabled" nil) (const :tag "Enabled, but C-u arg is not a register" not-ctrl-u) (const :tag "Enabled, but only for C-u arg" ctrl-u-only) (other :tag "Enabled" t)) @@ -404,7 +404,7 @@ Can be toggled by [M-p] while the rectangle is active," :type 'boolean :group 'cua) -(defface cua-global-mark-face '((((class color)) +(defface cua-global-mark-face '((((class color)) (:foreground "black") (:background "yellow")) (t (:bold t))) @@ -576,7 +576,7 @@ Will change cursor color to specified color if string." (not (numberp cua-prefix-override-inhibit-delay)) (<= cua-prefix-override-inhibit-delay 0) ;; In state [1], start [T] and change to state [2] - (run-with-timer cua-prefix-override-inhibit-delay nil + (run-with-timer cua-prefix-override-inhibit-delay nil 'cua--prefix-override-timeout))) ;; Don't record this command (setq this-command last-command) @@ -604,7 +604,7 @@ Repeating prefix key when region is active works as a single prefix key." (cua-copy-rectangle arg) (cua-copy-region arg)) (let ((keys (this-single-command-keys))) - (setq unread-command-events + (setq unread-command-events (cons (aref keys (1- (length keys))) unread-command-events)))) (defun cua--prefix-cut-handler (arg) @@ -614,7 +614,7 @@ Repeating prefix key when region is active works as a single prefix key." (cua-cut-rectangle arg) (cua-cut-region arg)) (let ((keys (this-single-command-keys))) - (setq unread-command-events + (setq unread-command-events (cons (aref keys (1- (length keys))) unread-command-events)))) (defun cua--prefix-override-timeout () @@ -633,7 +633,7 @@ Repeating prefix key when region is active works as a single prefix key." ;; Execute original command (setq this-command this-original-command) (call-interactively this-command)) - + (defun cua--keep-active () (setq mark-active t deactivate-mark nil)) @@ -650,13 +650,13 @@ Repeating prefix key when region is active works as a single prefix key." (defvar cua--register nil) (defun cua--prefix-arg (arg) - (setq cua--register + (setq cua--register (and cua-enable-register-prefix (integerp arg) (>= arg 0) (< arg 10) (let* ((prefix (aref (this-command-keys) 0)) (ctrl-u-prefix (and (integerp prefix) (= prefix ?\C-u)))) - (cond + (cond ((eq cua-enable-register-prefix 'not-ctrl-u) (not ctrl-u-prefix)) ((eq cua-enable-register-prefix 'ctrl-u-only) @@ -691,7 +691,7 @@ Save a copy in register 0 if `cua-delete-copy-to-register-0' is non-nil." (if cua-delete-copy-to-register-0 (set-register ?0 cua--last-deleted-region-text)) (delete-region start end) - (setq cua--last-deleted-region-pos + (setq cua--last-deleted-region-pos (cons (current-buffer) (and (consp buffer-undo-list) (car buffer-undo-list)))) @@ -861,7 +861,7 @@ of text." (defun cua-help-for-region (&optional help) "Show region specific help in echo area." (interactive) - (message + (message (concat (if help "C-?:help " "") "C-z:undo C-x:cut C-c:copy C-v:paste S-ret:rect"))) @@ -959,7 +959,7 @@ Extra commands should be added to `cua-user-movement-commands'") (unless mark-active (push-mark-command nil nil))) (t - ;; If we set mark-active to nil here, the region highlight will not be + ;; If we set mark-active to nil here, the region highlight will not be ;; removed by the direct_output_ commands. (setq deactivate-mark t))) @@ -969,7 +969,7 @@ Extra commands should be added to `cua-user-movement-commands'") (get this-command 'pending-delete))) (nc (cond ((not ds) nil) - ((eq ds 'yank) + ((eq ds 'yank) 'cua-paste) ((eq ds 'kill) (if cua--rectangle @@ -986,9 +986,9 @@ Extra commands should be added to `cua-user-movement-commands'") (if nc (setq this-original-command this-command this-command nc))))) - + ;; Detect extension of rectangles by mouse or other movement - (setq cua--buffer-and-point-before-command + (setq cua--buffer-and-point-before-command (if cua--rectangle (cons (current-buffer) (point)))) ) (error nil))) @@ -1008,7 +1008,7 @@ Extra commands should be added to `cua-user-movement-commands'") ;; Debugging (if cua--debug - (cond + (cond (cua--rectangle (cua--rectangle-assert)) (mark-active (message "Mark=%d Point=%d Expl=%s" (mark t) (point) cua--explicit-region-start)))) @@ -1123,7 +1123,7 @@ Extra commands should be added to `cua-user-movement-commands'") (define-key cua--prefix-override-keymap [(control x)] 'cua--prefix-override-handler) (define-key cua--prefix-override-keymap [(control c)] 'cua--prefix-override-handler) - + (define-key cua--prefix-repeat-keymap [(control x) (control x)] 'cua--prefix-repeat-handler) (define-key cua--prefix-repeat-keymap [(control x) up] 'cua--prefix-cut-handler) (define-key cua--prefix-repeat-keymap [(control x) down] 'cua--prefix-cut-handler) @@ -1135,7 +1135,7 @@ Extra commands should be added to `cua-user-movement-commands'") (define-key cua--prefix-repeat-keymap [(control c) left] 'cua--prefix-copy-handler) (define-key cua--prefix-repeat-keymap [(control c) right] 'cua--prefix-copy-handler) - ;; Enable shifted fallbacks for C-x and C-c when region is active + ;; Enable shifted fallbacks for C-x and C-c when region is active (define-key cua--region-keymap [(shift control x)] 'Control-X-prefix) (define-key cua--region-keymap [(shift control c)] 'mode-specific-command-prefix) ;; replace current region diff --git a/lisp/emulation/cua-gmrk.el b/lisp/emulation/cua-gmrk.el index 5e482ee8d21..4055fb2b1cc 100644 --- a/lisp/emulation/cua-gmrk.el +++ b/lisp/emulation/cua-gmrk.el @@ -33,7 +33,7 @@ (require 'cua-rect) ) -;;; Global Marker +;;; Global Marker ;; Non-nil when global marker is active. (defvar cua--global-mark-active nil) @@ -72,12 +72,12 @@ (move-marker cua--global-mark-marker (point)) (if (overlayp cua--global-mark-overlay) (move-overlay cua--global-mark-overlay (point) (1+ (point))) - (setq cua--global-mark-overlay + (setq cua--global-mark-overlay (make-overlay (point) (1+ (point)))) (overlay-put cua--global-mark-overlay 'face 'cua-global-mark-face)) (if (and cua-global-mark-blink-cursor-interval (not cua--orig-blink-cursor-interval)) - (setq cua--orig-blink-cursor-interval blink-cursor-interval + (setq cua--orig-blink-cursor-interval blink-cursor-interval blink-cursor-interval cua-global-mark-blink-cursor-interval)) (setq cua--global-mark-active t) (if msg @@ -325,7 +325,7 @@ With prefix argument, don't jump to global mark when cancelling it." (move-to-column col) (move-marker cua--global-mark-marker (point)) (move-overlay cua--global-mark-overlay (point) (1+ (point)))))))) - + (defun cua-cancel-global-mark () "Cancel the global mark." @@ -346,7 +346,7 @@ With prefix argument, don't jump to global mark when cancelling it." (if (or (not (eq (current-buffer) (marker-buffer cua--global-mark-marker))) (not (pos-visible-in-window-p (marker-position cua--global-mark-marker)))) (let ((w (selected-window)) (p (point)) h) - ;; The following code is an attempt to keep the global mark visible in + ;; The following code is an attempt to keep the global mark visible in ;; other window -- but it doesn't work. (switch-to-buffer-other-window (marker-buffer cua--global-mark-marker) t) (goto-char (marker-position cua--global-mark-marker)) diff --git a/lisp/emulation/cua-rect.el b/lisp/emulation/cua-rect.el index a0663d93d2a..47b315d062a 100644 --- a/lisp/emulation/cua-rect.el +++ b/lisp/emulation/cua-rect.el @@ -88,7 +88,7 @@ Knows about CUA rectangle highlighting in addition to standard undo." (let ((l cua--undo-list)) (while l (if (eq (car (car l)) pending-undo-list) - (setq cua--restored-rectangle + (setq cua--restored-rectangle (and (vectorp (cdr (car l))) (cdr (car l))) l nil) (setq l (cdr l))))) @@ -126,7 +126,7 @@ Knows about CUA rectangle highlighting in addition to standard undo." (setcdr cul nil)) (setq cua--tidy-undo-counter (1+ cua--tidy-undo-counter)) (if cua--debug - (message "Clean undo list in %s (%d)" + (message "Clean undo list in %s (%d)" (buffer-name) cc))))))) (setq buffers (cdr buffers))) (/= cnt cua--tidy-undo-counter))) @@ -176,7 +176,7 @@ Knows about CUA rectangle highlighting in addition to standard undo." (let ((c (aref cua--rectangle 4))) (if (not (integerp advance)) c - (aset cua--rectangle 4 + (aset cua--rectangle 4 (if (= advance 0) (- 3 c) ; opposite corner (mod (+ c 4 advance) 4))) @@ -302,9 +302,9 @@ Knows about CUA rectangle highlighting in addition to standard undo." (cua--rectangle-right (1+ (cua--rectangle-right))) (move-to-column (cua--rectangle-right) pad)) ((cua--rectangle-right-side) - (forward-char 1) + (forward-char 1) (cua--rectangle-right (current-column))) - ((or pad (eolp)) + ((or pad (eolp)) (cua--rectangle-left (1+ (cua--rectangle-left))) (move-to-column (cua--rectangle-right) pad)) (t @@ -666,8 +666,8 @@ If command is repeated at same position, delete the rectangle." ;; Turn on rectangular marking mode by disabling transient mark mode ;; and manually handling highlighting from a post command hook. ;; Be careful if we are already marking a rectangle. - (setq cua--rectangle - (if (and cua--last-rectangle + (setq cua--rectangle + (if (and cua--last-rectangle (eq (car cua--last-rectangle) (current-buffer)) (eq (car (cdr cua--last-rectangle)) (point))) (cdr (cdr cua--last-rectangle)) @@ -684,7 +684,7 @@ If command is repeated at same position, delete the rectangle." (defun cua--deactivate-rectangle () ;; This is used to clean up after `cua--activate-rectangle'. (mapcar (function delete-overlay) cua--rectangle-overlays) - (setq cua--last-rectangle (cons (current-buffer) + (setq cua--last-rectangle (cons (current-buffer) (cons (point) ;; cua-save-point cua--rectangle)) cua--rectangle nil @@ -827,7 +827,7 @@ With prefix argument, the toggle restriction." (cua--rectangle-restriction (car r) t (not (car (cdr (cdr r))))) (cua--rectangle-restriction "" nil nil)) (cua--rectangle-restriction - (format "[%c]" + (format "[%c]" (read-char "Restrictive rectangle (char): ")) t arg)))) (defun cua-move-rectangle-up () @@ -1040,7 +1040,7 @@ The length of STRING need not be the same as the rectangle width." (defun cua-sequence-rectangle (first incr fmt) "Resequence each line of CUA rectangle starting from FIRST. The numbers are formatted according to the FORMAT string." - (interactive + (interactive (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) (string-to-number @@ -1169,7 +1169,7 @@ With prefix arg, replace rectangle with output from command." (interactive (list current-prefix-arg (read-from-minibuffer "Shell command on rectangle: " - nil nil nil + nil nil nil 'shell-command-history))) (cua--rectangle-aux-replace -1 t t replace 1 '(lambda (s e) @@ -1185,7 +1185,7 @@ With prefix arg, replace rectangle with output from command." "Remove the first line of the rectangle and scroll remaining lines up." (interactive) (cua--rectangle-aux-replace 0 t t t t - '(lambda (s e) + '(lambda (s e) (if (= (forward-line 1) 0) (delete-region s (point)))))) @@ -1225,7 +1225,7 @@ With prefix arg, indent to that column." indent) (cua--rectangle-operation 'corners nil t pad '(lambda (s e l r) - (move-to-column + (move-to-column (if (cua--rectangle-right-side t) (max (1+ r) col) l) pad) @@ -1243,9 +1243,9 @@ With prefix arg, indent to that column." (defun cua-help-for-rectangle (&optional help) (interactive) (let ((M (if cua-use-hyper-key " H-" " M-"))) - (message + (message (concat (if help "C-?:help" "") - M "p:pad" M "o:open" M "c:close" M "b:blank" + M "p:pad" M "o:open" M "c:close" M "b:blank" M "s:string" M "f:fill" M "i:incr" M "n:seq")))) @@ -1273,7 +1273,7 @@ With prefix arg, indent to that column." (cua--rectangle-bot t) (cua--rectangle-top t)) (if (cua--rectangle-padding) - (setq unread-command-events + (setq unread-command-events (cons (if cua-use-hyper-key ?\H-P ?\M-P) unread-command-events))))) (if cua--rectangle (if (and mark-active @@ -1333,7 +1333,7 @@ With prefix arg, indent to that column." (define-key cua--rectangle-keymap [remap backward-delete-char-untabify] 'cua-delete-char-rectangle) (define-key cua--rectangle-keymap [remap self-insert-command] 'cua-insert-char-rectangle) (define-key cua--rectangle-keymap [remap self-insert-iso] 'cua-insert-char-rectangle) - + ;; Catch self-inserting characters which are "stolen" by other modes (define-key cua--rectangle-keymap [t] '(menu-item "sic" cua-insert-char-rectangle :filter cua--self-insert-char-p)) diff --git a/lisp/emulation/edt-lk201.el b/lisp/emulation/edt-lk201.el index cdbe34060ac..6afadd6c167 100644 --- a/lisp/emulation/edt-lk201.el +++ b/lisp/emulation/edt-lk201.el @@ -43,7 +43,7 @@ ;;; Code: (defconst *EDT-keys* - '(("KP0" . [kp-0]) ("KP1" . [kp-1]) ("KP2" . [kp-2]) ("KP3" . [kp-3]) + '(("KP0" . [kp-0]) ("KP1" . [kp-1]) ("KP2" . [kp-2]) ("KP3" . [kp-3]) ("KP4" . [kp-4]) ("KP5" . [kp-5]) ("KP6" . [kp-6]) ("KP7" . [kp-7]) ("KP8" . [kp-8]) ("KP9" . [kp-9]) ("KP," . [kp-separator]) ("KP-" . [kp-subtract]) ("KPP" . [kp-decimal]) ("KPE" . [kp-enter]) diff --git a/lisp/emulation/edt-pc.el b/lisp/emulation/edt-pc.el index 2b6aa25b061..30e1b535469 100644 --- a/lisp/emulation/edt-pc.el +++ b/lisp/emulation/edt-pc.el @@ -72,7 +72,7 @@ ;;; Code: (defconst *EDT-keys* - '(("KP0" . [kp-0]) ("KP1" . [kp-1]) ("KP2" . [kp-2]) ("KP3" . [kp-3]) + '(("KP0" . [kp-0]) ("KP1" . [kp-1]) ("KP2" . [kp-2]) ("KP3" . [kp-3]) ("KP4" . [kp-4]) ("KP5" . [kp-5]) ("KP6" . [kp-6]) ("KP7" . [kp-7]) ("KP8" . [kp-8]) ("KP9" . [kp-9]) ("KP," . "" ) ("KP-" . [kp-add]) ("KPP" . [kp-decimal]) ("KPE" . [kp-enter]) diff --git a/lisp/emulation/edt.el b/lisp/emulation/edt.el index ecb53bdffbf..427a803da88 100644 --- a/lisp/emulation/edt.el +++ b/lisp/emulation/edt.el @@ -27,7 +27,7 @@ ;;; Commentary: -;; +;; ;; This is Version 4.0 of the EDT Emulation for Emacs 19 and above. ;; It comes with special functions which replicate nearly all of EDT's @@ -41,10 +41,10 @@ ;; Getting Started: -;; To start the EDT Emulation, first start Emacs and then enter +;; To start the EDT Emulation, first start Emacs and then enter ;; ;; M-x edt-emulation-on -;; +;; ;; to begin the emulation. After initialization is complete, the ;; following message will appear below the status line informing you ;; that the emulation has been enabled: "Default EDT keymap active". @@ -59,13 +59,13 @@ ;; Emacs "etc" directory. It contains very helpful user information. ;; The EDT emulation consists of the following files: -;; +;; ;; edt-user.doc - User Instructions and Sample Customization File ;; edt.el - EDT Emulation Functions and Default Configuration ;; edt-lk201.el - Built-in support for DEC LK-201 Keyboards ;; edt-vt100.el - Built-in support for DEC VT-100 (and above) terminals ;; edt-pc.el - Built-in support for PC 101 Keyboards under MS-DOS -;; edt-mapper.el - Create an EDT LK-201 Map File for Keyboards Without +;; edt-mapper.el - Create an EDT LK-201 Map File for Keyboards Without ;; Built-in Support ;; Enhancements: @@ -81,7 +81,7 @@ ;; following line ;; ;; (edt-set-scroll-margins "20%" "25%") -;; +;; ;; sets the top margin to 20% of the window and the bottom margin ;; to 25% of the window. To disable this feature, set each ;; margin to 0%. You can also invoke edt-set-scroll-margins @@ -91,13 +91,13 @@ ;; NOTE: Another way to set the scroll margins is to use the ;; Emacs customization feature (not available in Emacs 19) to set ;; the following two variables directly: -;; +;; ;; edt-top-scroll-margin and edt-bottom-scroll-margin ;; ;; Enter the Emacs `customize' command. First select the Editing ;; group and then select the Emulations group. Finally, select ;; the Edt group and follow the directions. -;; +;; ;; 2. The SUBS command is now supported and bound to GOLD-Enter by ;; default. (This design was copied from tpu-edt.el.) Note, in ;; earlier versions of EDT Emulation, GOLD-Enter was assigned to @@ -149,9 +149,9 @@ ;;; History: -;; +;; ;; Version 4.0 2000 Added New Features and Fixed a Few Bugs -;; +;; ;;; Code: @@ -198,7 +198,7 @@ setting replicates EDT's page delimiter behavior. The original value is restored when edt-emulation-off is called." :type 'boolean :group 'edt) - + (defcustom edt-use-EDT-control-key-bindings nil "*Emacs MUST be restarted for a change in value to take effect! Non-nil causes the control key bindings to be replaced with EDT @@ -209,7 +209,7 @@ use within the EDT emulation." :group 'edt) (defcustom edt-word-entities '(?\t) - "*Specifies the list of EDT word entity characters. + "*Specifies the list of EDT word entity characters. The default list, (\?\\t), contains just the TAB character, which emulates EDT. Characters are specified in the list using their decimal ASCII values. A question mark, followed by the actual @@ -402,7 +402,7 @@ Argument NUM is the number of page delimiters to move." ;;; EDT defaults a section size to be 16 lines of its one and only ;;; 24-line window. That's two-thirds of the window at a time. The ;;; EDT SECT commands moves the cursor, not the window. -;;; +;;; ;;; This emulation of EDT's SECT moves the cursor approximately ;;; two-thirds of the current window at a time. @@ -491,7 +491,7 @@ Argument NUM is the number of EOL marks to move." ;;; This one is a tad messy. To emulate EDT's behavior everywhere in ;;; the file (beginning of file, end of file, beginning of line, end ;;; of line, etc.) it takes a bit of special handling. -;;; +;;; ;;; The variable edt-word-entities contains a list of characters which ;;; are to be viewed as distinct words where ever they appear in the ;;; buffer. This emulates the EDT line mode command SET ENTITY WORD. @@ -729,7 +729,7 @@ Optional argument FIND is t if this function is called from `edt-find'." (if (equal edt-direction-string edt-forward-string) (edt-find-forward t) (edt-find-backward t))) - + ;;; ;;; FNDNXT @@ -798,7 +798,7 @@ Optional argument FIND is t if this function is called from `edt-find'." (if (equal edt-direction-string edt-forward-string) (edt-find-next-forward) (edt-find-next-backward))) - + ;;; ;;; APPEND ;;; @@ -1008,7 +1008,7 @@ Argument NUM is the number of characters to delete." (defun edt-substitute (num) "Replace the selected region with the contents of the CUT buffer and. Repeat the most recent FIND command. (The Emacs kill ring is used as -the CUT buffer.) +the CUT buffer.) Argument NUM is the repeat count. A positive value indicates the of times to repeat the substitution. A negative argument means replace all occurrences of the search text." @@ -1087,7 +1087,7 @@ Also, execute command specified if in Minibuffer." (exit-minibuffer)) (if edt-x-emacs19-p (setq zmacs-region-stays t))) - + ;;; ;;; BACKUP ;;; @@ -1205,7 +1205,7 @@ Argument NUM is the number of tabs to insert." Argument NUM is the prefix value tested." (if (<= num 0) (error "Prefix must be positive"))) - + ;;; ;;; Check Selection ;;; @@ -1277,7 +1277,7 @@ Argument BOTTOM is the bottom margin in number of lines or percent of window." ;;;; ENHANCEMENTS AND ADDITIONS FOR EDT KEYPAD MODE ;;;; -;;; +;;; ;;; Several enhancements and additions to EDT keypad mode commands are ;;; provided here. Some of these have been motivated by similar ;;; TPU/EVE and EVE-Plus commands. Others are new. @@ -1818,7 +1818,7 @@ Argument NUM is the number of times to duplicate the line." (save-buffer) (save-buffers-kill-emacs)) -;;; +;;; ;;; QUIT ;;; @@ -1836,9 +1836,9 @@ Warn user that modifications will be lost." (kill-emacs) (setq working nil))) (setq list (cdr list)))) - (if working (kill-emacs)))) + (if working (kill-emacs)))) -;;; +;;; ;;; SPLIT WINDOW ;;; @@ -2024,7 +2024,7 @@ Optional argument NOT-YES changes the default to negative." ;;; Function used to load LK-201 key mapping file generated by edt-mapper.el. ;;; (defun edt-load-keys (file) - "Load the LK-201 key mapping FILE generated by edt-mapper.el. + "Load the LK-201 key mapping FILE generated by edt-mapper.el. If FILE is nil, which is the normal case, try to load a default file. The default file names are based upon the window system, terminal type, and version of Emacs in use: GNU Emacs or XEmacs (aka Lucid @@ -2042,7 +2042,7 @@ created." "~/.edt-" edt-emacs-variant (if edt-term (concat "-" edt-term)) (if edt-xserver (concat "-" edt-xserver)) - (if edt-window-system + (if edt-window-system (concat "-" (upcase (symbol-name edt-window-system)))) "-keys"))))) (cond ((file-readable-p file) @@ -2053,7 +2053,7 @@ created." (insert " Ack!! You're running the Enhanced EDT Emulation without loading an - EDT key mapping file. To create an EDT key mapping file, run the + EDT key mapping file. To create an EDT key mapping file, run the edt-mapper.el program. It is safest to run it from an Emacs loaded without any of your own customizations found in your .emacs file, etc. The reason for this is that some user customizations confuse edt-mapper. @@ -2061,7 +2061,7 @@ created." follows: emacs -q -l edt-mapper.el - + [NOTE: If you do nothing out of the ordinary in your .emacs file, and the search for edt-mapper.el is successful, you can try running it now.] @@ -2412,7 +2412,7 @@ Argument GOLD-BINDING is the Emacs function to be bound to GOLD <KEY>." 'edt-key-not-assigned 'edt-key-not-assigned) ;; Control key bindings: Regular and GOLD - ;; + ;; ;; Standard EDT control key bindings conflict with standard Emacs ;; control key bindings. Normally, the standard Emacs control key ;; bindings are left unchanged in the default EDT mode. However, if @@ -2578,7 +2578,7 @@ Argument GOLD-BINDING is the Emacs function to be bound to GOLD <KEY>." G-F9: Paste Rect Insert +----------+----------+----------+----------+ F10: Cut Rectangle G-F10: Paste Rectangle - F11: ESC + F11: ESC F12: Begining of Line +----------+----------+----------+----------+ G-F12: Delete Other Windows | GOLD | HELP | FNDNXT | DEL L | F13: Delete to Begin of Word | (PF1) | (PF2) | (PF3) | (PF4) | @@ -2600,7 +2600,7 @@ G-C-k: Restore Key | WORD | EOL | CHAR | Next | C-t: Display the Time | (0) | (.) | SUBS | C-u: Delete to Begin of Line | Open Line | RESET | | C-v: Redraw Display +---------------------+----------+----------+ - C-w: Set Screen Width 132 + C-w: Set Screen Width 132 C-z: Suspend Emacs +----------+----------+----------+ G-C-\\: Split Window | FNDNXT | Yank | CUT | | (FIND) | (INSERT) | (REMOVE) | @@ -2610,26 +2610,26 @@ G-C-\\: Split Window | FNDNXT | Yank | CUT | G-e: Exit | (SELECT) |(PREVIOUS)| (NEXT) | G-f: Find File | | | | G-g: Find File Other Window +----------+----------+----------+ - G-h: Keypad Help - G-i: Insert File - G-k: Toggle Capitalization Word - G-l: Downcase Region - G-m: Save Some Buffers - G-n: Next Error + G-h: Keypad Help + G-i: Insert File + G-k: Toggle Capitalization Word + G-l: Downcase Region + G-m: Save Some Buffers + G-n: Next Error G-o: Switch to Next Window - G-q: Quit - G-r: Revert File - G-s: Save Buffer - G-u: Upcase Region - G-v: Find File Other Window - G-w: Write file - G-y: EDT Emulation OFF + G-q: Quit + G-r: Revert File + G-s: Save Buffer + G-u: Upcase Region + G-v: Find File Other Window + G-w: Write file + G-y: EDT Emulation OFF G-z: Switch to User EDT Key Bindings - G-1: Delete Other Windows - G-2: Split Window - G-%: Go to Percentage - G- : Undo (GOLD Spacebar) - G-=: Go to Line + G-1: Delete Other Windows + G-2: Split Window + G-%: Go to Percentage + G- : Undo (GOLD Spacebar) + G-=: Go to Line G-`: What line G-/: Query-Replace" diff --git a/lisp/emulation/keypad.el b/lisp/emulation/keypad.el index c638409613f..69dc8a3d3b0 100644 --- a/lisp/emulation/keypad.el +++ b/lisp/emulation/keypad.el @@ -113,7 +113,7 @@ decimal key must be specified." (character :tag "Numeric Keypad with Decimal Key" :match (lambda (widget value) (integerp value)) :value ?.) - (const :tag "Numeric prefix arguments" prefix) + (const :tag "Numeric prefix arguments" prefix) (const :tag "Cursor keys" cursor) (const :tag "Shifted cursor keys" S-cursor) (const :tag "Unspecified/User-defined" none) @@ -136,7 +136,7 @@ decimal key must be specified." (character :tag "Numeric Keypad with Decimal Key" :match (lambda (widget value) (integerp value)) :value ?.) - (const :tag "Numeric prefix arguments" prefix) + (const :tag "Numeric prefix arguments" prefix) (const :tag "Cursor keys" cursor) (const :tag "Shifted cursor keys" S-cursor) (const :tag "Unspecified/User-defined" none) @@ -159,7 +159,7 @@ decimal key must be specified." (character :tag "Numeric Keypad with Decimal Key" :match (lambda (widget value) (integerp value)) :value ?.) - (const :tag "Numeric prefix arguments" prefix) + (const :tag "Numeric prefix arguments" prefix) (const :tag "Cursor keys" cursor) (const :tag "Shifted cursor keys" S-cursor) (const :tag "Unspecified/User-defined" none) @@ -182,7 +182,7 @@ decimal key must be specified." (character :tag "Numeric Keypad with Decimal Key" :match (lambda (widget value) (integerp value)) :value ?.) - (const :tag "Numeric prefix arguments" prefix) + (const :tag "Numeric prefix arguments" prefix) (const :tag "Cursor keys" cursor) (const :tag "Shifted cursor keys" S-cursor) (const :tag "Unspecified/User-defined" none) @@ -244,7 +244,7 @@ the decimal key on the keypad is mapped to DECIMAL instead of `.'" [delete insert end down next left space right home up prior]) ((eq setup 'S-cursor) - [S-delete S-insert S-end S-down S-next S-left + [S-delete S-insert S-end S-down S-next S-left S-space S-right S-home S-up S-prior]) ((eq setup 'none) nil) @@ -268,7 +268,7 @@ the decimal key on the keypad is mapped to DECIMAL instead of `.'" ((eq (aref kp i) 'S-kp-space) (define-key function-key-map [S-kp-begin] (if bind (vector (aref bind i))))))) - + (setq i (1+ i))))) ;;; keypad.el ends here diff --git a/lisp/emulation/pc-select.el b/lisp/emulation/pc-select.el index d9adad9a7ee..6b7b7ece9c8 100644 --- a/lisp/emulation/pc-select.el +++ b/lisp/emulation/pc-select.el @@ -185,7 +185,7 @@ restored to their original values when `pc-selection-mode' is toggled off.") ([C-up] . backward-paragraph-nomark) ; KPrevPara cUp ([S-C-down] . forward-paragraph-mark) ([S-C-up] . backward-paragraph-mark)))) - + (setq pc-select-default-key-bindings lst))) (defvar pc-select-extra-key-bindings nil @@ -219,7 +219,7 @@ restored to their original values when `pc-selection-mode' is toggled off.") ([C-M-delete] . kill-sexp) ;; Next line proposed by Eli Barzilay ([C-escape] . electric-buffer-list)))) - + (setq pc-select-extra-key-bindings lst))) (defvar pc-select-meta-moves-sexps-key-bindings @@ -773,7 +773,7 @@ restore the previous value of that key binding from SAVED-MAP." (defmacro pc-select-add-to-alist (alist var val) "Ensure that ALIST contains the cons cell (VAR . VAL). If a cons cell whose car is VAR is already on the ALIST, update the -cdr of that cell with VAL. Otherwise, make a new cons cell +cdr of that cell with VAL. Otherwise, make a new cons cell \(VAR . VAL), and prepend it onto ALIST." (let ((elt (make-symbol "elt"))) `(let ((,elt (assq ',var ,alist))) @@ -803,7 +803,7 @@ variable MODE-VAR (instead of the value of the variable MODE) on (,mode ,arg))) (defmacro pc-select-restore-var (var) - "Restore the previous value of the variable VAR. + "Restore the previous value of the variable VAR. Look up VAR's previous value in `pc-select-saved-settings-alist', and, if the value is found, set VAR to that value." (let ((elt (make-symbol "elt"))) @@ -919,7 +919,7 @@ but before calling `pc-selection-mode'): ;; (setq-default normal-erase-is-backspace t) ;; However, the documentation for the variable says that ;; "setting it with setq has no effect", so I'm removing it. - + (pc-select-save-and-set-var highlight-nonselected-windows nil) (pc-select-save-and-set-var transient-mark-mode t) (pc-select-save-and-set-var mark-even-if-inactive t) @@ -966,7 +966,7 @@ but before calling `pc-selection-mode'): pc-select-old-M-delete-binding)) (setq pc-select-key-bindings-alist nil pc-select-saved-settings-alist nil)))) - + ;;;###autoload (defcustom pc-selection-mode nil diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el index 1509a78601f..7ae43c8b162 100644 --- a/lisp/emulation/vi.el +++ b/lisp/emulation/vi.el @@ -30,7 +30,7 @@ ; (vi-mode)))))) ; 3) In your .emacs file you can define the command "vi-mode" to be "autoload" ; or you can execute the "load" command to load "vi" directly. -; 4) Read the comments for command "vi-mode" before you start using it. +; 4) Read the comments for command "vi-mode" before you start using it. ; ; COULD DO ; 1). A general 'define-operator' function to replace current hack @@ -153,7 +153,7 @@ command extensions.") (define-key vi-com-map "\C-\\" 'vi-unimplemented) (define-key vi-com-map "\C-]" 'find-tag) (define-key vi-com-map "\C-^" 'vi-locate-def) ; extension - (define-key vi-com-map "\C-_" 'vi-undefined) + (define-key vi-com-map "\C-_" 'vi-undefined) (define-key vi-com-map " " 'forward-char) (define-key vi-com-map "!" 'vi-operator) @@ -201,7 +201,7 @@ command extensions.") (define-key vi-com-map "H" 'vi-home-window-line) (define-key vi-com-map "I" 'vi-insert-before-first-nonwhite) (define-key vi-com-map "J" 'vi-join-lines) - (define-key vi-com-map "K" 'vi-undefined) + (define-key vi-com-map "K" 'vi-undefined) (define-key vi-com-map "L" 'vi-last-window-line) (define-key vi-com-map "M" 'vi-middle-window-line) (define-key vi-com-map "N" 'vi-reverse-last-search) @@ -212,7 +212,7 @@ command extensions.") (define-key vi-com-map "S" 'vi-substitute-lines) (define-key vi-com-map "T" 'vi-backward-upto-char) (define-key vi-com-map "U" 'vi-unimplemented) - (define-key vi-com-map "V" 'vi-undefined) + (define-key vi-com-map "V" 'vi-undefined) (define-key vi-com-map "W" 'vi-forward-blank-delimited-word) (define-key vi-com-map "X" 'call-last-kbd-macro) ; modification/extension (define-key vi-com-map "Y" 'vi-yank-line) @@ -247,7 +247,7 @@ command extensions.") (define-key vi-com-map "s" 'vi-substitute-chars) (define-key vi-com-map "t" 'vi-forward-upto-char) (define-key vi-com-map "u" 'undo) - (define-key vi-com-map "v" 'vi-verify-spelling) + (define-key vi-com-map "v" 'vi-verify-spelling) (define-key vi-com-map "w" 'vi-forward-word) (define-key vi-com-map "x" 'vi-kill-char) (define-key vi-com-map "y" 'vi-operator) @@ -355,7 +355,7 @@ form that is ready to be `apply'ed.") "Non-nil if it is in insert state.") ; in "loaddefs.el" -;(defvar search-last-string "" +;(defvar search-last-string "" ; "Last string search for by a search command.") (defvar vi-search-last-command nil ; (re-)search-forward(backward) @@ -366,12 +366,12 @@ form that is ready to be `apply'ed.") (defvar vi-mode-old-mode-name nil "Save the mode-name before entering vi-mode.") - + (defvar vi-mode-old-major-mode nil "Save the major-mode before entering vi-mode.") (defvar vi-mode-old-case-fold nil) - + ;(defconst vi-add-to-mode-line-1 ; '(overwrite-mode nil " Insert")) @@ -404,7 +404,7 @@ form that is ready to be `apply'ed.") (make-local-variable 'vi-mode-old-major-mode) (make-local-variable 'vi-mode-old-case-fold) (run-hooks 'vi-mode-hook)) - + ;;;###autoload (defun vi-mode () "Major mode that acts like the `vi' editor. @@ -448,7 +448,7 @@ Major differences between this mode and real vi : `vi-name-last-change-or-macro', `vi-verify-spelling', `vi-locate-def', `vi-mark-region', and 'vi-quote-words'. Some of them are quite handy. - Use \\[vi-switch-mode] to switch among different modes quickly. - + Syntax table and abbrevs while in vi mode remain as they were in Emacs." (interactive) (if (null vi-mode-old-major-mode) ; very first call for current buffer @@ -539,7 +539,7 @@ This function expects 'overwrite-mode' being set properly beforehand." (<= vi-ins-repetition 0)) (vi-goto-command-state t) (if (> vi-ins-repetition 1) - (progn + (progn (let ((str (buffer-substring vi-ins-point (point)))) (while (> vi-ins-repetition 1) (insert str) @@ -585,7 +585,7 @@ insert state." (interactive "*r") (kill-region start end) (vi-set-last-change-command 'kill-region)) - + (defun vi-append-at-end-of-line (arg) "go to end of line and then go into vi insert state." (interactive "*p") @@ -651,7 +651,7 @@ insert state." ;;;;; (defun vi-isearch-forward (arg) - "Incremental search forward. Use regexp version if ARG is non-nil." + "Incremental search forward. Use regexp version if ARG is non-nil." (interactive "P") (let ((scmd (if arg 'isearch-forward-regexp 'isearch-forward)) (opoint (point))) @@ -724,7 +724,7 @@ If the optional search args are given, use those instead of the ones saved." ((eq search-command 'search-forward) 'search-backward) ((eq search-command 'search-backward) 'search-forward)) search-string nil nil arg))) - + (defun vi-join-lines (arg) "join ARG lines from current line (default 2), cleaning up white space." (interactive "P") @@ -842,7 +842,7 @@ Goto mark '@' means jump into and pop the top mark on the mark ring." (set-mark-command nil) (goto-char mark) (if line-flag (back-to-indentation))))))) - + (defun vi-goto-line-mark (char) "Go to the line (at first non-white) marked by next char." (interactive "c") @@ -1062,7 +1062,7 @@ MOTION-COMMAND with ARG. ((eq moving-unit 'line) (goto-char begin) (beginning-of-line) (setq begin (point)) (goto-char end) (next-line 1) (beginning-of-line) (setq end (point)))) - (if (> end (point-max)) (setq end (point-max))) ; force in buffer region + (if (> end (point-max)) (setq end (point-max))) ; force in buffer region (cons begin end))))) (defun vi-delete-op (motion-command arg) @@ -1106,7 +1106,7 @@ Used in checking whether the yanked text should be put back as lines or not." (= (aref string (1- (length string))) ?\n)) (defun vi-put-before (arg &optional after-p) - "Put yanked (in vi sense) text back before/above cursor. + "Put yanked (in vi sense) text back before/above cursor. If a numeric prefix value (currently it should be >1) is given, put back text as lines. If the optional after-p is given, put after/below the cursor." (interactive "P") @@ -1302,7 +1302,7 @@ For the use of the prefix-arg, refer to individual functions called." (interactive "*P") (let ((rcmd (if arg 'replace-regexp 'replace-string))) (call-interactively rcmd nil))) - + (defun vi-adjust-window (arg position) "Move current line to the top/center/bottom of the window." (interactive "p\nc") @@ -1329,7 +1329,7 @@ For the use of the prefix-arg, refer to individual functions called." (ding)))) (defun vi-name-last-change-or-macro (arg char) - "Give name to the last change command or just defined kbd macro. + "Give name to the last change command or just defined kbd macro. If prefix ARG is given, name last macro, otherwise name last change command. The following CHAR will be the name for the command or macro." (interactive "P\nc") @@ -1343,7 +1343,7 @@ The following CHAR will be the name for the command or macro." (vi-set-last-change-command 'vi-more-redo-insertion str overwrite-p prefix-code))) (fset (intern (char-to-string char)) vi-last-change-command))) - + (defun vi-call-named-change-or-macro (count char) "Execute COUNT times the keyboard macro definition named by the following CHAR." (interactive "p\nc") diff --git a/lisp/emulation/vip.el b/lisp/emulation/vip.el index 6db67394ead..15d59250836 100644 --- a/lisp/emulation/vip.el +++ b/lisp/emulation/vip.el @@ -49,7 +49,7 @@ (defvar vip-insert-local-map nil "Local map used in insert command mode. (Buffer-specific.)") - + (make-variable-buffer-local 'vip-emacs-local-map) (make-variable-buffer-local 'vip-insert-local-map) @@ -113,7 +113,7 @@ (defvar vip-f-forward nil "For use by \";\" command.") - + (defvar vip-f-offset nil "For use by \";\" command.") @@ -378,7 +378,7 @@ No message." 'delete-backward-char)) (define-key vip-insert-local-map "\C-w" 'vip-delete-backward-word)) - ((eq new-mode 'emacs-mode) + ((eq new-mode 'emacs-mode) (vip-change-mode-line "Emacs:") (use-local-map vip-emacs-local-map))) (setq vip-current-mode new-mode) @@ -508,7 +508,7 @@ EVENTS is a list of events, which become the beginning of the command." "Compute numeric prefix arg value. Invoked by CHAR. VALUE is the value obtained so far, and COM is the command part obtained so far." (while (and (>= char ?0) (<= char ?9)) - (setq value (+ (* (if (numberp value) value 0) 10) (- char ?0))) + (setq value (+ (* (if (numberp value) value 0) 10) (- char ?0))) (setq char (read-char))) (setq prefix-arg value) (if com (setq prefix-arg (cons prefix-arg com))) @@ -561,7 +561,7 @@ obtained so far, and COM is the command part obtained so far." (setq com char) (setq char (read-char))))))) (if (atom com) - ;; com is a single char, so we construct prefix-arg + ;; com is a single char, so we construct prefix-arg ;; and if char is ?, describe prefix arg, otherwise exit by ;; pushing the char back (progn @@ -615,7 +615,7 @@ obtained so far, and COM is the command part obtained so far." (interactive "P") (condition-case conditions (vip-prefix-arg-com - last-command-char + last-command-char (cond ((null arg) nil) ((consp arg) (car arg)) ((numberp arg) arg) @@ -935,7 +935,7 @@ vi command mode. It will repeat the insertion command if original insertion command was invoked with argument > 1." (let ((i-com (car vip-d-com)) (val (car (cdr vip-d-com)))) (if (and val (> val 1)) ;; first check that val is non-nil - (progn + (progn (setq vip-d-com (list i-com (1- val) ?r)) (vip-repeat nil) (setq vip-d-com (list i-com val ?r)))))) @@ -1037,7 +1037,7 @@ command was invoked with argument > 1." (vip-change-subr (mark) (point)) (vip-change (mark) (point)))) (setq vip-d-com (list 'vip-substitute val ?r)))) - + (defun vip-substitute-line (arg) "Substitute lines." (interactive "p") @@ -1057,7 +1057,7 @@ command was invoked with argument > 1." (interactive "P") (let ((val (vip-p-val arg))) (vip-line (cons val ?Y)))) - + ;; region command @@ -1076,7 +1076,7 @@ command was invoked with argument > 1." (move-marker vip-com-point (point)) (exchange-point-and-mark) (vip-execute-com 'vip-Region val com))) - + (defun vip-replace-char (arg) "Replace the following ARG chars by the character read." (interactive "P") @@ -1171,7 +1171,7 @@ beginning of buffer, stop and signal error." (progn (forward-char) (vip-execute-com 'vip-end-of-word val com))))) - + (defun vip-backward-word (arg) "Backward word." (interactive "P") @@ -2911,7 +2911,7 @@ a token has type \(command, address, end-mark\) and value." (vip-change-mode-to-emacs) (shell)) -(defun ex-substitute (&optional repeat r-flag) +(defun ex-substitute (&optional repeat r-flag) "ex substitute. If REPEAT use previous reg-exp which is ex-reg-exp or vip-s-string" diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el index faba7baf1b8..02bffa64bd3 100644 --- a/lisp/emulation/viper-cmd.el +++ b/lisp/emulation/viper-cmd.el @@ -863,7 +863,7 @@ Vi's prefix argument will be used. Otherwise, the prefix argument passed to ) ; let (error nil) ) ; condition-case - + (viper-set-input-method nil) (viper-set-iso-accents-mode nil) (viper-set-mode-vars-for viper-current-state) @@ -1208,7 +1208,7 @@ as a Meta key and any number of multiple escapes is allowed." (if (atom com) ;; `com' is a single char, so we construct the command argument - ;; and if `char' is `?', we describe the arg; otherwise + ;; and if `char' is `?', we describe the arg; otherwise ;; we prepare the command that will be executed at the end. (progn (setq cmd-info (cons value com)) @@ -1216,16 +1216,16 @@ as a Meta key and any number of multiple escapes is allowed." (viper-describe-arg cmd-info) (setq char (read-char))) ;; `char' is a movement cmd, a digit arg cmd, or a register cmd---so we - ;; execute it at the very end + ;; execute it at the very end (or (viper-movement-command-p char) (viper-digit-command-p char) (viper-regsuffix-command-p char) (viper= char ?!) ; bang command (error "")) (setq cmd-to-exec-at-end - (viper-exec-form-in-vi + (viper-exec-form-in-vi `(key-binding (char-to-string ,char))))) - + ;; as com is non-nil, this means that we have a command to execute (if (viper-memq-char (car com) '(?r ?R)) ;; execute apropriate region command. @@ -1239,7 +1239,7 @@ as a Meta key and any number of multiple escapes is allowed." ;; otherwise, reset prefix arg and call appropriate command (setq value (if (null value) 1 value)) (setq prefix-arg nil) - (cond + (cond ;; If we change ?C to ?c here, then cc will enter replacement mode ;; rather than deleting lines. However, it will affect 1 less line than ;; normal. We decided to not use replacement mode here and follow Vi, @@ -1253,11 +1253,11 @@ as a Meta key and any number of multiple escapes is allowed." ((equal com '(?! . ?!)) (viper-line (cons value ?!))) ((equal com '(?= . ?=)) (viper-line (cons value ?=))) (t (error ""))))) - + (if cmd-to-exec-at-end (progn (setq last-command-char char) - (setq last-command-event + (setq last-command-event (viper-copy-event (if viper-xemacs-p (character-to-event char) char))) (condition-case nil @@ -1987,7 +1987,7 @@ Undo previous insertion and inserts new." ;; Thie is a temp hook that uses free variables init-message and initial. ;; A dirty feature, but it is the simplest way to have it do the right thing. -;; The INIT-MESSAGE and INITIAL vars come from the scope set by +;; The INIT-MESSAGE and INITIAL vars come from the scope set by ;; viper-read-string-with-history (defun viper-minibuffer-standard-hook () (if (stringp init-message) @@ -2594,13 +2594,13 @@ These keys are ESC, RET, and LineFeed" (setq char (if com viper-d-char (viper-char-at-pos 'backward))) (if com (insert char)) - + (setq viper-d-char char) - + (viper-loop (1- (if (> arg 0) arg (- arg))) (delete-char 1 t) (insert char)) - + (viper-adjust-undo) (backward-char arg) )) @@ -4604,7 +4604,7 @@ One can use `` and '' to temporarily jump 1 step back." ;; Get viper standard value of SYMBOL. If symbol is customized, get its ;; standard value. Otherwise, get the value saved in the alist STORAGE. If -;; STORAGE is nil, use viper-saved-user-settings. +;; STORAGE is nil, use viper-saved-user-settings. (defun viper-standard-value (symbol &optional storage) (or (eval (car (get symbol 'customized-value))) (eval (car (get symbol 'saved-value))) @@ -4945,6 +4945,6 @@ Mail anyway (y or n)? ") )) - + ;;; viper-cmd.el ends here diff --git a/lisp/emulation/viper-ex.el b/lisp/emulation/viper-ex.el index 312357f3214..f4d3e8c766e 100644 --- a/lisp/emulation/viper-ex.el +++ b/lisp/emulation/viper-ex.el @@ -150,7 +150,7 @@ ("set" (ex-set)) ("shell" (ex-shell)) ("source" (ex-source)) - ("stop" (suspend-emacs)) + ("stop" (suspend-emacs)) ("sr" (ex-substitute t t)) ("submitReport" (viper-submit-report)) ("substitute" (ex-substitute) is-mashed) @@ -165,7 +165,7 @@ ("v" "vglobal") ("version" (viper-version)) ("vglobal" (ex-global t) is-mashed) - ("visual" (ex-edit)) + ("visual" (ex-edit)) ("w" "write") ("wq" (ex-write t)) ("write" (ex-write nil)) @@ -238,26 +238,26 @@ ;; A-list of Ex variables that can be set using the :set command. -(defconst ex-variable-alist +(defconst ex-variable-alist '(("wrapscan") ("ws") ("wrapmargin") ("wm") ("tabstop-global") ("ts-g") ("tabstop") ("ts") ("showmatch") ("sm") ("shiftwidth") ("sw") ("shell") ("sh") - ("readonly") ("ro") + ("readonly") ("ro") ("nowrapscan") ("nows") ("noshowmatch") ("nosm") ("noreadonly") ("noro") ("nomagic") ("noma") ("noignorecase") ("noic") ("noautoindent-global") ("noai-g") ("noautoindent") ("noai") ("magic") ("ma") ("ignorecase") ("ic") - ("autoindent-global") ("ai-g") ("autoindent") ("ai") - ("all") + ("autoindent-global") ("ai-g") ("autoindent") ("ai") + ("all") )) - + ;; Token recognized during parsing of Ex commands (e.g., "read", "comma") (defvar ex-token nil) -;; Type of token. +;; Type of token. ;; If non-nil, gives type of address; if nil, it is a command. (defvar ex-token-type nil) @@ -323,7 +323,7 @@ ((string-match "\\(bash$\\|bash.exe$\\)" shell-file-name) "-noprofile") ; bash: ignore .profile ))) - "Options to pass to the Unix-style shell. + "Options to pass to the Unix-style shell. Don't put `-c' here, as it is added automatically." :type '(choice (const nil) string) :group 'viper-ex) @@ -344,7 +344,7 @@ Don't put `-c' here, as it is added automatically." The default tries to set this variable to work with Unix, Windows, OS/2, and VMS. -However, if it doesn't work right for some types of Unix shells or some OS, +However, if it doesn't work right for some types of Unix shells or some OS, the user should supply the appropriate function and set this variable to the corresponding function symbol." :type 'symbol @@ -370,7 +370,7 @@ corresponding function symbol." ;; e.g., :r !date (defvar ex-cmdfile nil) (defvar ex-cmdfile-args "") - + ;; flag used in viper-ex-read-file-name to indicate that we may be reading ;; multiple file names. Used for :edit and :next (defvar viper-keep-reading-filename nil) @@ -389,10 +389,10 @@ reversed." ;; Last shell command executed with :! command. (defvar viper-ex-last-shell-com nil) - + ;; Indicates if Minibuffer was exited temporarily in Ex-command. (defvar viper-incomplete-ex-cmd nil) - + ;; Remembers the last ex-command prompt. (defvar viper-last-ex-prompt "") @@ -414,7 +414,7 @@ reversed." ;; A token has a type, \(command, address, end-mark\), and a value (defun viper-get-ex-token () (save-window-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (skip-chars-forward " \t|") (let ((case-fold-search t)) @@ -556,25 +556,25 @@ reversed." "\\|" "![ \t]*[a-zA-Z].*" "\\)" "!*"))) - + (save-window-excursion ;; put cursor at the end of the Ex working buffer - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (goto-char (point-max))) (cond ((viper-looking-back quit-regex1) (exit-minibuffer)) ((viper-looking-back stay-regex) (insert " ")) ((viper-looking-back quit-regex2) (exit-minibuffer)) (t (insert " "))))) - + ;; complete Ex command (defun ex-cmd-complete () (interactive) (let (save-pos dist compl-list string-to-complete completion-result) - + (save-excursion (setq dist (skip-chars-backward "[a-zA-Z!=>&~]") save-pos (point))) - + (if (or (= dist 0) (viper-looking-back "\\([ \t]*['`][ \t]*[a-z]*\\)") (viper-looking-back @@ -586,14 +586,14 @@ reversed." (viper-looking-back "\\([ \t]*['`][ \t]*[a-z]*\\)") (looking-at "[^ \t\n\C-m]")) nil - (with-output-to-temp-buffer "*Completions*" + (with-output-to-temp-buffer "*Completions*" (display-completion-list (viper-alist-to-list ex-token-alist)))) ;; Preceding chars may be part of a command name (setq string-to-complete (buffer-substring save-pos (point))) (setq completion-result (try-completion string-to-complete ex-token-alist)) - + (cond ((eq completion-result t) ; exact match--do nothing (viper-tmp-insert-at-eob " (Sole completion)")) ((eq completion-result nil) @@ -607,17 +607,17 @@ reversed." (viper-filter-alist (concat "^" completion-result) ex-token-alist))) (if (> (length compl-list) 1) - (with-output-to-temp-buffer "*Completions*" + (with-output-to-temp-buffer "*Completions*" (display-completion-list (viper-alist-to-list (reverse compl-list))))))) ))) - -;; Read Ex commands + +;; Read Ex commands ;; ARG is a prefix argument. If given, the ex command runs on the region ;;(without the user having to specify the address :a,b ;; STRING is the command to execute. If nil, then Viper asks you to enter the -;; command. +;; command. (defun viper-ex (arg &optional string) (interactive "P") (or string @@ -648,10 +648,10 @@ reversed." (+ reg-beg-line (count-lines reg-beg reg-end) -1))))) (if reg-beg-line (setq initial-str (format "%d,%d" reg-beg-line reg-end-line))) - - (setq com-str + + (setq com-str (or string (viper-read-string-with-history - ":" + ":" initial-str 'viper-ex-history ;; no default when working on region @@ -663,7 +663,7 @@ reversed." " [Type command to execute on current region]")))) (save-window-excursion ;; just a precaution - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (delete-region (point-min) (point-max)) (insert com-str "\n") @@ -718,7 +718,7 @@ reversed." (t (let ((ans (viper-get-ex-address-subr address dot))) (if ans (setq address ans))))) (setq prev-token-type ex-token-type)))) - + ;; Get a regular expression and set `ex-variant', if found ;; Viper doesn't parse the substitution or search patterns. @@ -783,7 +783,7 @@ reversed." ;; Get an Ex option g or c (defun viper-get-ex-opt-gc (c) (save-window-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (if (looking-at (format "%c" c)) (forward-char 1)) (skip-chars-forward " \t") @@ -872,7 +872,7 @@ reversed." (save-excursion (if (null ex-token) (exchange-point-and-mark) - (goto-char + (goto-char (viper-register-to-point (viper-int-to-char (1+ (- ex-token ?a))) 'enforce-buffer))) (setq address (point-marker))))) @@ -900,7 +900,7 @@ reversed." (setq ex-count nil) (setq ex-flag nil) (save-window-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (skip-chars-forward " \t") (if (looking-at "[a-zA-Z]") @@ -926,7 +926,7 @@ reversed." ex-count nil ex-flag nil) (save-window-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (skip-chars-forward " \t") (if (looking-at "!") @@ -952,7 +952,7 @@ reversed." ;; Expand \% and \# in ex command (defun ex-expand-filsyms (cmd buf) (let (cf pf ret) - (save-excursion + (save-excursion (set-buffer buf) (setq cf buffer-file-name) (setq pf (ex-next nil t))) ; this finds alternative file name @@ -966,7 +966,7 @@ reversed." (insert cmd) (goto-char (point-min)) (while (re-search-forward "%\\|#" nil t) - (let ((data (match-data)) + (let ((data (match-data)) (char (buffer-substring (match-beginning 0) (match-end 0)))) (if (viper-looking-back (concat "\\\\" char)) (replace-match char) @@ -991,7 +991,7 @@ reversed." ex-cmdfile-args "") (save-excursion (save-window-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (skip-chars-forward " \t") (if (looking-at "!") @@ -1052,9 +1052,9 @@ reversed." (skip-chars-backward " \t\n") (setq prompt (buffer-substring (point-min) (point))) )) - + (setq viper-last-ex-prompt prompt) - + ;; If we just finished reading command, redisplay prompt (if viper-incomplete-ex-cmd (setq ex-file (viper-ex-read-file-name (format ":%s " prompt))) @@ -1067,8 +1067,8 @@ reversed." ;; file names, arranges to re-enter the minibuffer. (defun viper-complete-filename-or-exit () (interactive) - (setq viper-keep-reading-filename t) - ;; don't exit if directory---ex-commands don't + (setq viper-keep-reading-filename t) + ;; don't exit if directory---ex-commands don't (cond ((ex-cmd-accepts-multiple-files-p ex-token) (exit-minibuffer)) ;; apparently the argument to an Ex command is ;; supposed to be a shell command @@ -1098,12 +1098,12 @@ reversed." (minibuffer-local-completion-map (copy-keymap minibuffer-local-completion-map)) beg end cont val) - + (viper-add-keymap ex-read-filename-map - (if viper-emacs-p + (if viper-emacs-p minibuffer-local-completion-map - read-file-name-map)) - + read-file-name-map)) + (setq cont (setq viper-keep-reading-filename t)) (while cont (setq viper-keep-reading-filename nil @@ -1114,14 +1114,14 @@ reversed." (setq val (concat "\"" val "\""))) (setq str (concat str (if (equal val "") "" " ") val (if (equal val "") "" " "))) - + ;; Only edit, next, and Next commands accept multiple files. ;; viper-keep-reading-filename is set in the anonymous function that is ;; bound to " " in ex-read-filename-map. (setq cont (and viper-keep-reading-filename (ex-cmd-accepts-multiple-files-p ex-token))) ) - + (setq beg (string-match "[^ \t]" str) ; delete leading blanks end (string-match "[ \t]*$" str)) ; delete trailing blanks (if (member ex-token '("read" "write")) @@ -1137,11 +1137,11 @@ reversed." (defun viper-undisplayed-files () (mapcar - (lambda (b) + (lambda (b) (if (null (get-buffer-window b)) (let ((f (buffer-file-name b))) (if f f - (if ex-cycle-through-non-files + (if ex-cycle-through-non-files (let ((s (buffer-name b))) (if (string= " " (substring s 0 1)) nil @@ -1156,7 +1156,7 @@ reversed." (args "") (file-count 1)) (while (not (null l)) - (if (car l) + (if (car l) (setq args (format "%s %d) %s\n" args file-count (car l)) file-count (1+ file-count))) (setq l (cdr l))) @@ -1260,7 +1260,7 @@ reversed." (setq ex-file (viper-abbreviate-file-name (buffer-file-name)))) ((string= ex-file "") (error viper-NoFileSpecified))) - + (let (msg do-edit) (if buffer-file-name (cond ((buffer-modified-p) @@ -1274,7 +1274,7 @@ reversed." buffer-file-name) do-edit t)) (t (setq do-edit nil)))) - + (if do-edit (if (yes-or-no-p msg) (progn @@ -1282,9 +1282,9 @@ reversed." (kill-buffer (current-buffer))) (message "Buffer %s was left intact" (buffer-name)))) ) ; let - + (if (null (setq file (get-file-buffer ex-file))) - (progn + (progn ;; this also does shell-style globbing (ex-find-file ;; replace # and % with the previous/current file @@ -1296,7 +1296,7 @@ reversed." (if ex-offset (progn (save-window-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (delete-region (point-min) (point-max)) (insert ex-offset "\n") @@ -1339,7 +1339,7 @@ reversed." (viper-get-ex-pat) (if (null ex-token) (error "`%s': Missing regular expression" gcommand))) - + (if (string= ex-token "") (if (null viper-s-string) (error viper-NoPrevSearch) @@ -1379,7 +1379,7 @@ reversed." (forward-line -1) (end-of-line))))) (save-window-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) ;; com-str is the command string, i.e., g/pattern/ or v/pattern' (setq com-str (buffer-substring (1+ (point)) (1- (point-max))))) @@ -1460,7 +1460,7 @@ reversed." (error "`%s': Spurious text \"%s\" after mark name" name (substring name 1) viper-SpuriousText)) (save-window-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (skip-chars-forward " \t") (if (looking-at "[a-z]") @@ -1475,17 +1475,17 @@ reversed." (goto-char (car ex-addresses)) (point-to-register (viper-int-to-char (1+ (- char ?a))))))) - - + + ;; Alternate file is the file next to the first one in the buffer ring (defun ex-next (cycle-other-window &optional find-alt-file) (catch 'ex-edit (let (count l) - (if (not find-alt-file) + (if (not find-alt-file) (progn (viper-get-ex-file) (if (or (char-or-string-p ex-offset) - (and (not (string= "" ex-file)) + (and (not (string= "" ex-file)) (not (string-match "^[0-9]+$" ex-file)))) (progn (ex-edit t) @@ -1515,41 +1515,41 @@ reversed." (defun ex-next-related-buffer (direction &optional no-recursion) - + (viper-ring-rotate1 viper-related-files-and-buffers-ring direction) - - (let ((file-or-buffer-name + + (let ((file-or-buffer-name (viper-current-ring-item viper-related-files-and-buffers-ring)) (old-ring viper-related-files-and-buffers-ring) (old-win (selected-window)) skip-rest buf wind) - + (or (and (ring-p viper-related-files-and-buffers-ring) (> (ring-length viper-related-files-and-buffers-ring) 0)) (error "This buffer has no related files or buffers")) - + (or (stringp file-or-buffer-name) (error "File and buffer names must be strings, %S" file-or-buffer-name)) - + (setq buf (cond ((get-buffer file-or-buffer-name)) ((file-exists-p file-or-buffer-name) (find-file-noselect file-or-buffer-name)) )) - + (if (not (viper-buffer-live-p buf)) (error "Didn't find buffer %S or file %S" file-or-buffer-name (viper-abbreviate-file-name (expand-file-name file-or-buffer-name)))) - + (if (equal buf (current-buffer)) (or no-recursion ;; try again (progn (setq skip-rest t) (ex-next-related-buffer direction 'norecursion)))) - + (if skip-rest () ;; setup buffer @@ -1557,7 +1557,7 @@ reversed." () (setq wind (get-lru-window (if viper-xemacs-p nil 'visible))) (set-window-buffer wind buf)) - + (if (viper-window-display-p) (progn (raise-frame (window-frame wind)) @@ -1565,15 +1565,15 @@ reversed." (save-window-excursion (select-window wind) (sit-for 1)) (select-window wind))) (save-window-excursion (select-window wind) (sit-for 1))) - + (save-excursion (set-buffer buf) (setq viper-related-files-and-buffers-ring old-ring)) - + (setq viper-local-search-start-marker (point-marker)) ))) - - + + ;; Force auto save (defun ex-preserve () (message "Autosaving all buffers that need to be saved...") @@ -1595,7 +1595,7 @@ reversed." (defun ex-quit () ;; skip "!", if it is q!. In Viper q!, w!, etc., behave as q, w, etc. (save-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (if (looking-at "!") (forward-char 1))) (if (< viper-expert-level 3) @@ -1621,19 +1621,19 @@ reversed." (setq ex-file buffer-file-name))) (if ex-cmdfile (progn - (setq command + (setq command ;; replace # and % with the previous/current file (ex-expand-filsyms (concat ex-file ex-cmdfile-args) (current-buffer))) (shell-command command t)) (insert-file-contents ex-file))) (ex-fixup-history viper-last-ex-prompt ex-file ex-cmdfile-args)) - + ;; this function fixes ex-history for some commands like ex-read, ex-edit -(defun ex-fixup-history (&rest args) +(defun ex-fixup-history (&rest args) (setq viper-ex-history (cons (mapconcat 'identity args " ") (cdr viper-ex-history)))) - + ;; Ex recover from emacs \#file\# (defun ex-recover () @@ -1674,7 +1674,7 @@ reversed." (viper-set-unread-command-events ?\C-m))) (message ":set <Variable> [= <Value>]") (or batch (sit-for 2)) - + (while (string-match "^[ \\t\\n]*$" (setq str (completing-read ":set " ex-variable-alist))) @@ -1755,19 +1755,19 @@ reversed." (or (viper-set-unread-command-events "") (sit-for 2)) (setq val (read-string (format ":set %s = " var))) (ex-fixup-history "set" orig-var val) - + ;; check numerical values (if (member var '("sw" "shiftwidth" "ts" "tabstop" "ts-g" "tabstop-global" - "wm" "wrapmargin")) + "wm" "wrapmargin")) (condition-case nil (or (numberp (setq val2 (car (read-from-string val)))) (error "%s: Invalid value, numberp, %S" var val)) (error (error "%s: Invalid value, numberp, %S" var val)))) - + (cond ((member var '("sw" "shiftwidth")) (setq var "viper-shift-width")) @@ -1782,27 +1782,27 @@ reversed." set-cmd "setq-default")) ((member var '("wm" "wrapmargin")) ;; make it take effect in curr buff and new bufs - (kill-local-variable 'fill-column) - (setq var "fill-column" + (kill-local-variable 'fill-column) + (setq var "fill-column" val (format "(- (window-width) %s)" val) set-cmd "setq-default")) ((member var '("sh" "shell")) (setq var "explicit-shell-file-name" val (format "\"%s\"" val))))) (ex-fixup-history "set" orig-var)) - + (if set-cmd (setq actual-lisp-cmd (format "\n(%s %s %s) %s" set-cmd var val auto-cmd-label) lisp-cmd-del-pattern (format "^\n?[ \t]*([ \t]*%s[ \t]+%s[ \t].*)[ \t]*%s" set-cmd var auto-cmd-label))) - + (if (and ask-if-save (y-or-n-p (format "Do you want to save this setting in %s " viper-custom-file-name))) (progn - (viper-save-string-in-file + (viper-save-string-in-file actual-lisp-cmd viper-custom-file-name ;; del pattern lisp-cmd-del-pattern) @@ -1822,7 +1822,7 @@ reversed." lisp-cmd-del-pattern) )) )) - + (if set-cmd (message "%s %s %s" set-cmd var @@ -1843,7 +1843,7 @@ reversed." ;; special meaning (defun ex-get-inline-cmd-args (regex-forw &optional chars-back replace-str) (save-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (goto-char (point-min)) (re-search-forward regex-forw nil t) @@ -1868,7 +1868,7 @@ reversed." ;; Ex shell command (defun ex-shell () (shell)) - + ;; Viper help. Invokes Info (defun ex-help () (condition-case nil @@ -1895,7 +1895,7 @@ Please contact your system administrator. " ;; Ex substitute command ;; If REPEAT use previous regexp which is ex-reg-exp or viper-s-string -(defun ex-substitute (&optional repeat r-flag) +(defun ex-substitute (&optional repeat r-flag) (let ((opt-g nil) (opt-c nil) (matched-pos nil) @@ -1993,7 +1993,7 @@ Please contact your system administrator. " (defun ex-tag () (let (tag) (save-window-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (skip-chars-forward " \t") (set-mark (point)) @@ -2013,13 +2013,13 @@ Please contact your system administrator. " ;; Ex write command ;; ex-write doesn't support wildcards, because file completion is a better -;; mechanism. We also don't support # and % +;; mechanism. We also don't support # and % ;; because file history is a better mechanism. (defun ex-write (q-flag) (viper-default-ex-addresses t) (viper-get-ex-file) (let ((end (car ex-addresses)) - (beg (car (cdr ex-addresses))) + (beg (car (cdr ex-addresses))) (orig-buf (current-buffer)) ;;(orig-buf-file-name (buffer-file-name)) ;;(orig-buf-name (buffer-name)) @@ -2030,14 +2030,14 @@ Please contact your system administrator. " (if ex-cmdfile (progn (viper-enlarge-region beg end) - (shell-command-on-region (point) (mark t) + (shell-command-on-region (point) (mark t) (concat ex-file ex-cmdfile-args))) (if (and (string= ex-file "") (not (buffer-file-name))) (setq ex-file (read-file-name (format "Buffer %s isn't visiting any file. File to save in: " (buffer-name))))) - + (setq writing-whole-file (and (= (point-min) beg) (= (point-max) end)) ex-file (if (string= ex-file "") (buffer-file-name) @@ -2049,7 +2049,7 @@ Please contact your system administrator. " (setq ex-file (concat (file-name-as-directory ex-file) (file-name-nondirectory buffer-file-name)))) - + (setq file-exists (file-exists-p ex-file) writing-same-file (string= ex-file (buffer-file-name))) @@ -2070,7 +2070,7 @@ Please contact your system administrator. " (format "File %s exists. Overwrite? " ex-file)))) (error "Quit")) ;; writing a region or whole buffer to non-visited file - (unwind-protect + (unwind-protect (save-excursion (viper-enlarge-region beg end) (setq region (buffer-substring (point) (mark t))) @@ -2104,7 +2104,7 @@ Please contact your system administrator. " (if (and (buffer-file-name) writing-same-file) (set-visited-file-modtime)) ;; prevent loss of data if saving part of the buffer in visited file - (or writing-whole-file + (or writing-whole-file (not writing-same-file) (progn (sit-for 2) @@ -2115,7 +2115,7 @@ Please contact your system administrator. " (save-buffers-kill-emacs) (kill-buffer (current-buffer)))) ))) - + (defun ex-write-info (exists file-name beg end) (message "`%s'%s %d lines, %d characters" @@ -2155,7 +2155,7 @@ Please contact your system administrator. " (defun ex-command () (let (command) (save-window-excursion - (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) + (setq viper-ex-work-buf (get-buffer-create viper-ex-work-buf-name)) (set-buffer viper-ex-work-buf) (skip-chars-forward " \t") (setq command (buffer-substring (point) (point-max))) @@ -2262,7 +2262,7 @@ Type 'mak ' (including the space) to run make with no args." (with-output-to-temp-buffer " *viper-info*" (princ (if viper-auto-indent "autoindent (local)\n" "noautoindent (local)\n")) - (princ (if (default-value 'viper-auto-indent) + (princ (if (default-value 'viper-auto-indent) "autoindent (global) \n" "noautoindent (global) \n")) (princ (if viper-case-fold-search "ignorecase\n" "noignorecase\n")) (princ (if viper-re-search "magic\n" "nomagic\n")) diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 889bb61b4d4..8787e2eaa6f 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -535,7 +535,7 @@ defined in the low-level key-translation-map or function-key-map, such as those emitted by the arrow and function keys. Other sequences, e.g., \\e/, are treated as ESC command followed by a `/'. This is done for people who type fast and tend to hit other characters right after they hit ESC. Other people like -Emacs to translate ESC sequences all the time. +Emacs to translate ESC sequences all the time. The default is to translate all sequences only when using a dumb terminal. This permits you to use ESC as a meta key in insert mode." :type 'boolean diff --git a/lisp/emulation/viper-keym.el b/lisp/emulation/viper-keym.el index 0b978d97e8f..2369346a3ff 100644 --- a/lisp/emulation/viper-keym.el +++ b/lisp/emulation/viper-keym.el @@ -52,16 +52,16 @@ (defvar viper-toggle-key "\C-z" "The key used to change states from emacs to Vi and back. -In insert mode, this key also functions as Meta. +In insert mode, this key also functions as Meta. Must be set in .viper file or prior to loading Viper. This setting cannot be changed interactively.") -(defvar viper-ESC-key "\e" - "Key used to ESC. +(defvar viper-ESC-key "\e" + "Key used to ESC. Must be set in .viper file or prior to loading Viper. This setting cannot be changed interactively.") - -;;; Emacs keys in other states. + +;;; Emacs keys in other states. (defcustom viper-want-emacs-keys-in-insert t "*Set to nil if you want complete Vi compatibility in insert mode. @@ -84,7 +84,7 @@ don't have a convenient Meta key. Setting viper-no-multiple-ESC to nil will allow as many multiple ESC, as is allowed by the major mode in effect." :type 'boolean - :group 'viper) + :group 'viper) (defcustom viper-want-ctl-h-help nil "*If non-nil, C-h gets bound to help-command; otherwise, C-h gets the usual Vi bindings." @@ -103,14 +103,14 @@ as is allowed by the major mode in effect." ;; keymap used to zap all keymaps other than function-key-map, ;; device-function-key-map, etc. (defvar viper-overriding-map (make-sparse-keymap)) - + (viper-deflocalvar viper-vi-local-user-map (make-sparse-keymap) "Keymap for user-defined local bindings. Useful for changing bindings such as ZZ in certain major modes. For instance, in letter-mode, one may want to bind ZZ to mh-send-letter. In a newsreader such as gnus, tin, or rn, ZZ could be bound to save-buffers-kill-emacs then post article, etc.") -(put 'viper-vi-local-user-map 'permanent-local t) +(put 'viper-vi-local-user-map 'permanent-local t) (defvar viper-vi-global-user-map (make-sparse-keymap) "Keymap for user-defined global bindings. @@ -126,11 +126,11 @@ This map is global, shared by all buffers.") (defvar viper-vi-diehard-map (make-sparse-keymap) "This keymap is in use when the user asks Viper to simulate Vi very closely. This happens when viper-expert-level is 1 or 2. See viper-set-expert-level.") - + (viper-deflocalvar viper-insert-local-user-map (make-sparse-keymap) "Auxiliary map for per-buffer user-defined keybindings in Insert state.") -(put 'viper-insert-local-user-map 'permanent-local t) +(put 'viper-insert-local-user-map 'permanent-local t) (defvar viper-insert-global-user-map (make-sparse-keymap) "Auxiliary map for global user-defined bindings in Insert state.") @@ -148,16 +148,16 @@ viper-insert-basic-map. Not recommended, except for novice users.") (defvar viper-replace-map (make-sparse-keymap) "Map used in Viper's replace state.") - + (defvar viper-emacs-global-user-map (make-sparse-keymap) "Auxiliary map for global user-defined bindings in Emacs state.") (defvar viper-emacs-kbd-map (make-sparse-keymap) "This keymap keeps Vi-style kbd macros for emacs mode.") - + (viper-deflocalvar viper-emacs-local-user-map (make-sparse-keymap) "Auxiliary map for local user-defined bindings in Emacs state.") -(put 'viper-emacs-local-user-map 'permanent-local t) +(put 'viper-emacs-local-user-map 'permanent-local t) ;; This keymap should stay empty (defvar viper-empty-keymap (make-sparse-keymap)) @@ -170,19 +170,19 @@ viper-insert-basic-map. Not recommended, except for novice users.") ;;; Variables used by minor modes -;; Association list of the form +;; Association list of the form ;; ((major-mode . keymap) (major-mode . keymap) ...) ;; Viper uses these keymaps to make user-requested adjustments ;; to its Vi state in various major modes.") (defvar viper-vi-state-modifier-alist nil) -;; Association list of the form +;; Association list of the form ;; ((major-mode . keymap) (major-mode . keymap) ...) ;; Viper uses these keymaps to make user-requested adjustments ;; to its Insert state in various major modes.") (defvar viper-insert-state-modifier-alist nil) -;; Association list of the form +;; Association list of the form ;; ((major-mode . keymap) (major-mode . keymap) ...) ;; Viper uses these keymaps to make user-requested adjustments ;; to its Emacs state in various major modes. @@ -240,7 +240,7 @@ viper-insert-basic-map. Not recommended, except for novice users.") (define-key viper-insert-basic-map "\C-d" 'viper-backward-indent) (define-key viper-insert-basic-map "\C-w" 'viper-delete-backward-word) (define-key viper-insert-basic-map "\C-t" 'viper-forward-indent) -(define-key viper-insert-basic-map +(define-key viper-insert-basic-map (if viper-xemacs-p [(shift tab)] [S-tab]) 'viper-insert-tab) (define-key viper-insert-basic-map "\C-v" 'quoted-insert) (define-key viper-insert-basic-map "\C-?" 'viper-del-backward-char-in-insert) @@ -420,11 +420,11 @@ viper-insert-basic-map. Not recommended, except for novice users.") ;;; Minibuffer keymap - + (defvar viper-minibuffer-map (make-sparse-keymap) "Keymap used to modify keys when Minibuffer is in Insert state.") - + (define-key viper-minibuffer-map "\C-m" 'viper-exit-minibuffer) (define-key viper-minibuffer-map "\C-j" 'viper-exit-minibuffer) @@ -469,7 +469,7 @@ Normally, this would be called from a hook to a major mode or on a per buffer basis. Usage: (viper-add-local-keys state '((key-str . func) (key-str . func)...)) " - + (let (map) (cond ((eq state 'vi-state) (if viper-need-new-vi-local-map @@ -486,7 +486,7 @@ Usage: (setq viper-emacs-local-user-map (make-sparse-keymap))) (setq viper-need-new-emacs-local-map nil map viper-emacs-local-user-map)) - (t + (t (error "Invalid state in viper-add-local-keys: %S. Valid states: vi-state, insert-state or emacs-state" state))) @@ -507,7 +507,7 @@ sanity." viper-emacs-local-user-map (make-sparse-keymap) viper-need-new-emacs-local-map nil) (viper-normalize-minor-mode-map-alist)) - + (defun viper-modify-major-mode (mode state keymap) "Modify key bindings in a major-mode in a Viper state using a keymap. @@ -530,16 +530,16 @@ Arguments: (major-mode viper-state keymap)" (if (setq elt (assoc mode (eval alist))) (set alist (delq elt (eval alist)))) (set alist (cons (cons mode keymap) (eval alist))) - + ;; Normalization usually doesn't help here, since one needs to ;; normalize in the actual buffer where changes to the keymap are ;; to take place. However, it doesn't hurt, and it helps whenever this ;; function is actually called from within the affected buffer. (viper-normalize-minor-mode-map-alist) - + (viper-set-mode-vars-for viper-current-state))) - + ;; Displays variables that control Viper's keymaps (defun viper-debug-keymaps () (interactive) @@ -575,7 +575,7 @@ Arguments: (major-mode viper-state keymap)" (princ (format "viper-insert-global-user-minor-mode: %S\n" viper-insert-global-user-minor-mode)) (princ (format "viper-insert-kbd-minor-mode: %S\n" - viper-insert-kbd-minor-mode)) + viper-insert-kbd-minor-mode)) (princ (format "viper-insert-state-modifier-minor-mode: %S\n" viper-insert-state-modifier-minor-mode)) (princ (format "viper-insert-diehard-minor-mode: %S\n" @@ -590,7 +590,7 @@ Arguments: (major-mode viper-state keymap)" viper-emacs-global-user-minor-mode)) (princ (format "viper-emacs-state-modifier-minor-mode: %S\n" viper-emacs-state-modifier-minor-mode)) - + (princ (format "\nviper-expert-level %S\n" viper-expert-level)) (princ (format "viper-no-multiple-ESC %S\n" viper-no-multiple-ESC)) (princ (format "viper-always %S\n" viper-always)) @@ -599,22 +599,22 @@ Arguments: (major-mode viper-state keymap)" (princ (format "viper-ex-style-editing %S\n" viper-ex-style-editing)) (princ (format "viper-want-emacs-keys-in-vi %S\n" - viper-want-emacs-keys-in-vi)) + viper-want-emacs-keys-in-vi)) (princ (format "viper-want-emacs-keys-in-insert %S\n" - viper-want-emacs-keys-in-insert)) + viper-want-emacs-keys-in-insert)) (princ (format "viper-want-ctl-h-help %S\n" viper-want-ctl-h-help)) - + (princ "\n\n\n") (princ (format "Default value for minor-mode-map-alist: \n%S\n\n" (default-value 'minor-mode-map-alist))) (princ (format "Actual value for minor-mode-map-alist: \n%S\n" minor-mode-map-alist)) )) - + ;;; Keymap utils - -(defun viper-add-keymap (mapsrc mapdst) + +(defun viper-add-keymap (mapsrc mapdst) "Add contents of mapsrc to mapdst. It is assumed that mapsrc is sparse." (viper-cond-compile-for-xemacs-or-emacs ;; xemacs @@ -624,11 +624,11 @@ Arguments: (major-mode viper-state keymap)" (mapcar (lambda (p) (define-key mapdst (vector (car p)) (cdr p))) (cdr mapsrc)) )) - + (defun viper-modify-keymap (map alist) "Modifies MAP with bindings specified in the ALIST. The alist has the form ((key . function) (key . function) ... )." - (mapcar (lambda (p) (define-key map (eval (car p)) (cdr p))) + (mapcar (lambda (p) (define-key map (eval (car p)) (cdr p))) alist)) diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el index 69d1a42b2eb..b13c922188b 100644 --- a/lisp/emulation/viper-macs.el +++ b/lisp/emulation/viper-macs.el @@ -58,7 +58,7 @@ ;; Register holding last macro. (defvar viper-last-macro-reg nil) -;; format of the elements of kbd alists: +;; format of the elements of kbd alists: ;; (name ((buf . macr)...(buf . macr)) ((maj-mode . macr)...) (t . macr)) ;; kbd macro alist for Vi state (defvar viper-vi-kbd-macro-alist nil) @@ -121,7 +121,7 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., (viper-display-macro macro-name) (if ins "Insert" "Vi"))) )) - + ;; Ex unmap (defun ex-unmap () @@ -141,7 +141,7 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., (viper-display-macro temp))) (viper-unrecord-kbd-macro macro-name (if ins 'insert-state 'vi-state)) )) - + ;; read arguments for ex-map (defun ex-map-read-args (variant) @@ -149,7 +149,7 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., (key-seq []) temp key event message macro-name macro-body args) - + (condition-case nil (setq args (concat (ex-get-inline-cmd-args ".*map[!]*[ \t]?" "\n\C-m") " nil nil ") @@ -158,15 +158,15 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., macro-body (car (read-from-string args (cdr temp)))) (error (signal - 'error + 'error '("map: Macro name and body must be a quoted string or a vector")))) - + ;; We expect macro-name to be a vector, a string, or a quoted string. ;; In the second case, it will emerge as a symbol when read from ;; the above read-from-string. So we need to convert it into a string (if macro-name (cond ((vectorp macro-name) nil) - ((stringp macro-name) + ((stringp macro-name) (setq macro-name (vconcat macro-name))) (t (setq macro-name (vconcat (prin1-to-string macro-name))))) (message ":map%s <Name>" variant)(sit-for 2) @@ -198,13 +198,13 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., (viper-event-key event))) ) (setq macro-name key-seq)) - + (if (= (length macro-name) 0) (error "Can't map an empty macro name")) (setq macro-name (viper-fixup-macro macro-name)) (if (viper-char-array-p macro-name) (setq macro-name (viper-char-array-to-macro macro-name))) - + (if macro-body (cond ((viper-char-array-p macro-body) (setq macro-body (viper-char-array-to-macro macro-body))) @@ -212,7 +212,7 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., (t (error "map: Invalid syntax in macro definition")))) (setq cursor-in-echo-area nil)(sit-for 0) ; this overcomes xemacs tty bug (cons macro-name macro-body))) - + ;; read arguments for ex-unmap @@ -230,7 +230,7 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., event message key key-seq macro-name) (setq macro-name (ex-get-inline-cmd-args ".*unma?p?[!]*[ \t]*")) - + (if (> (length macro-name) 0) () (message ":unmap%s <Name>" variant) (sit-for 2) @@ -245,7 +245,7 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., (setq key-seq (subseq key-seq 0 (- (length key-seq) 2)))) ((member key '(tab (control i) ?\t)) (setq key-seq (subseq key-seq 0 (1- (length key-seq)))) - (setq message + (setq message (format ":unmap%s %s" variant (if (> (length key-seq) 0) @@ -255,7 +255,7 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., (setq key-seq (viper-do-sequence-completion key-seq macro-alist message)) )) - (setq message + (setq message (format ":unmap%s %s" variant (if (> (length key-seq) 0) @@ -278,14 +278,14 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., (if (= (length macro-name) 0) (error "Can't unmap an empty macro name")) - + ;; convert macro names into vector, if starts with a `[' (if (memq (elt macro-name 0) '(?\[ ?\")) (car (read-from-string macro-name)) (vconcat macro-name)) )) - - + + ;; Terminate a Vi kbd macro. ;; optional argument IGNORE, if t, indicates that we are dealing with an ;; existing macro that needs to be registered, but there is no need to @@ -311,11 +311,11 @@ a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., ;; always go back to Vi, since this is where we started ;; defining macro (viper-change-state-to-vi))) - + (viper-record-kbd-macro macro-name (if ins 'insert-state 'vi-state) (viper-display-macro macro-body)) - + (ex-fixup-history (format "map%s %S %S" mod-char (viper-display-macro macro-name) (viper-display-macro macro-body))) @@ -337,7 +337,7 @@ define the macro. MACRO-BODY is a string that represents the keyboard macro. Optional SCOPE says whether the macro should be global \(t\), mode-specific \(a major-mode symbol\), or buffer-specific \(buffer name, a string\). If SCOPE is nil, the user is asked to specify the scope." - (let* (state-name keymap + (let* (state-name keymap (macro-alist-var (cond ((eq state 'vi-state) (setq state-name "Vi state" @@ -354,20 +354,20 @@ If SCOPE is nil, the user is asked to specify the scope." )) new-elt old-elt old-sub-elt msg temp lis lis2) - + (if (= (length macro-name) 0) (error "Can't map an empty macro name")) - + ;; Macro-name is usually a vector. However, command history or macros ;; recorded in ~/.viper may be recorded as strings. So, convert to - ;; vectors. + ;; vectors. (setq macro-name (viper-fixup-macro macro-name)) (if (viper-char-array-p macro-name) (setq macro-name (viper-char-array-to-macro macro-name))) (setq macro-body (viper-fixup-macro macro-body)) (if (viper-char-array-p macro-body) (setq macro-body (viper-char-array-to-macro macro-body))) - + ;; don't ask if scope is given and is of the right type (or (eq scope t) (stringp scope) @@ -423,7 +423,7 @@ If SCOPE is nil, the user is asked to specify the scope." (if (y-or-n-p (format "Save this macro in %s? " (viper-abbreviate-file-name viper-custom-file-name))) - (viper-save-string-in-file + (viper-save-string-in-file (format "\n(viper-record-kbd-macro %S '%S %s '%S)" (viper-display-macro macro-name) state @@ -436,12 +436,12 @@ If SCOPE is nil, the user is asked to specify the scope." (if (vectorp macro-body) (format "%S" macro-body) macro-body) - scope) + scope) viper-custom-file-name)) - + (message msg) )) - + (setq new-elt (cons macro-name (cond ((eq scope t) (list nil nil (cons t nil))) @@ -463,7 +463,7 @@ If SCOPE is nil, the user is asked to specify the scope." (viper-array-to-string macro-name))) (setq lis2 (cons (car lis) lis2)) (setq lis (cdr lis))) - + (setq lis2 (reverse lis2)) (set macro-alist-var (append lis2 (cons new-elt lis))) (setq old-elt new-elt))) @@ -471,7 +471,7 @@ If SCOPE is nil, the user is asked to specify the scope." (cond ((eq scope t) (viper-kbd-global-pair old-elt)) ((symbolp scope) (assoc scope (viper-kbd-mode-alist old-elt))) ((stringp scope) (assoc scope (viper-kbd-buf-alist old-elt))))) - (if old-sub-elt + (if old-sub-elt (setcdr old-sub-elt macro-body) (cond ((symbolp scope) (setcar (cdr (cdr old-elt)) (cons (cons scope macro-body) @@ -480,9 +480,9 @@ If SCOPE is nil, the user is asked to specify the scope." (cons (cons scope macro-body) (viper-kbd-buf-alist old-elt)))))) )) - - + + ;; macro name must be a vector of viper-style keys (defun viper-unrecord-kbd-macro (macro-name state) "Delete macro MACRO-NAME from Viper STATE. @@ -491,7 +491,7 @@ internally, but the user can also use it in ~/.viper to delete pre-defined macros supplied with Viper. The best way to avoid mistakes in macro names to be passed to this function is to use viper-describe-kbd-macros and copy the name from there." - (let* (state-name keymap + (let* (state-name keymap (macro-alist-var (cond ((eq state 'vi-state) (setq state-name "Vi state" @@ -508,7 +508,7 @@ name from there." )) buf-mapping mode-mapping global-mapping macro-pair macro-entry) - + ;; Macro-name is usually a vector. However, command history or macros ;; recorded in ~/.viper may appear as strings. So, convert to vectors. (setq macro-name (viper-fixup-macro macro-name)) @@ -522,11 +522,11 @@ name from there." (error "%S is not mapped to a macro for %s in `%s'" (viper-display-macro macro-name) state-name (buffer-name))) - + (setq buf-mapping (viper-kbd-buf-pair macro-entry) mode-mapping (viper-kbd-mode-pair macro-entry) global-mapping (viper-kbd-global-pair macro-entry)) - + (cond ((and (cdr buf-mapping) (or (and (not (cdr mode-mapping)) (not (cdr global-mapping))) (y-or-n-p @@ -534,7 +534,7 @@ name from there." (viper-display-macro macro-name) (buffer-name))))) (setq macro-pair buf-mapping) - (message "%S is unmapped for %s in `%s'" + (message "%S is unmapped for %s in `%s'" (viper-display-macro macro-name) state-name (buffer-name))) ((and (cdr mode-mapping) @@ -559,7 +559,7 @@ name from there." (cdr global-mapping) (progn (set macro-alist-var (delq macro-entry (eval macro-alist-var))) - (if (viper-can-release-key (aref macro-name 0) + (if (viper-can-release-key (aref macro-name 0) (eval macro-alist-var)) (define-key keymap @@ -567,7 +567,7 @@ name from there." nil)) )) )) - + ;; Check if MACRO-ALIST has an entry for a macro name starting with ;; CHAR. If not, this indicates that the binding for this char ;; in viper-vi/insert-kbd-map can be released. @@ -575,7 +575,7 @@ name from there." (let ((lis macro-alist) (can-release t) macro-name) - + (while (and lis can-release) (setq macro-name (car (car lis))) (if (eq char (aref macro-name 0)) @@ -602,13 +602,13 @@ name from there." next-best-match keyseq event-seq macro-first-char macro-alist-elt macro-body command) - + (setq macro-first-char last-command-event event-seq (viper-read-fast-keysequence macro-first-char macro-alist) keyseq (viper-events-to-macro event-seq) macro-alist-elt (assoc keyseq macro-alist) next-best-match (viper-find-best-matching-macro macro-alist keyseq)) - + (if (null macro-alist-elt) (setq macro-alist-elt (car next-best-match) unmatched-suffix (subseq event-seq (cdr next-best-match)))) @@ -617,7 +617,7 @@ name from there." ((setq macro-body (viper-kbd-buf-definition macro-alist-elt))) ((setq macro-body (viper-kbd-mode-definition macro-alist-elt))) ((setq macro-body (viper-kbd-global-definition macro-alist-elt)))) - + ;; when defining keyboard macro, don't use the macro mappings (if (and macro-body (not defining-kbd-macro)) ;; block cmd executed as part of a macro from entering command history @@ -634,7 +634,7 @@ name from there." ;; some other command (setting prefix arg can happen if we do, say, ;; 2dw and there is a macro starting with 2. Then control will go to ;; this routine - (or prefix-arg (setq prefix-arg count)) + (or prefix-arg (setq prefix-arg count)) (setq command (key-binding (read-key-sequence nil))) (if (commandp command) (command-execute command) @@ -644,7 +644,7 @@ name from there." ;;; Displaying and completing macros - + (defun viper-describe-kbd-macros () "Show currently defined keyboard macros." (interactive) @@ -656,7 +656,7 @@ name from there." (princ "\n\nMacros in Emacs state:\n======================\n") (mapcar 'viper-describe-one-macro viper-emacs-kbd-macro-alist) )) - + (defun viper-describe-one-macro (macro) (princ (format "\n *** Mappings for %S:\n ------------\n" (viper-display-macro (car macro)))) @@ -673,29 +673,29 @@ name from there." (princ (format "\n %S" (cdr (viper-kbd-global-pair macro)))) (princ " none")) (princ "\n")) - + (defun viper-describe-one-macro-elt (elt) (let ((name (car elt)) (defn (cdr elt))) (princ (format "\n * %S:\n %S\n" name defn)))) - - - + + + ;; check if SEQ is a prefix of some car of an element in ALIST (defun viper-keyseq-is-a-possible-macro (seq alist) (let ((converted-seq (viper-events-to-macro seq))) - (eval (cons 'or + (eval (cons 'or (mapcar (lambda (elt) (viper-prefix-subseq-p converted-seq elt)) (viper-this-buffer-macros alist)))))) - + ;; whether SEQ1 is a prefix of SEQ2 (defun viper-prefix-subseq-p (seq1 seq2) (let ((len1 (length seq1)) (len2 (length seq2))) (if (<= len1 len2) (equal seq1 (subseq seq2 0 len1))))) - + ;; find the longest common prefix (defun viper-common-seq-prefix (&rest seqs) (let* ((first (car seqs)) @@ -707,18 +707,18 @@ name from there." (setq len 0) (setq len (apply 'min (mapcar 'length seqs)))) (while (< idx len) - (if (eval (cons 'and + (if (eval (cons 'and (mapcar (lambda (s) (equal (elt first idx) (elt s idx))) rest))) (setq pref (vconcat pref (vector (elt first idx))))) (setq idx (1+ idx))) pref)) - + ;; get all sequences that match PREFIX from a given A-LIST (defun viper-extract-matching-alist-members (pref alist) (delq nil (mapcar (lambda (elt) (if (viper-prefix-subseq-p pref elt) elt)) (viper-this-buffer-macros alist)))) - + (defun viper-do-sequence-completion (seq alist compl-message) (let* ((matches (viper-extract-matching-alist-members seq alist)) (new-seq (apply 'viper-common-seq-prefix matches)) @@ -726,27 +726,27 @@ name from there." (cond ((and (equal seq new-seq) (= (length matches) 1)) (message "%s (Sole completion)" compl-message) (sit-for 2)) - ((null matches) + ((null matches) (message "%s (No match)" compl-message) (sit-for 2) (setq new-seq seq)) - ((member seq matches) + ((member seq matches) (message "%s (Complete, but not unique)" compl-message) (sit-for 2) (viper-display-vector-completions matches)) ((equal seq new-seq) (viper-display-vector-completions matches))) new-seq)) - - + + (defun viper-display-vector-completions (list) (with-output-to-temp-buffer "*Completions*" - (display-completion-list + (display-completion-list (mapcar 'prin1-to-string (mapcar 'viper-display-macro list))))) - - - + + + ;; alist is the alist of macros ;; str is the fast key sequence entered ;; returns: (matching-macro-def . unmatched-suffix-start-index) @@ -766,17 +766,17 @@ name from there." (setq found t)) ) (setq lis (cdr lis))) - + (if found (setq match macro-def unmatched-start-idx def-len) (setq match nil unmatched-start-idx 0)) - + (cons match unmatched-start-idx))) - - - + + + ;; returns a list of names of macros defined for the current buffer (defun viper-this-buffer-macros (macro-alist) (let (candidates) @@ -788,8 +788,8 @@ name from there." (car elt))) macro-alist)) (setq candidates (delq nil candidates)))) - - + + ;; if seq of Viper key symbols (representing a macro) can be converted to a ;; string--do so. Otherwise, do nothing. (defun viper-display-macro (macro-name-or-body) @@ -798,7 +798,7 @@ name from there." ((viper-char-array-p macro-name-or-body) (mapconcat 'char-to-string macro-name-or-body "")) (t macro-name-or-body))) - + ;; convert sequence of events (that came presumably from emacs kbd macro) into ;; Viper's macro, which is a vector of the form ;; [ desc desc ... ] @@ -813,7 +813,7 @@ name from there." nil (viper-event-key elt))) event-seq)))) - + ;; convert strings or arrays of characters to Viper macro form (defun viper-char-array-to-macro (array) (let ((vec (vconcat array)) @@ -822,7 +822,7 @@ name from there." (setq macro (mapcar 'character-to-event vec)) (setq macro vec)) (vconcat (mapcar 'viper-event-key macro)))) - + ;; For macros bodies and names, goes over MACRO and checks if all members are ;; names of keys (actually, it only checks if they are symbols or lists ;; if a digit is found, it is converted into a symbol (e.g., 0 -> \0, etc). @@ -850,18 +850,18 @@ name from there." ((symbolp elt) nil) (t (setq break t))) (setq idx (1+ idx)))) - + (if break (error "Wrong type macro component, symbol-or-listp, %S" elt) macro))) - + (defun viper-macro-to-events (macro-body) (vconcat (mapcar 'viper-key-to-emacs-key macro-body))) - - + + ;;; Reading fast key sequences - + ;; Assuming that CHAR was the first character in a fast succession of key ;; strokes, read the rest. Return the vector of keys that was entered in ;; this fast succession of key strokes. @@ -902,7 +902,7 @@ name from there." (viper-set-register-macro reg)) (execute-kbd-macro (get-register reg) count))) ((or (= ?@ reg) (= ?\^j reg) (= ?\^m reg)) - (if viper-last-macro-reg + (if viper-last-macro-reg nil (error "No previous kbd macro")) (execute-kbd-macro (get-register viper-last-macro-reg) count)) @@ -916,7 +916,7 @@ name from there." (viper-set-register-macro reg)))) (t (error "`%c': Unknown register" reg))))) - + (defun viper-global-execute () "Call last keyboad macro for each line in the region." diff --git a/lisp/emulation/viper-mous.el b/lisp/emulation/viper-mous.el index 330f93fc49f..1889a901e88 100644 --- a/lisp/emulation/viper-mous.el +++ b/lisp/emulation/viper-mous.el @@ -58,23 +58,23 @@ ;;; Variables - + ;; Variable used for catching the switch-frame event. ;; If non-nil, indicates that previous-frame should be the selected ;; one. Used by viper-mouse-click-get-word. Not a user option. (defvar viper-frame-of-focus nil) - + ;; Frame that was selected before the switch-frame event. (defconst viper-current-frame-saved (selected-frame)) - + (defcustom viper-surrounding-word-function 'viper-surrounding-word "*Function that determines what constitutes a word for clicking events. -Takes two parameters: a COUNT, indicating how many words to return, +Takes two parameters: a COUNT, indicating how many words to return, and CLICK-COUNT, telling whether this is the first click, a double-click, or a tripple-click." :type 'symbol :group 'viper-mouse) - + ;; time interval in millisecond within which successive clicks are ;; considered related (defcustom viper-multiclick-timeout (if (viper-window-display-p) @@ -94,10 +94,10 @@ considered related." ;; Local variable used to toggle wraparound search on click. (viper-deflocalvar viper-mouse-click-search-noerror t) - + ;; Local variable used to delimit search after wraparound. (viper-deflocalvar viper-mouse-click-search-limit nil) - + ;; remembers prefix argument to pass along to commands invoked by second ;; click. ;; This is needed because in Emacs (not XEmacs), assigning to preix-arg @@ -147,7 +147,7 @@ considered related." (event-point click) ; xemacs (posn-point (event-start click)) ; emacs )) - + (defun viper-surrounding-word (count click-count) "Returns word surrounding point according to a heuristic. @@ -174,7 +174,7 @@ is ignored." (setq beg (point)) (end-of-line) (setq result (buffer-substring beg (point)))) - + (if (and (not (viper-looking-at-alphasep)) (or (save-excursion (viper-backward-char-carefully) (viper-looking-at-alpha)) @@ -194,13 +194,13 @@ is ignored." (t (char-to-string (following-char)))) ) )) - + ;; Add `-' to alphanum, if it wasn't added and if we are in Lisp (or (looking-at "-") (not (string-match "lisp" (symbol-name major-mode))) (setq modifiers (concat modifiers "C-C-"))) - - + + (save-excursion (cond ((> click-count 1) (viper-skip-nonseparators 'backward)) ((viper-looking-at-alpha modifiers) @@ -212,7 +212,7 @@ is ignored." (viper-skip-alpha-backward modifiers)))) (setq word-beg (point)) - + (setq skip-flag nil) ; don't move 1 char forw the first time (while (> count 0) (if skip-flag (viper-forward-char-carefully 1)) @@ -237,19 +237,19 @@ is ignored." Click may be in another window. Current window and buffer isn't changed. On single or double click, returns the word as determined by `viper-surrounding-word-function'." - + (let ((click-word "") (click-pos (viper-mouse-click-posn click)) (click-buf (viper-mouse-click-window-buffer click))) (or (natnump count) (setq count 1)) (or (natnump click-count) (setq click-count 1)) - + (save-excursion (save-window-excursion (if click-pos (progn (set-buffer click-buf) - + (goto-char click-pos) (setq click-word (funcall viper-surrounding-word-function count click-count))) @@ -280,7 +280,7 @@ See `viper-surrounding-word' for the definition of a word in this case." ((and (listp arg) (integerp (car arg))) (setq arg (car arg))) (t (setq arg 1))) - + (if (not (eq (key-binding viper-mouse-down-insert-key-parsed) 'viper-mouse-catch-frame-switch)) () ; do nothing @@ -309,13 +309,13 @@ See `viper-surrounding-word' for the definition of a word in this case." (not (viper-mouse-event-p interrupting-event))) (viper-set-unread-command-events interrupting-event)) ))))) - + ;; Arg is an event. Accepts symbols and numbers, too (defun viper-mouse-event-p (event) (if (eventp event) (string-match "\\(mouse-\\|frame\\|screen\\|track\\)" (prin1-to-string (viper-event-key event))))) - + ;; XEmacs has no double-click events. So, we must simulate. ;; So, we have to simulate event-click-count. (defun viper-event-click-count (click) @@ -323,7 +323,7 @@ See `viper-surrounding-word' for the definition of a word in this case." (viper-event-click-count-xemacs click) ; xemacs (event-click-count click) ; emacs )) - + ;; kind of semaphore for updating viper-current-click-count (defvar viper-counting-clicks-p nil) (viper-cond-compile-for-xemacs-or-emacs @@ -346,7 +346,7 @@ See `viper-surrounding-word' for the definition of a word in this case." )) nil ; emacs ) - + (defun viper-mouse-click-search-word (click arg) "Find the word clicked or double-clicked on. Word may be in another window. @@ -367,7 +367,7 @@ this command." () ; do nothing, if binding isn't right or not over text (let ((previous-search-string viper-s-string) click-word click-count) - + (if (and (viper-multiclick-p) ;; This trick checks if there is a pending mouse event if so, we use @@ -387,12 +387,12 @@ this command." ;; uninterrupted wait (setq click-count (viper-event-click-count click)) (setq click-word (viper-mouse-click-get-word click nil click-count)) - + (if (> click-count 1) (setq arg viper-global-prefix-argument viper-global-prefix-argument nil)) (setq arg (or arg 1)) - + (viper-deactivate-mark) (if (or (not (string= click-word viper-s-string)) (not (markerp viper-search-start-marker)) @@ -404,7 +404,7 @@ this command." viper-local-search-start-marker viper-search-start-marker viper-mouse-click-search-noerror t viper-mouse-click-search-limit nil) - + ;; make search string known to Viper (setq viper-s-string (if viper-re-search (regexp-quote click-word) @@ -413,7 +413,7 @@ this command." (setq viper-search-history (cons viper-s-string viper-search-history))) )) - + (push-mark nil t) (while (> arg 0) (viper-forward-word 1) @@ -431,7 +431,7 @@ this command." (marker-buffer viper-local-search-start-marker)) (goto-char viper-local-search-start-marker)) (viper-line-pos 'end))) - + (goto-char (point-min)) (search-forward click-word viper-mouse-click-search-limit nil))) @@ -452,14 +452,14 @@ this command." click-word (buffer-name (current-buffer))) (setq arg 1) ;; to terminate the loop (sit-for 2)) - (setq viper-mouse-click-search-noerror t) + (setq viper-mouse-click-search-noerror t) (setq viper-mouse-click-search-limit nil) (if (and (markerp viper-local-search-start-marker) (marker-buffer viper-local-search-start-marker)) (goto-char viper-local-search-start-marker)))) (setq arg (1- arg))) )))) - + (defun viper-mouse-catch-frame-switch (event arg) "Catch the event of switching frame. Usually is bound to a `down-mouse' event to work properly. See sample @@ -472,10 +472,10 @@ bindings in the Viper manual." (setq viper-frame-of-focus viper-current-frame-saved)) ;; make Emacs forget that it executed viper-mouse-catch-frame-switch (setq this-command last-command)) - + ;; Called just before switching frames. Saves the old selected frame. ;; Sets last-command to handle-switch-frame (this is done automatically in -;; Emacs. +;; Emacs. ;; The semantics of switching frames is different in Emacs and XEmacs. ;; In Emacs, if you select-frame A while mouse is over frame B and then ;; start typing, input goes to frame B, which becomes selected. @@ -575,21 +575,21 @@ bindings in the Viper manual." (cond ((or (null viper-mouse-up-search-key-parsed) (null viper-mouse-down-search-key-parsed)) nil) ; just quit - ((and (null force) + ((and (null force) (key-binding viper-mouse-up-search-key-parsed) (not (eq (key-binding viper-mouse-up-search-key-parsed) 'viper-mouse-click-search-word))) - (message + (message "%S already bound to a mouse event. Viper mouse-search feature disabled" viper-mouse-up-search-key-parsed)) - ((and (null force) + ((and (null force) (key-binding viper-mouse-down-search-key-parsed) (not (eq (key-binding viper-mouse-down-search-key-parsed) 'viper-mouse-catch-frame-switch))) (message "%S already bound to a mouse event. Viper mouse-search feature disabled" viper-mouse-down-search-key-parsed)) - (t + (t (global-set-key viper-mouse-up-search-key-parsed 'viper-mouse-click-search-word) (global-set-key viper-mouse-down-search-key-parsed @@ -608,7 +608,7 @@ bindings in the Viper manual." (key-binding viper-mouse-up-insert-key-parsed) (not (eq (key-binding viper-mouse-up-insert-key-parsed) 'viper-mouse-click-insert-word))) - (message + (message "%S already bound to a mouse event. Viper mouse-insert feature disabled" viper-mouse-up-insert-key-parsed)) ((and (null force) @@ -618,7 +618,7 @@ bindings in the Viper manual." (message "%S already bound to a mouse event. Viper mouse-insert feature disabled" viper-mouse-down-insert-key-parsed)) - (t + (t (global-set-key viper-mouse-up-insert-key-parsed 'viper-mouse-click-insert-word) (global-set-key viper-mouse-down-insert-key-parsed @@ -666,7 +666,7 @@ This buffer may be different from the one where the click occurred." (integer :tag "Button")) :set 'viper-reset-mouse-insert-key :group 'viper-mouse) - + ;;; Local Variables: diff --git a/lisp/emulation/viper-util.el b/lisp/emulation/viper-util.el index 2bbdb828ff6..fc7f0c8223b 100644 --- a/lisp/emulation/viper-util.el +++ b/lisp/emulation/viper-util.el @@ -136,20 +136,20 @@ (eq (device-class (selected-device)) 'color) ; xemacs (x-display-color-p) ; emacs )) - + (defsubst viper-get-cursor-color () (viper-cond-compile-for-xemacs-or-emacs ;; xemacs (color-instance-name (frame-property (selected-frame) 'cursor-color)) (cdr (assoc 'cursor-color (frame-parameters))) ; emacs )) - + ;; OS/2 (cond ((eq (viper-device-type) 'pm) (fset 'viper-color-defined-p (lambda (color) (assoc color pm-color-alist))))) - + ;; cursor colors (defun viper-change-cursor-color (new-color) @@ -163,7 +163,7 @@ (selected-frame) (list (cons 'cursor-color new-color))) ) )) - + ;; By default, saves current frame cursor color in the ;; viper-saved-cursor-color-in-replace-mode property of viper-replace-overlay (defun viper-save-cursor-color (before-which-mode) @@ -180,7 +180,7 @@ 'viper-saved-cursor-color-in-insert-mode) color))) )))) - + (defsubst viper-get-saved-cursor-color-in-replace-mode () (or @@ -197,7 +197,7 @@ (selected-frame) 'viper-saved-cursor-color-in-insert-mode) viper-vi-state-cursor-color)) - + ;; restore cursor color from replace overlay (defun viper-restore-cursor-color(after-which-mode) (if (viper-overlay-p viper-replace-overlay) @@ -206,7 +206,7 @@ (viper-get-saved-cursor-color-in-replace-mode) (viper-get-saved-cursor-color-in-insert-mode)) ))) - + ;; Check the current version against the major and minor version numbers ;; using op: cur-vers op major.minor If emacs-major-version or @@ -234,14 +234,14 @@ (error "%S: Invalid op in viper-check-version" op)))) (cond ((memq op '(= > >=)) nil) ((memq op '(< <=)) t)))) - + (defun viper-get-visible-buffer-window (wind) (if viper-xemacs-p (get-buffer-window wind t) (get-buffer-window wind 'visible))) - - + + ;; Return line position. ;; If pos is 'start then returns position of line start. ;; If pos is 'end, returns line end. If pos is 'mid, returns line center. @@ -286,7 +286,7 @@ ;; Like move-marker but creates a virgin marker if arg isn't already a marker. ;; The first argument must eval to a variable name. ;; Arguments: (var-name position &optional buffer). -;; +;; ;; This is useful for moving markers that are supposed to be local. ;; For this, VAR-NAME should be made buffer-local with nil as a default. ;; Then, each time this var is used in `viper-move-marker-locally' in a new @@ -309,14 +309,14 @@ ;;; List/alist utilities - + ;; Convert LIST to an alist (defun viper-list-to-alist (lst) (let ((alist)) (while lst (setq alist (cons (list (car lst)) alist)) (setq lst (cdr lst))) - alist)) + alist)) ;; Convert ALIST to a list. (defun viper-alist-to-list (alst) @@ -334,8 +334,8 @@ (if (string-match regexp (car (car inalst))) (setq outalst (cons (car inalst) outalst))) (setq inalst (cdr inalst))) - outalst)) - + outalst)) + ;; Filter LIST using REGEXP. Return list whose elements match the regexp. (defun viper-filter-list (regexp lst) (interactive "s x") @@ -344,9 +344,9 @@ (if (string-match regexp (car inlst)) (setq outlst (cons (car inlst) outlst))) (setq inlst (cdr inlst))) - outlst)) + outlst)) + - ;; Append LIS2 to LIS1, both alists, by side-effect and returns LIS1 ;; LIS2 is modified by filtering it: deleting its members of the form ;; \(car elt\) such that (car elt') is in LIS1. @@ -359,7 +359,7 @@ (while (setq elt (assoc (car (car temp)) lis2)) (setq lis2 (delq elt lis2))) (setq temp (cdr temp))) - + (nconc lis1 lis2))) @@ -380,7 +380,7 @@ (command (cond (viper-ms-style-os-p (format "\"ls -1 -d %s\"" filespec)) (t (format "ls -1 -d %s" filespec)))) status) - (save-excursion + (save-excursion (set-buffer (get-buffer-create viper-ex-tmp-buf-name)) (erase-buffer) (setq status @@ -425,7 +425,7 @@ ((looking-at "'") (setq delim ?') (re-search-forward "[^']+" nil t)) ; noerror - (t + (t (re-search-forward (concat "[^" skip-chars "]+") nil t))) ;noerror (setq fname @@ -459,14 +459,14 @@ (defun viper-glob-mswindows-files (filespec) (let ((case-fold-search t) tmp tmp2) - (save-excursion + (save-excursion (set-buffer (get-buffer-create viper-ex-tmp-buf-name)) (erase-buffer) (insert filespec) (goto-char (point-min)) (setq tmp (viper-get-filenames-from-buffer)) (while tmp - (setq tmp2 (cons (directory-files + (setq tmp2 (cons (directory-files ;; the directory part (or (file-name-directory (car tmp)) "") @@ -495,7 +495,7 @@ (t (car ring)))) (viper-current-ring-item ring) ))) - + (defun viper-special-ring-rotate1 (ring dir) (if (memq viper-intermediate-command '(repeating-display-destructive-command @@ -503,14 +503,14 @@ (viper-ring-rotate1 ring dir) ;; don't rotate otherwise (viper-ring-rotate1 ring 0))) - + ;; current ring item; if N is given, then so many items back from the ;; current (defun viper-current-ring-item (ring &optional n) (setq n (or n 0)) (if (and (ring-p ring) (> (ring-length ring) 0)) (aref (cdr (cdr ring)) (mod (- (car ring) 1 n) (ring-length ring))))) - + ;; Push item onto ring. The second argument is a ring-variable, not value. (defun viper-push-onto-ring (item ring-var) (or (ring-p (eval ring-var)) @@ -532,7 +532,7 @@ (viper-array-to-string (this-command-keys)))) (viper-ring-insert (eval ring-var) item)) ) - + ;; removing elts from ring seems to break it (defun viper-cleanup-ring (ring) @@ -542,7 +542,7 @@ (if (equal (viper-current-ring-item ring) (viper-current-ring-item ring 1)) (viper-ring-pop ring)))) - + ;; ring-remove seems to be buggy, so we concocted this for our purposes. (defun viper-ring-pop (ring) (let* ((ln (ring-length ring)) @@ -551,20 +551,20 @@ (hd (car ring)) (idx (max 0 (ring-minus1 hd ln))) (top-elt (aref vec idx))) - + ;; shift elements (while (< (1+ idx) veclen) (aset vec idx (aref vec (1+ idx))) (setq idx (1+ idx))) (aset vec idx nil) - + (setq hd (max 0 (ring-minus1 hd ln))) (if (= hd (1- ln)) (setq hd 0)) (setcar ring hd) ; move head (setcar (cdr ring) (max 0 (1- ln))) ; adjust length top-elt )) - + (defun viper-ring-insert (ring item) (let* ((ln (ring-length ring)) (vec (cdr (cdr ring))) @@ -572,7 +572,7 @@ (hd (car ring)) (vecpos-after-hd (if (= hd 0) ln hd)) (idx ln)) - + (if (= ln veclen) (progn (aset vec hd item) ; hd is always 1+ the actual head index in vec @@ -584,7 +584,7 @@ (setq idx (1- idx))) (aset vec vecpos-after-hd item)) item)) - + ;;; String utilities @@ -592,12 +592,12 @@ ;; PRE-STRING is a string to prepend to the abbrev string. ;; POST-STRING is a string to append to the abbrev string. ;; ABBREV_SIGN is a string to be inserted before POST-STRING -;; if the orig string was truncated. +;; if the orig string was truncated. (defun viper-abbreviate-string (string max-len pre-string post-string abbrev-sign) (let (truncated-str) (setq truncated-str - (if (stringp string) + (if (stringp string) (substring string 0 (min max-len (length string))))) (cond ((null truncated-str) "") ((> (length string) max-len) @@ -610,7 +610,7 @@ (save-excursion (beginning-of-line) (looking-at "^[ \t]*$"))) - + ;;; Saving settings in custom file @@ -644,7 +644,7 @@ (sit-for 2) (message ""))) )) - + ;; Save STRING in CUSTOM-FILE. If PATTERN is non-nil, remove strings that ;; match this pattern. (defun viper-save-string-in-file (string custom-file &optional pattern) @@ -670,7 +670,7 @@ ;; Can happen only in Emacs, since XEmacs has file-remote-p (ange-ftp-ftp-name file-name)))))) - + ;; This is a simple-minded check for whether a file is under version control. ;; If file,v exists but file doesn't, this file is considered to be not checked @@ -721,9 +721,9 @@ (viper-abbreviate-file-name file)))) (with-current-buffer buf (command-execute checkout-function))))) - - + + ;;; Overlays (defun viper-put-on-search-overlay (beg end) @@ -756,7 +756,7 @@ (defsubst viper-move-replace-overlay (beg end) (viper-move-overlay viper-replace-overlay beg end)) - + (defun viper-set-replace-overlay (beg end) (if (viper-overlay-live-p viper-replace-overlay) (viper-move-replace-overlay beg end) @@ -764,7 +764,7 @@ ;; never detach (viper-overlay-put viper-replace-overlay (if viper-emacs-p 'evaporate 'detachable) nil) - (viper-overlay-put + (viper-overlay-put viper-replace-overlay 'priority viper-replace-overlay-priority) ;; If Emacs will start supporting overlay maps, as it currently supports ;; text-property maps, we could do away with viper-replace-minor-mode and @@ -773,15 +773,15 @@ ;; viper-replace-overlay ;; (if viper-xemacs-p 'keymap 'local-map) ;; viper-replace-map) - ) + ) (if (viper-has-face-support-p) (viper-overlay-put viper-replace-overlay 'face viper-replace-overlay-face)) (viper-save-cursor-color 'before-replace-mode) (viper-change-cursor-color viper-replace-overlay-cursor-color) ) - - + + (defun viper-set-replace-overlay-glyphs (before-glyph after-glyph) (or (viper-overlay-live-p viper-replace-overlay) (viper-set-replace-overlay (point-min) (point-min))) @@ -791,7 +791,7 @@ (after-name (if viper-xemacs-p 'end-glyph 'after-string))) (viper-overlay-put viper-replace-overlay before-name before-glyph) (viper-overlay-put viper-replace-overlay after-name after-glyph)))) - + (defun viper-hide-replace-overlay () (viper-set-replace-overlay-glyphs nil nil) (viper-restore-cursor-color 'after-replace-mode) @@ -799,12 +799,12 @@ (if (viper-has-face-support-p) (viper-overlay-put viper-replace-overlay 'face nil))) - + (defsubst viper-replace-start () (viper-overlay-start viper-replace-overlay)) (defsubst viper-replace-end () (viper-overlay-end viper-replace-overlay)) - + ;; Minibuffer @@ -814,7 +814,7 @@ (progn (viper-overlay-put viper-minibuffer-overlay 'face viper-minibuffer-current-face) - (viper-overlay-put + (viper-overlay-put viper-minibuffer-overlay 'priority viper-minibuffer-overlay-priority) ;; never detach (viper-overlay-put @@ -828,7 +828,7 @@ (viper-overlay-put viper-minibuffer-overlay 'start-open nil) (viper-overlay-put viper-minibuffer-overlay 'end-open nil))) ))) - + (defun viper-check-minibuffer-overlay () (if (viper-overlay-live-p viper-minibuffer-overlay) (viper-move-overlay @@ -849,7 +849,7 @@ (defsubst viper-is-in-minibuffer () (save-match-data (string-match "\*Minibuf-" (buffer-name)))) - + ;;; XEmacs compatibility @@ -861,8 +861,8 @@ ;; emacs (abbreviate-file-name file) )) - -;; Sit for VAL milliseconds. XEmacs doesn't support the millisecond arg + +;; Sit for VAL milliseconds. XEmacs doesn't support the millisecond arg ;; in sit-for, so this function smoothes out the differences. (defsubst viper-sit-for-short (val &optional nodisp) (if viper-xemacs-p @@ -883,7 +883,7 @@ (save-excursion (set-buffer buf) (and (<= pos (point-max)) (<= (point-min) pos)))))) - + (defsubst viper-mark-marker () (viper-cond-compile-for-xemacs-or-emacs (mark-marker t) ; xemacs @@ -896,7 +896,7 @@ (setq mark-ring (delete (viper-mark-marker) mark-ring)) (set-mark-command nil) (setq viper-saved-mark (point))) - + ;; In transient mark mode (zmacs mode), it is annoying when regions become ;; highlighted due to Viper's pushing marks. So, we deactivate marks, unless ;; the user explicitly wants highlighting, e.g., by hitting '' or `` @@ -927,8 +927,8 @@ (and (<= ?A reg) (<= reg ?Z))) )) - - + + ;; it is suggested that an event must be copied before it is assigned to ;; last-command-event in XEmacs (defun viper-copy-event (event) @@ -936,15 +936,15 @@ (copy-event event) ; xemacs event ; emacs )) - + ;; Uses different timeouts for ESC-sequences and others (defsubst viper-fast-keysequence-p () - (not (viper-sit-for-short + (not (viper-sit-for-short (if (viper-ESC-event-p last-input-event) viper-ESC-keyseq-timeout viper-fast-keyseq-timeout) t))) - + ;; like read-event, but in XEmacs also try to convert to char, if possible (defun viper-read-event-convert-to-char () (let (event) @@ -978,7 +978,7 @@ ;; keysequence. Otherwise, viper-fast-keysequence-p will be ;; always t -- whether there is anything after ESC or not (viper-set-unread-command-events keyseq) - (setq keyseq (read-key-sequence nil))) + (setq keyseq (read-key-sequence nil))) (viper-set-unread-command-events keyseq) (setq keyseq (read-key-sequence nil))))) keyseq)) @@ -989,13 +989,13 @@ ;; macros, since it enables certain macros to be shared between X and TTY modes ;; by correctly mapping key sequences for Left/Right/... (one an ascii ;; terminal) into logical keys left, right, etc. -(defun viper-read-key () - (let ((overriding-local-map viper-overriding-map) +(defun viper-read-key () + (let ((overriding-local-map viper-overriding-map) (inhibit-quit t) - help-char key) - (use-global-map viper-overriding-map) + help-char key) + (use-global-map viper-overriding-map) (unwind-protect - (setq key (elt (viper-read-key-sequence nil) 0)) + (setq key (elt (viper-read-key-sequence nil) 0)) (use-global-map global-map)) key)) @@ -1019,7 +1019,7 @@ (event-key event)) ((button-event-p event) (concat "mouse-" (prin1-to-string (event-button event)))) - (t + (t (error "viper-event-key: Unknown event, %S" event))) ;; Emacs doesn't handle capital letters correctly, since ;; \S-a isn't considered the same as A (it behaves as @@ -1053,7 +1053,7 @@ (if mod (append mod (list basis)) basis)))) - + (defun viper-key-to-emacs-key (key) (let (key-name char-p modifiers mod-char-list base-key base-key-name) (cond (viper-xemacs-p key) @@ -1109,7 +1109,7 @@ "viper-eventify-list-xemacs: can't convert to event, %S" elt)))) lis)) - + ;; Smoothes out the difference between Emacs' unread-command-events ;; and XEmacs unread-command-event. Arg is a character, an event, a list of @@ -1154,7 +1154,7 @@ (and (vectorp vec) (eval (cons 'and (mapcar '(lambda (elt) (if (eventp elt) t)) vec))))) - + ;; check if vec is a vector of character symbols (defun viper-char-symbol-sequence-p (vec) (and @@ -1164,8 +1164,8 @@ (mapcar (lambda (elt) (and (symbolp elt) (= (length (symbol-name elt)) 1))) vec))))) - - + + (defun viper-char-array-p (array) (eval (cons 'and (mapcar 'viper-characterp array)))) @@ -1188,7 +1188,7 @@ (t (prin1-to-string (vconcat temp))))) ((viper-char-symbol-sequence-p event-seq) (mapconcat 'symbol-name event-seq "")) - ((and (vectorp event-seq) + ((and (vectorp event-seq) (viper-char-array-p (setq temp (mapcar 'viper-key-to-character event-seq)))) (mapconcat 'char-to-string temp "")) @@ -1201,8 +1201,8 @@ ) events "")) - - + + (defun viper-read-char-exclusive () (let (char (echo-keystrokes 1)) @@ -1230,13 +1230,13 @@ (= 1 (length (symbol-name (nth 1 key))))) (read (format "?\\C-%s" (symbol-name (nth 1 key))))) (t key))) - - + + (defun viper-setup-master-buffer (&rest other-files-or-buffers) "Set up the current buffer as a master buffer. Arguments become related buffers. This function should normally be used in the `Local variables' section of a file." - (setq viper-related-files-and-buffers-ring + (setq viper-related-files-and-buffers-ring (make-ring (1+ (length other-files-or-buffers)))) (mapcar '(lambda (elt) (viper-ring-insert viper-related-files-and-buffers-ring elt)) @@ -1277,7 +1277,7 @@ Usually contains ` ', linefeed, TAB or formfeed.") ;; Set Viper syntax classes and related variables according to -;; `viper-syntax-preference'. +;; `viper-syntax-preference'. (defun viper-update-syntax-classes (&optional set-default) (let ((preference (cond ((eq viper-syntax-preference 'emacs) "w") ; Viper words have only Emacs word chars @@ -1338,7 +1338,7 @@ This is most appropriate for major modes intended for editing programs. `emacs' means Viper words are the same as Emacs words as specified by Emacs syntax tables. This option is appropriate if you like Emacs-style words." - :type '(radio (const strict-vi) (const reformed-vi) + :type '(radio (const strict-vi) (const reformed-vi) (const extended) (const emacs)) :set 'viper-set-syntax-preference :group 'viper) @@ -1382,7 +1382,7 @@ This option is appropriate if you like Emacs-style words." (defun viper-skip-alpha-forward (&optional addl-chars) (or (stringp addl-chars) (setq addl-chars "")) (viper-skip-syntax - 'forward + 'forward (cond ((eq viper-syntax-preference 'strict-vi) "") (t viper-ALPHA-char-class)) @@ -1393,7 +1393,7 @@ This option is appropriate if you like Emacs-style words." (defun viper-skip-alpha-backward (&optional addl-chars) (or (stringp addl-chars) (setq addl-chars "")) (viper-skip-syntax - 'backward + 'backward (cond ((eq viper-syntax-preference 'strict-vi) "") (t viper-ALPHA-char-class)) @@ -1404,7 +1404,7 @@ This option is appropriate if you like Emacs-style words." ;; weird syntax tables may confuse strict-vi style (defsubst viper-skip-all-separators-forward (&optional within-line) (if (eq viper-syntax-preference 'strict-vi) - (if within-line + (if within-line (skip-chars-forward viper-strict-SEP-chars-sans-newline) (skip-chars-forward viper-strict-SEP-chars)) (viper-skip-syntax 'forward @@ -1413,7 +1413,7 @@ This option is appropriate if you like Emacs-style words." (if within-line (viper-line-pos 'end))))) (defsubst viper-skip-all-separators-backward (&optional within-line) (if (eq viper-syntax-preference 'strict-vi) - (if within-line + (if within-line (skip-chars-backward viper-strict-SEP-chars-sans-newline) (skip-chars-backward viper-strict-SEP-chars)) (viper-skip-syntax 'backward @@ -1437,7 +1437,7 @@ This option is appropriate if you like Emacs-style words." 'forward (concat "^" viper-ALPHA-char-class viper-SEP-char-class) ;; Emacs may consider some of these as words, but we don't want them - viper-non-word-characters + viper-non-word-characters (viper-line-pos 'end)))) (defun viper-skip-nonalphasep-backward () (if (eq viper-syntax-preference 'strict-vi) @@ -1475,8 +1475,8 @@ This option is appropriate if you like Emacs-style words." (t nil))) (if (memq ?^ syntax) (setq negated-syntax t)) - (while (and (not (= local 0)) - (cond ((eq direction 'forward) + (while (and (not (= local 0)) + (cond ((eq direction 'forward) (not (eobp))) (t (not (bobp))))) (setq char-looked-at (viper-char-at-pos direction) @@ -1507,11 +1507,11 @@ This option is appropriate if you like Emacs-style words." (setq total (+ total local))) total )) - - + + (provide 'viper-util) - + ;;; Local Variables: ;;; eval: (put 'viper-deflocalvar 'lisp-indent-hook 'defun) diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index 50b5d82dff0..f5837192ce1 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -103,7 +103,7 @@ ;; ----------------- ;; Bug reports and ideas contributed by many users have helped ;; improve Viper and the various versions of VIP. -;; See the on-line manual for a complete list of contributors. +;; See the on-line manual for a complete list of contributors. ;; ;; ;;; Notes: @@ -112,24 +112,24 @@ ;; In most cases, Viper handles major modes correctly, i.e., they come up ;; in the right state (either vi-state or emacs-state). For instance, text ;; files come up in vi-state, while, say, Dired appears in emacs-state by -;; default. +;; default. ;; However, some modes do not appear in the right mode in the beginning, ;; usually because they neglect to follow Emacs conventions (e.g., they don't ;; use kill-all-local-variables when they start). Some major modes ;; may fail to come up in emacs-state if they call hooks, such as -;; text-hook, for no good reason. -;; +;; text-hook, for no good reason. +;; ;; As an immediate solution, you can hit C-z to bring about the right mode. ;; An interim solution is to add an appropriate hook to the mode like this: -;; +;; ;; (add-hook 'your-favorite-mode 'viper-mode) -;; or +;; or ;; (add-hook 'your-favorite-mode 'viper-change-state-to-emacs) -;; +;; ;; whichever applies. The right thing to do, however, is to complain to the ;; author of the respective package. (Sometimes they also neglect to equip ;; their modes with hooks, which is one more reason for complaining.) -;; +;; ;; 2. Keymap handling ;; Each Viper state (insert, vi, replace) is implemented as a collection of ;; several minor modes, each with its own keymap. @@ -220,17 +220,17 @@ ;; viper-insert-global-user-minor-mode can be set with the define-key command. ;; ;; The next minor mode, viper-insert-kbd-minor-mode, -;; is used for keyboard VI-style macros defined with :map!. +;; is used for keyboard VI-style macros defined with :map!. ;; ;; The fifth minor mode, viper-insert-state-modifier-minor-mode, is like ;; viper-vi-state-modifier-minor-mode, except that it is used in the Insert -;; state; it can be used to modify keys in a mode-specific fashion. +;; state; it can be used to modify keys in a mode-specific fashion. ;; ;; The minor mode viper-insert-diehard-minor-mode is in effect when ;; the user wants a high degree of Vi compatibility (a bad idea, really!). ;; The last minor mode, viper-insert-basic-minor-mode, is always in effect ;; when Viper is in insert state. It binds a small number of keys needed for -;; Viper's operation. +;; Viper's operation. ;; ;; Finally, Viper provides minor modes for overriding bindings set by Emacs ;; modes when Viper is in Emacs state: @@ -261,14 +261,14 @@ ;; used in conjunction with the minor modes for insert-state, and its ;; keymap overshadows the keymaps for insert minor modes. ;; -;; 4. Defining buffer-local bindings in Vi and Insert modes. +;; 4. Defining buffer-local bindings in Vi and Insert modes. ;; As mentioned before, sometimes, it is convenient to have ;; buffer-specific of mode-specific key bindings in Vi and insert modes. ;; Viper provides a special function, viper-add-local-keys, to do precisely ;; this. For instance, is you need to add couple of mode-specific bindings -;; to Insert mode, you can put +;; to Insert mode, you can put ;; -;; (viper-add-local-keys 'insert-state '((key1 . func1) (key2 .func2))) +;; (viper-add-local-keys 'insert-state '((key1 . func1) (key2 .func2))) ;; ;; somewhere in a hook of this major mode. If you put something like this ;; in your own elisp function, this will define bindings specific to the @@ -353,7 +353,7 @@ user decide when to invoke Viper in a major mode." ;; Non-viper variables that need to be saved in case the user decides to ;; de-viperize emacs. (defvar viper-saved-non-viper-variables nil) - + (defcustom viper-mode (cond (noninteractive nil) (t 'ask)) "To Viperize or not to Viperize. @@ -371,18 +371,18 @@ widget." '(fundamental-mode makefile-mode help-mode - + awk-mode m4-mode xrdb-mode winmgr-mode autoconf-mode cvs-edit-mode - + html-mode html-helper-mode emacs-lisp-mode lisp-mode lisp-interaction-mode - - jde-mode java-mode + + jde-mode java-mode cc-mode c-mode c++-mode objc-mode fortran-mode f90-mode basic-mode @@ -395,19 +395,19 @@ widget." text-mode indented-text-mode tex-mode latex-mode bibtex-mode ps-mode - + completion-list-mode diff-mode idl-mode - + perl-mode cperl-mode javascript-mode tcl-mode python-mode - + sh-mode ksh-mode csh-mode - + gnus-article-mode mh-show-mode ) @@ -430,11 +430,11 @@ widget." mail-mode gnus-group-mode gnus-summary-mode - + Info-mode Buffer-menu-mode compilation-mode - + view-mode vm-mode vm-summary-mode) @@ -531,7 +531,7 @@ If Viper is enabled, turn it off. Otherwise, turn it on." (setq viper-mode t) (load-library "viper")) - (if viper-first-time ; Important check. Prevents mix-up of startup + (if viper-first-time ; Important check. Prevents mix-up of startup (progn ; and expert-level msgs when viper-mode recurses (setq viper-first-time nil) (setq viper-vi-state-cursor-color @@ -553,27 +553,27 @@ and improving upon much of it. 1. Viper supports Vi at several levels. Level 1 is the closest to Vi, level 5 provides the most flexibility to depart from many Vi conventions. - + You will be asked to specify your user level in a following screen. - + If you select user level 1 then the keys ^X, ^C, ^Z, and ^G will behave as in VI, to smooth transition to Viper for the beginners. However, to - use Emacs productively, you are advised to reach user level 3 or higher. - + use Emacs productively, you are advised to reach user level 3 or higher. + At user level 2 or higher, ^X and ^C have Emacs, not Vi, bindings; ^Z toggles Vi/Emacs states; ^G is Emacs' keyboard-quit (like ^C in Vi). - + 2. Vi exit functions (e.g., :wq, ZZ) work on INDIVIDUAL files -- they do not cause Emacs to quit, except at user level 1 (for a novice). 3. ^X^C EXITS EMACS. 4. Viper supports multiple undo: `u' will undo. Typing `.' will repeat undo. Another `u' changes direction. - + 6. Emacs Meta key is `C-\\' (in all modes) or `\\ ESC' (in Vi command mode). On a window system, the best way is to use the Meta-key on your keyboard. 7. Try \\[keyboard-quit] and \\[abort-recursive-edit] repeatedly,if - something funny happens. This would abort the current editing command. - + something funny happens. This would abort the current editing command. + For more information on Viper: a. Type `:help' in Vi command mode @@ -584,7 +584,7 @@ To submit a bug report or to contact the author, type :submitReport in Vi command mode. To shoo Viper away and return to pure Emacs (horror!), type: M-x viper-go-away - + This startup message appears whenever you load Viper, unless you type `y' now." )) (goto-char (point-min)) @@ -608,7 +608,7 @@ This startup message appears whenever you load Viper, unless you type `y' now." (or (memq major-mode viper-emacs-state-mode-list) ; don't switch to Vi (memq major-mode viper-insert-state-mode-list) ; don't switch (viper-change-state-to-vi))))) - + ;; Apply a little heuristic to invoke vi state on major-modes ;; that are not listed in viper-vi-state-mode-list @@ -661,13 +661,13 @@ remains buffer-local." ;; restore non-viper vars (setq-default next-line-add-newlines - (viper-standard-value - 'next-line-add-newlines viper-saved-non-viper-variables) + (viper-standard-value + 'next-line-add-newlines viper-saved-non-viper-variables) require-final-newline - (viper-standard-value - 'require-final-newline viper-saved-non-viper-variables) + (viper-standard-value + 'require-final-newline viper-saved-non-viper-variables) scroll-step - (viper-standard-value 'scroll-step viper-saved-non-viper-variables) + (viper-standard-value 'scroll-step viper-saved-non-viper-variables) mode-line-buffer-identification (viper-standard-value 'mode-line-buffer-identification viper-saved-non-viper-variables) @@ -680,12 +680,12 @@ remains buffer-local." (viper-standard-value 'mark-even-if-inactive viper-saved-non-viper-variables))) - ;; Ideally, we would like to be able to de-localize local variables + ;; Ideally, we would like to be able to de-localize local variables (viper-delocalize-var 'minor-mode-map-alist) (viper-delocalize-var 'require-final-newline) (if viper-xemacs-p (viper-delocalize-var 'bar-cursor)) - + ;; deactivate all advices done by Viper. (ad-deactivate-regexp "viper-") @@ -695,23 +695,23 @@ remains buffer-local." (viper-delocalize-var 'viper-insert-minibuffer-minor-mode) (viper-delocalize-var 'viper-vi-intercept-minor-mode) (viper-delocalize-var 'viper-insert-intercept-minor-mode) - + (viper-delocalize-var 'viper-vi-local-user-minor-mode) (viper-delocalize-var 'viper-vi-kbd-minor-mode) (viper-delocalize-var 'viper-vi-global-user-minor-mode) (viper-delocalize-var 'viper-vi-state-modifier-minor-mode) (viper-delocalize-var 'viper-vi-diehard-minor-mode) (viper-delocalize-var 'viper-vi-basic-minor-mode) - + (viper-delocalize-var 'viper-replace-minor-mode) - + (viper-delocalize-var 'viper-insert-local-user-minor-mode) (viper-delocalize-var 'viper-insert-kbd-minor-mode) (viper-delocalize-var 'viper-insert-global-user-minor-mode) (viper-delocalize-var 'viper-insert-state-modifier-minor-mode) (viper-delocalize-var 'viper-insert-diehard-minor-mode) (viper-delocalize-var 'viper-insert-basic-minor-mode) - + (viper-delocalize-var 'viper-emacs-intercept-minor-mode) (viper-delocalize-var 'viper-emacs-local-user-minor-mode) (viper-delocalize-var 'viper-emacs-kbd-minor-mode) @@ -725,16 +725,16 @@ remains buffer-local." viper-insert-minibuffer-minor-mode nil viper-vi-intercept-minor-mode nil viper-insert-intercept-minor-mode nil - + viper-vi-local-user-minor-mode nil viper-vi-kbd-minor-mode nil viper-vi-global-user-minor-mode nil viper-vi-state-modifier-minor-mode nil viper-vi-diehard-minor-mode nil viper-vi-basic-minor-mode nil - + viper-replace-minor-mode nil - + viper-insert-local-user-minor-mode nil viper-insert-kbd-minor-mode nil viper-insert-global-user-minor-mode nil @@ -804,7 +804,7 @@ remains buffer-local." (defun viper-major-mode-change-sentinel () (save-match-data (or (string-match "\*Minibuf-" (buffer-name)) - (setq viper-new-major-mode-buffer-list + (setq viper-new-major-mode-buffer-list (cons (current-buffer) viper-new-major-mode-buffer-list)))) ;; change the global value of hook (add-hook 'viper-post-command-hooks 'set-viper-state-in-major-mode t)) @@ -821,14 +821,14 @@ remains buffer-local." ;; back to fundamental-mode. (if (eq default-major-mode 'fundamental-mode) (setq default-major-mode 'viper-mode)) - + (add-hook 'change-major-mode-hook 'viper-major-mode-change-sentinel) (add-hook 'find-file-hooks 'set-viper-state-in-major-mode) ;; keep this because many modes we don't know about use this hook (defvar text-mode-hook) (add-hook 'text-mode-hook 'viper-mode) - + (defvar emerge-startup-hook) (add-hook 'emerge-startup-hook 'viper-change-state-to-emacs) @@ -855,7 +855,7 @@ remains buffer-local." '(defadvice vc-diff (after viper-vc-ad activate) "Force Vi state in VC diff buffer." (viper-change-state-to-vi)))) - + (eval-after-load "emerge" '(defadvice emerge-quit (after viper-emerge-advice activate) @@ -865,7 +865,7 @@ remains buffer-local." (defadvice emerge-quit (after viper-emerge-advice activate) "Run `viper-change-state-to-vi' after quitting emerge." (viper-change-state-to-vi)) - + ;; passwd.el sets up its own buffer, which turns up in Vi mode, ;; thus overriding the local map. We don't need Vi mode here. (eval-after-load @@ -873,7 +873,7 @@ remains buffer-local." '(defadvice read-passwd-1 (before viper-passwd-ad activate) "Switch to emacs state while reading password." (viper-change-state-to-emacs))) - + ;; Emacs shell, ange-ftp, and comint-based modes (add-hook 'comint-mode-hook 'viper-comint-mode-hook) ; comint @@ -887,7 +887,7 @@ remains buffer-local." ;; Modify major modes according to viper-major-mode-modifier-list (viper-apply-major-mode-modifiers) - + ;; For RMAIL users. ;; Put buf in Emacs state after edit. (eval-after-load @@ -909,7 +909,7 @@ remains buffer-local." "Set viper-automatic-iso-accents to iso-accents-mode." (let ((arg (ad-get-arg 0))) ad-do-it - (setq viper-automatic-iso-accents + (setq viper-automatic-iso-accents (if (eq viper-current-state 'vi-state) (if arg ;; if iso-accents-mode was called with positive arg, turn @@ -954,7 +954,7 @@ remains buffer-local." (if (and viper-special-input-method (eq viper-current-state 'vi-state)) (viper-inactivate-input-method) ad-do-it))) - + ) ; viper-set-hooks @@ -968,22 +968,22 @@ remains buffer-local." ;; different keymaps for different buffers. Also, the keymaps associated ;; with viper-vi/insert-state-modifier-minor-mode can be different. (make-variable-buffer-local 'minor-mode-map-alist) - + ;; Viper changes the default mode-line-buffer-identification (setq-default mode-line-buffer-identification '(" %b")) - + ;; setup emacs-supported vi-style feel (setq next-line-add-newlines nil require-final-newline t) - + (make-variable-buffer-local 'require-final-newline) - + ;; don't bark when mark is inactive (if viper-emacs-p (setq mark-even-if-inactive t)) - + (setq scroll-step 1) - + ;; Variable displaying the current Viper state in the mode line. (viper-deflocalvar viper-mode-string viper-emacs-state-id) (or (memq 'viper-mode-string global-mode-string) @@ -993,13 +993,13 @@ remains buffer-local." (defadvice describe-key (before viper-read-keyseq-ad protect activate) "Force to read key via `viper-read-key-sequence'." (interactive (list (viper-read-key-sequence "Describe key: ")))) - + (defadvice describe-key-briefly (before viper-read-keyseq-ad protect activate) "Force to read key via `viper-read-key-sequence'." (interactive (list (viper-read-key-sequence "Describe key briefly: ")))) - - + + (defadvice find-file (before viper-add-suffix-advice activate) "Use `read-file-name' for reading arguments." (interactive (cons (read-file-name "Find file: " nil default-directory) @@ -1012,7 +1012,7 @@ remains buffer-local." ((and viper-emacs-p (boundp 'find-file-wildcards)) (list find-file-wildcards)))) )) - + (defadvice find-file-other-window (before viper-add-suffix-advice activate) "Use `read-file-name' for reading arguments." (interactive (cons (read-file-name "Find file in other window: " @@ -1026,7 +1026,7 @@ remains buffer-local." ((and viper-emacs-p (boundp 'find-file-wildcards)) (list find-file-wildcards)))) )) - + (defadvice find-file-other-frame (before viper-add-suffix-advice activate) "Use `read-file-name' for reading arguments." @@ -1042,14 +1042,14 @@ remains buffer-local." (list find-file-wildcards)))) )) - + (defadvice read-file-name (around viper-suffix-advice activate) "Tell `exit-minibuffer' to run `viper-file-add-suffix' as a hook." (let ((viper-minibuffer-exit-hook (append viper-minibuffer-exit-hook '(viper-minibuffer-trim-tail viper-file-add-suffix)))) ad-do-it)) - + (defadvice start-kbd-macro (after viper-kbd-advice activate) "Remove Viper's intercepting bindings for C-x ). This may be needed if the previous `:map' command terminated abnormally." @@ -1063,7 +1063,7 @@ remains buffer-local." (add-hook 'mouse-leave-frame-hook 'viper-remember-current-frame) (defadvice handle-switch-frame (before viper-frame-advice activate) - "Remember the selected frame before the switch-frame event." + "Remember the selected frame before the switch-frame event." (viper-remember-current-frame (selected-frame)))) ) ) ; end viper-non-hook-settings @@ -1081,7 +1081,7 @@ Viper is a Package for Emacs Rebels and a venomous VI PERil, It's time to decide: to Viperize or not to Viperize... -If you wish to Viperize AND make this your way of life, please put +If you wish to Viperize AND make this your way of life, please put (setq viper-mode t) (require 'viper) @@ -1102,7 +1102,7 @@ These two lines must come in the order given. ((eq viper-mode t)) ;; Otherwise, it was asking Viper was not loaded through .emacs ;; In this case, it was either through M-x viper-mode or via something - ;; else, like the custom widget. If Viper was loaded through + ;; else, like the custom widget. If Viper was loaded through ;; M-x viper-mode, then viper will kick in anyway. (t (setq viper-mode nil))) @@ -1129,10 +1129,10 @@ These two lines must come in the order given. (if viper-emacs-p (cons 'mark-even-if-inactive (list mark-even-if-inactive))) ))) - - + + ;; Set some useful macros, advices -;; These must be BEFORE ~/.viper is loaded, +;; These must be BEFORE ~/.viper is loaded, ;; so the user can unrecord them in ~/.viper. (if viper-mode (progn @@ -1147,42 +1147,42 @@ These two lines must come in the order given. (viper-record-kbd-macro (vector viper-repeat-from-history-key '\2) 'vi-state [(meta x) v i p e r - r e p e a t - f r o m - h i s t o r y return] 't) - - ;; set macros for toggling case sensitivity and regexp search + + ;; set macros for toggling case sensitivity and regexp search (viper-set-searchstyle-toggling-macros nil) ;; Make %%% toggle parsing comments for matching parentheses (viper-set-parsing-style-toggling-macro nil) ;; ~/.viper is loaded if exists (viper-load-custom-file) - + ;; should be after loading custom file to avoid the pesky msg that ;; mouse-search/insert keys are already bound (viper-bind-mouse-search-key) (viper-bind-mouse-insert-key) )) - + ;; Applying Viper customization -- runs after (load .viper) ;; Save user settings or Viper defaults for vars controlled by -;; viper-expert-level +;; viper-expert-level (if (null viper-saved-user-settings) - (setq viper-saved-user-settings + (setq viper-saved-user-settings (list (cons 'viper-want-ctl-h-help (list viper-want-ctl-h-help)) (cons 'viper-always (list viper-always)) (cons 'viper-no-multiple-ESC (list viper-no-multiple-ESC)) (cons 'viper-ex-style-motion (list viper-ex-style-motion)) (cons 'viper-ex-style-editing (list viper-ex-style-editing)) - (cons 'viper-want-emacs-keys-in-vi + (cons 'viper-want-emacs-keys-in-vi (list viper-want-emacs-keys-in-vi)) (cons 'viper-electric-mode (list viper-electric-mode)) (cons 'viper-want-emacs-keys-in-insert (list viper-want-emacs-keys-in-insert)) (cons 'viper-re-search (list viper-re-search))))) - + (if viper-mode (progn @@ -1191,7 +1191,7 @@ These two lines must come in the order given. (viper-buffer-search-enable)) (viper-update-syntax-classes 'set-default) )) - + ;;; Familiarize Viper with some minor modes that have their own keymaps (if viper-mode @@ -1228,11 +1228,11 @@ These two lines must come in the order given. (define-key viper-vi-intercept-map viper-toggle-key 'viper-toggle-key-action) (define-key viper-emacs-intercept-map viper-toggle-key 'viper-change-state-to-vi) - + ;;; Escape from Emacs and Insert modes to Vi for one command -(define-key +(define-key viper-emacs-intercept-map "\C-c\\" 'viper-escape-to-vi) -(define-key +(define-key viper-insert-intercept-map "\C-c\\" 'viper-escape-to-vi) (if viper-mode @@ -1250,10 +1250,10 @@ These two lines must come in the order given. (if (and viper-mode - (or viper-always + (or viper-always (and (< viper-expert-level 5) (> viper-expert-level 0)))) (viper-set-hooks)) - + ;; Let all minor modes take effect after loading. ;; This may not be enough, so we also set default minor-mode-alist. ;; Without setting the default, new buffers that come up in emacs mode have diff --git a/lisp/emulation/ws-mode.el b/lisp/emulation/ws-mode.el index 5441af33044..330506b1029 100644 --- a/lisp/emulation/ws-mode.el +++ b/lisp/emulation/ws-mode.el @@ -42,7 +42,7 @@ (setq wordstar-C-k-map (make-keymap)) (setq wordstar-C-o-map (make-keymap)) (setq wordstar-C-q-map (make-keymap)) - + (define-key wordstar-mode-map "\C-a" 'backward-word) (define-key wordstar-mode-map "\C-b" 'fill-paragraph) (define-key wordstar-mode-map "\C-c" 'scroll-up) @@ -68,9 +68,9 @@ (define-key wordstar-mode-map "\C-x" 'next-line) (define-key wordstar-mode-map "\C-y" 'kill-complete-line) (define-key wordstar-mode-map "\C-z" 'scroll-up-line) - + ;; wordstar-C-k-map - + (define-key wordstar-C-k-map " " ()) (define-key wordstar-C-k-map "0" 'ws-set-marker-0) (define-key wordstar-C-k-map "1" 'ws-set-marker-1) @@ -116,11 +116,11 @@ (define-key wordstar-C-k-map "\C-x" 'save-buffers-kill-emacs) (define-key wordstar-C-k-map "y" 'ws-delete-block) (define-key wordstar-C-k-map "\C-y" 'ws-delete-block) - + ;; wordstar-C-j-map not yet implemented - + ;; wordstar-C-o-map - + (define-key wordstar-C-o-map " " ()) (define-key wordstar-C-o-map "c" 'wordstar-center-line) (define-key wordstar-C-o-map "\C-c" 'wordstar-center-line) @@ -141,7 +141,7 @@ (define-key wordstar-C-o-map "wh" 'split-window-horizontally) (define-key wordstar-C-o-map "wo" 'other-window) (define-key wordstar-C-o-map "wv" 'split-window-vertically) - + ;; wordstar-C-q-map (define-key wordstar-C-q-map " " ()) (define-key wordstar-C-q-map "0" 'ws-find-marker-0) @@ -336,8 +336,8 @@ the distance between the end of the text and `fill-column'." (delete-horizontal-space) (setq line-length (current-column)) (beginning-of-line) - (indent-to - (+ left-margin + (indent-to + (+ left-margin (/ (- fill-column left-margin line-length) 2)))))) (defun scroll-down-line () @@ -368,13 +368,13 @@ the distance between the end of the text and `fill-column'." (defvar ws-block-end-marker nil "End of \"Block\" in WordStar mode.") (defvar ws-search-string nil "String of last search in WordStar mode.") -(defvar ws-search-direction t +(defvar ws-search-direction t "Direction of last search in WordStar mode. t if forward, nil if backward.") -(defvar ws-last-cursorposition nil +(defvar ws-last-cursorposition nil "Position before last search etc. in WordStar mode.") -(defvar ws-last-errormessage nil +(defvar ws-last-errormessage nil "Last error message issued by a WordStar mode function.") ;;;;;;;;;;; @@ -510,7 +510,7 @@ in ws-last-errormessage for recovery with C-q w." "In WordStar mode: Move block to current cursor position." (interactive) (if (and ws-block-begin-marker ws-block-end-marker) - (let () + (let () (kill-region ws-block-begin-marker ws-block-end-marker) (yank) (save-excursion @@ -702,7 +702,7 @@ This will only work for errors raised by WordStar mode functions." (kill-region p (point)))) (defun ws-kill-bol () - "In WordStar mode: Kill to beginning of line + "In WordStar mode: Kill to beginning of line \(like WordStar, not like Emacs)." (interactive) (let ((p (point))) @@ -730,7 +730,7 @@ This will only work for errors raised by WordStar mode functions." (defun ws-query-replace (from to) "In WordStar mode: Search string, remember string for repetition." - (interactive "sReplace: + (interactive "sReplace: sWith: " ) (setq ws-search-string from) (setq ws-search-direction t) diff --git a/lisp/gnus/ChangeLog.1 b/lisp/gnus/ChangeLog.1 index 14da1026005..ea351cef9f0 100644 --- a/lisp/gnus/ChangeLog.1 +++ b/lisp/gnus/ChangeLog.1 @@ -2882,7 +2882,7 @@ * gnus-art.el (gnus-summary-save-in-rmail): Return the name of the file. -1997-11-26 Alastair Burt <alastair.burt@dfki.de> +1997-11-26 Alastair Burt <alastair.burt@dfki.de> * smiley.el: Balloon help, etc. diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 5a3cf2f480c..77e3043f823 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -393,10 +393,10 @@ be a select method." (save-restriction (message-narrow-to-headers) (let* ((gcc (mail-fetch-field "gcc" nil t)) - (methods (and gcc + (methods (and gcc (mapcar 'gnus-inews-group-method (message-unquote-tokens - (message-tokenize-header + (message-tokenize-header gcc " ,"))))) covered) (while (and (not covered) methods) @@ -513,7 +513,7 @@ be a select method." (when (or (and gnus-agent-synchronize-flags (not (eq gnus-agent-synchronize-flags 'ask))) (and (eq gnus-agent-synchronize-flags 'ask) - (gnus-y-or-n-p (format "Synchronize flags on server `%s'? " + (gnus-y-or-n-p (format "Synchronize flags on server `%s'? " (cadr method))))) (gnus-agent-synchronize-flags-server method))) @@ -702,7 +702,7 @@ the actual number of articles toggled is returned." (gnus-make-directory (file-name-directory file)) (with-temp-file file ;; Emacs got problem to match non-ASCII group in multibyte buffer. - (mm-disable-multibyte) + (mm-disable-multibyte) (when (file-exists-p file) (nnheader-insert-file-contents file)) (goto-char (point-min)) @@ -730,7 +730,7 @@ the actual number of articles toggled is returned." (nnheader-translate-file-chars (nnheader-replace-chars-in-string (nnheader-replace-duplicate-chars-in-string - (nnheader-replace-chars-in-string + (nnheader-replace-chars-in-string (gnus-group-real-name group) ?/ ?_) ?. ?_) @@ -847,8 +847,8 @@ the actual number of articles toggled is returned." (with-temp-buffer (let (article) (while (setq article (pop articles)) - (when (or - (gnus-backlog-request-article group article + (when (or + (gnus-backlog-request-article group article nntp-server-buffer) (gnus-request-article article group)) (goto-char (point-max)) @@ -1103,11 +1103,11 @@ the actual number of articles toggled is returned." (while (setq group (pop groups)) (when (<= (gnus-group-level group) gnus-agent-handle-level) (gnus-agent-fetch-group-1 group gnus-command-method)))))) - (error + (error (unless (funcall gnus-agent-confirmation-function (format "Error (%s). Continue? " err)) (error "Cannot fetch articles into the Gnus agent"))) - (quit + (quit (unless (funcall gnus-agent-confirmation-function (format "Quit (%s). Continue? " err)) (signal 'quit "Cannot fetch articles into the Gnus agent.")))) @@ -1138,7 +1138,7 @@ the actual number of articles toggled is returned." (setq gnus-newsgroup-dependencies (make-vector (length articles) 0)) (setq gnus-newsgroup-headers - (gnus-get-newsgroup-headers-xover articles nil nil + (gnus-get-newsgroup-headers-xover articles nil nil group)) ;; `gnus-agent-overview-buffer' may be killed for ;; timeout reason. If so, recreate it. @@ -1532,7 +1532,7 @@ The following commands are available: (when (file-exists-p (gnus-agent-lib-file "active")) (with-temp-buffer (nnheader-insert-file-contents (gnus-agent-lib-file "active")) - (gnus-active-to-gnus-format + (gnus-active-to-gnus-format gnus-command-method (setq orig (gnus-make-hashtable (count-lines (point-min) (point-max)))))) @@ -1598,7 +1598,7 @@ The following commands are available: (or (not (numberp (setq art (read (current-buffer))))) (< art article))) - (if (and (numberp art) + (if (and (numberp art) (file-exists-p (gnus-agent-article-name (number-to-string art) group))) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 6e5971ac730..806d8793652 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -230,7 +230,7 @@ asynchronously. The compressed face will be piped to this command." (defcustom gnus-article-banner-alist nil "Banner alist for stripping. -For example, +For example, ((egroups . \"^[ \\t\\n]*-------------------+\\\\( eGroups Sponsor -+\\\\)?....\\n\\\\(.+\\n\\\\)+\"))" :version "21.1" :type '(repeat (cons symbol regexp)) @@ -658,17 +658,17 @@ be added below it (otherwise)." (defcustom gnus-article-mime-match-handle-function 'undisplayed-alternative "Function called with a MIME handle as the argument. This is meant for people who want to view first matched part. -For `undisplayed-alternative' (default), the first undisplayed -part or alternative part is used. For `undisplayed', the first -undisplayed part is used. For a function, the first part which +For `undisplayed-alternative' (default), the first undisplayed +part or alternative part is used. For `undisplayed', the first +undisplayed part is used. For a function, the first part which the function return `t' is used. For `nil', the first part is used." :version "21.1" :group 'gnus-article-mime - :type '(choice + :type '(choice (item :tag "first" :value nil) (item :tag "undisplayed" :value undisplayed) - (item :tag "undisplayed or alternative" + (item :tag "undisplayed or alternative" :value undisplayed-alternative) (function))) @@ -737,7 +737,7 @@ See the manual for details." :type gnus-article-treat-head-custom) (put 'gnus-treat-buttonize-head 'highlight t) -(defcustom gnus-treat-emphasize +(defcustom gnus-treat-emphasize (and (or window-system (featurep 'xemacs) (>= (string-to-number emacs-version) 21)) @@ -925,7 +925,7 @@ See the manual for details." :type gnus-article-treat-custom) (put 'gnus-treat-overstrike 'highlight t) -(defcustom gnus-treat-display-xface +(defcustom gnus-treat-display-xface (and (or (and (fboundp 'image-type-available-p) (image-type-available-p 'xbm) (string-match "^0x" (shell-command-to-string "uncompface"))) @@ -939,7 +939,7 @@ See the manual for details." :type gnus-article-treat-head-custom) (put 'gnus-treat-display-xface 'highlight t) -(defcustom gnus-treat-display-smileys +(defcustom gnus-treat-display-smileys (if (or (and (featurep 'xemacs) (featurep 'xpm)) (and (fboundp 'image-type-available-p) @@ -1512,7 +1512,7 @@ MAP is an alist where the elements are on the form (\"from\" \"to\")." (let ((inhibit-point-motion-hooks t) buffer-read-only (mail-parse-charset gnus-newsgroup-charset) - (mail-parse-ignored-charsets + (mail-parse-ignored-charsets (save-excursion (set-buffer gnus-summary-buffer) gnus-newsgroup-ignored-charsets))) (mail-decode-encoded-word-region (point-min) (point-max))))) @@ -1524,7 +1524,7 @@ If PROMPT (the prefix), prompt for a coding system to use." (let ((inhibit-point-motion-hooks t) (case-fold-search t) buffer-read-only (mail-parse-charset gnus-newsgroup-charset) - (mail-parse-ignored-charsets + (mail-parse-ignored-charsets (save-excursion (condition-case nil (set-buffer gnus-summary-buffer) (error)) @@ -1545,7 +1545,7 @@ If PROMPT (the prefix), prompt for a coding system to use." format (and ctl (mail-content-type-get ctl 'format))) (when cte (setq cte (mail-header-strip cte))) - (if (and ctl (not (string-match "/" (car ctl)))) + (if (and ctl (not (string-match "/" (car ctl)))) (setq ctl nil)) (goto-char (point-max))) (forward-line 1) @@ -1567,7 +1567,7 @@ If PROMPT (the prefix), prompt for a coding system to use." "Remove encoded-word encoding from headers." (let ((inhibit-point-motion-hooks t) (mail-parse-charset gnus-newsgroup-charset) - (mail-parse-ignored-charsets + (mail-parse-ignored-charsets (save-excursion (condition-case nil (set-buffer gnus-summary-buffer) (error)) @@ -1589,14 +1589,14 @@ or not." (setq type (gnus-fetch-field "content-transfer-encoding")) (let* ((ct (gnus-fetch-field "content-type")) - (ctl (and ct + (ctl (and ct (ignore-errors (mail-header-parse-content-type ct))))) (setq charset (and ctl (mail-content-type-get ctl 'charset))) (if (stringp charset) (setq charset (intern (downcase charset))))))) - (unless charset + (unless charset (setq charset gnus-newsgroup-charset)) (when (or force (and type (let ((case-fold-search t)) @@ -1616,14 +1616,14 @@ If FORCE, decode the article whether it is marked as base64 not." (setq type (gnus-fetch-field "content-transfer-encoding")) (let* ((ct (gnus-fetch-field "content-type")) - (ctl (and ct + (ctl (and ct (ignore-errors (mail-header-parse-content-type ct))))) (setq charset (and ctl (mail-content-type-get ctl 'charset))) (if (stringp charset) (setq charset (intern (downcase charset))))))) - (unless charset + (unless charset (setq charset gnus-newsgroup-charset)) (when (or force (and type (let ((case-fold-search t)) @@ -1655,14 +1655,14 @@ If FORCE, decode the article whether it is marked as base64 not." (if (gnus-buffer-live-p gnus-original-article-buffer) (with-current-buffer gnus-original-article-buffer (let* ((ct (gnus-fetch-field "content-type")) - (ctl (and ct + (ctl (and ct (ignore-errors (mail-header-parse-content-type ct))))) (setq charset (and ctl (mail-content-type-get ctl 'charset))) (if (stringp charset) (setq charset (intern (downcase charset))))))) - (unless charset + (unless charset (setq charset gnus-newsgroup-charset)) (article-goto-body) (save-window-excursion @@ -1690,7 +1690,7 @@ The `gnus-list-identifiers' variable specifies what to do." (when regexp (goto-char (point-min)) (when (re-search-forward - (concat "^Subject: +\\(\\(\\(Re: +\\)?\\(" regexp + (concat "^Subject: +\\(\\(\\(Re: +\\)?\\(" regexp " *\\)\\)+\\(Re: +\\)?\\)") nil t) (let ((s (or (match-string 3) (match-string 5)))) @@ -2003,9 +2003,9 @@ means show, 0 means toggle." Originally it is hide instead of DUMMY." (let ((buffer-read-only nil) (inhibit-point-motion-hooks t)) - (gnus-remove-text-properties-when + (gnus-remove-text-properties-when 'article-type type - (point-min) (point-max) + (point-min) (point-max) (cons 'article-type (cons type gnus-hidden-properties))))) @@ -2093,7 +2093,7 @@ should replace the \"Date:\" one, or should be added below it." ((eq type 'local) (let ((tz (car (current-time-zone time)))) (format "Date: %s %s%02d%02d" (current-time-string time) - (if (> tz 0) "+" "-") (/ (abs tz) 3600) + (if (> tz 0) "+" "-") (/ (abs tz) 3600) (/ (% (abs tz) 3600) 60)))) ;; Convert to Universal Time. ((eq type 'ut) @@ -2126,7 +2126,7 @@ should replace the \"Date:\" one, or should be added below it." "Date: " (format-time-string "%Y%m%dT%H%M%S" time) (format "%s%02d%02d" - (if (> tz 0) "+" "-") (/ (abs tz) 3600) + (if (> tz 0) "+" "-") (/ (abs tz) 3600) (/ (% (abs tz) 3600) 60))))) ;; Do an X-Sent lapsed format. ((eq type 'lapsed) @@ -2246,10 +2246,10 @@ This format is defined by the `gnus-article-time-format' variable." (interactive (gnus-article-hidden-arg)) (unless (gnus-article-check-hidden-text 'emphasis arg) (save-excursion - (let ((alist (or + (let ((alist (or (condition-case nil - (with-current-buffer gnus-summary-buffer - gnus-article-emphasis-alist) + (with-current-buffer gnus-summary-buffer + gnus-article-emphasis-alist) (error)) gnus-emphasis-alist)) (buffer-read-only nil) @@ -2281,8 +2281,8 @@ This format is defined by the `gnus-article-time-format' variable." (let ((name (and gnus-newsgroup-name (gnus-group-real-name gnus-newsgroup-name)))) (make-local-variable 'gnus-article-emphasis-alist) - (setq gnus-article-emphasis-alist - (nconc + (setq gnus-article-emphasis-alist + (nconc (let ((alist gnus-group-highlight-words-alist) elem highlight) (while (setq elem (pop alist)) (when (and name (string-match (car elem) name)) @@ -2291,7 +2291,7 @@ This format is defined by the `gnus-article-time-format' variable." highlight) (copy-sequence highlight-words) (if gnus-newsgroup-name - (copy-sequence (gnus-group-find-parameter + (copy-sequence (gnus-group-find-parameter gnus-newsgroup-name 'highlight-words t))) gnus-emphasis-alist))))) @@ -2336,7 +2336,7 @@ This format is defined by the `gnus-article-time-format' variable." (funcall function group headers (symbol-value variable))) result) (setq result - (expand-file-name + (expand-file-name (cond ((eq filename 'default) default-name) @@ -2701,7 +2701,7 @@ If variable `gnus-use-long-file-name' is non-nil, it is ;; Note "Commands" menu is defined in gnus-sum.el for consistency (when (boundp 'gnus-summary-post-menu) - (cond + (cond ((not (keymapp gnus-summary-post-menu)) (setq gnus-article-post-menu gnus-summary-post-menu)) ((not gnus-article-post-menu) @@ -2787,7 +2787,7 @@ commands: (mm-destroy-parts gnus-article-mime-handles) (setq gnus-article-mime-handles nil)) ;; Set it to nil in article-buffer! - (setq gnus-article-mime-handle-alist nil) + (setq gnus-article-mime-handle-alist nil) (buffer-disable-undo) (setq buffer-read-only t) (unless (eq major-mode 'gnus-article-mode) @@ -3011,7 +3011,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (set-buffer gnus-article-buffer) (let ((handles (or handles gnus-article-mime-handles)) (mail-parse-charset gnus-newsgroup-charset) - (mail-parse-ignored-charsets + (mail-parse-ignored-charsets (save-excursion (set-buffer gnus-summary-buffer) gnus-newsgroup-ignored-charsets))) (if (stringp (car handles)) @@ -3109,13 +3109,13 @@ If ALL-HEADERS is non-nil, no headers are hidden." gnus-newsgroup-charset))) ((numberp arg) (setq charset - (or (cdr (assq arg + (or (cdr (assq arg gnus-summary-show-article-charset-alist)) (read-coding-system "Charset: "))))) (forward-line 2) (mm-insert-inline handle - (if (and charset - (setq charset (mm-charset-to-coding-system + (if (and charset + (setq charset (mm-charset-to-coding-system charset)) (not (eq charset 'ascii))) (mm-decode-coding-string contents charset) @@ -3130,7 +3130,7 @@ If ALL-HEADERS is non-nil, no headers are hidden." (mm-user-display-methods nil) (mm-inlined-types nil) (mail-parse-charset gnus-newsgroup-charset) - (mail-parse-ignored-charsets + (mail-parse-ignored-charsets (save-excursion (set-buffer gnus-summary-buffer) gnus-newsgroup-ignored-charsets))) (if (mm-handle-undisplayer handle) @@ -3146,7 +3146,7 @@ In no internal viewer is available, use an external viewer." (mm-inlined-types '(".*")) (mm-inline-large-images t) (mail-parse-charset gnus-newsgroup-charset) - (mail-parse-ignored-charsets + (mail-parse-ignored-charsets (save-excursion (set-buffer gnus-summary-buffer) gnus-newsgroup-ignored-charsets))) (if (mm-handle-undisplayer handle) @@ -3206,10 +3206,10 @@ In no internal viewer is available, use an external viewer." (if condition (let ((alist gnus-article-mime-handle-alist) ihandle n) (while (setq ihandle (pop alist)) - (if (and (cond + (if (and (cond ((functionp condition) (funcall condition (cdr ihandle))) - ((eq condition 'undisplayed) + ((eq condition 'undisplayed) (not (or (mm-handle-undisplayer (cdr ihandle)) (equal (mm-handle-media-type (cdr ihandle)) "multipart/alternative")))) @@ -3227,7 +3227,7 @@ In no internal viewer is available, use an external viewer." (interactive "P") (save-current-buffer (set-buffer gnus-article-buffer) - (or (numberp n) (setq n (gnus-article-mime-match-handle-first + (or (numberp n) (setq n (gnus-article-mime-match-handle-first gnus-article-mime-match-handle-function))) (when (> n (length gnus-article-mime-handle-alist)) (error "No such part")) @@ -3252,7 +3252,7 @@ In no internal viewer is available, use an external viewer." (prog1 (let ((window (selected-window)) (mail-parse-charset gnus-newsgroup-charset) - (mail-parse-ignored-charsets + (mail-parse-ignored-charsets (save-excursion (set-buffer gnus-summary-buffer) gnus-newsgroup-ignored-charsets))) (save-excursion @@ -3483,7 +3483,7 @@ In no internal viewer is available, use an external viewer." (forward-line -2) (setq beg (point))) (let ((mail-parse-charset gnus-newsgroup-charset) - (mail-parse-ignored-charsets + (mail-parse-ignored-charsets (save-excursion (condition-case () (set-buffer gnus-summary-buffer) (error)) @@ -3502,7 +3502,7 @@ In no internal viewer is available, use an external viewer." (save-restriction (narrow-to-region beg (point)) (gnus-treat-article - nil id + nil id (gnus-article-mime-total-parts) (mm-handle-media-type handle))))))))) @@ -3597,7 +3597,7 @@ In no internal viewer is available, use an external viewer." (if (stringp (car preferred)) (gnus-display-mime preferred) (let ((mail-parse-charset gnus-newsgroup-charset) - (mail-parse-ignored-charsets + (mail-parse-ignored-charsets (save-excursion (set-buffer gnus-summary-buffer) gnus-newsgroup-ignored-charsets))) (mm-display-part preferred) @@ -3835,7 +3835,7 @@ Argument LINES specifies lines to be scrolled down." (setq keys (if (featurep 'xemacs) (events-to-keys (read-key-sequence nil)) (read-key-sequence nil))))) - + (message "") (if (or (member keys nosaves) @@ -4041,7 +4041,7 @@ If given a prefix, show the hidden text instead." ((or (stringp article) (numberp article)) (let ((gnus-override-method gnus-override-method) - (methods (and (stringp article) + (methods (and (stringp article) gnus-refer-article-method)) result (buffer-read-only nil)) @@ -4063,7 +4063,7 @@ If given a prefix, show the hidden text instead." (gnus-check-group-server)) (when (gnus-request-article article group (current-buffer)) (when (numberp article) - (gnus-async-prefetch-next group article + (gnus-async-prefetch-next group article gnus-summary-buffer) (when gnus-keep-backlog (gnus-backlog-enter-article @@ -4266,7 +4266,7 @@ groups." ;;; Internal Variables: -(defcustom gnus-button-url-regexp +(defcustom gnus-button-url-regexp (if (string-match "[[:digit:]]" "1") ;; support POSIX? "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,[:word:]]+[-a-zA-Z0-9_=#$@~`%&*+|\\/[:word:]]\\)" "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?\\([-a-zA-Z0-9_=!?#$@~`%&*+|\\/:;.,]\\|\\w\\)+\\([-a-zA-Z0-9_=#$@~`%&*+|\\/]\\|\\w\\)\\)") diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index c51085e324d..dd664c2886a 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -307,7 +307,7 @@ it's not cached." ;; unsuccessful), so we use the cached headers exclusively. (set-buffer nntp-server-buffer) (erase-buffer) - (let ((coding-system-for-read + (let ((coding-system-for-read gnus-cache-overview-coding-system)) (insert-file-contents cache-file)) 'nov) @@ -489,9 +489,9 @@ Returns the list of articles removed." (save-excursion (set-buffer cache-buf) (erase-buffer) - (let ((coding-system-for-read + (let ((coding-system-for-read gnus-cache-overview-coding-system)) - (insert-file-contents + (insert-file-contents (or file (gnus-cache-file-name group ".overview")))) (goto-char (point-min)) (insert "\n") @@ -534,7 +534,7 @@ Returns the list of articles removed." (save-excursion (set-buffer cache-buf) (erase-buffer) - (let ((coding-system-for-read + (let ((coding-system-for-read gnus-cache-coding-system)) (insert-file-contents (gnus-cache-file-name group (car cached)))) (goto-char (point-min)) diff --git a/lisp/gnus/gnus-cite.el b/lisp/gnus/gnus-cite.el index 47812a727dc..34acee59514 100644 --- a/lisp/gnus/gnus-cite.el +++ b/lisp/gnus/gnus-cite.el @@ -480,8 +480,8 @@ always hide." gnus-hidden-properties)) (point (point-min)) found beg end start) - (while (setq point - (text-property-any point (point-max) + (while (setq point + (text-property-any point (point-max) 'gnus-callback 'gnus-article-toggle-cited-text)) (setq found t) @@ -559,11 +559,11 @@ means show, nil means toggle." (and (< arg 0) hidden)) (if hidden (gnus-remove-text-properties-when - 'article-type 'cite beg end + 'article-type 'cite beg end (cons 'article-type (cons 'cite gnus-hidden-properties))) (gnus-add-text-properties-when - 'article-type nil beg end + 'article-type nil beg end (cons 'article-type (cons 'cite gnus-hidden-properties)))) (save-excursion diff --git a/lisp/gnus/gnus-draft.el b/lisp/gnus/gnus-draft.el index 79ca86af7ee..182f4b3ef05 100644 --- a/lisp/gnus/gnus-draft.el +++ b/lisp/gnus/gnus-draft.el @@ -118,8 +118,8 @@ (while (setq article (pop articles)) (gnus-summary-remove-process-mark article) (unless (memq article gnus-newsgroup-unsendable) - (let ((message-sending-message - (format "Sending message %d of %d..." + (let ((message-sending-message + (format "Sending message %d of %d..." (- total (length articles)) total))) (gnus-draft-send article gnus-newsgroup-name t)) (gnus-summary-mark-article article gnus-canceled-mark))))) @@ -128,7 +128,7 @@ "Send message ARTICLE." (let ((message-syntax-checks (if interactive nil 'dont-check-for-anything-just-trust-me)) - (message-inhibit-body-encoding (or (not group) + (message-inhibit-body-encoding (or (not group) (equal group "nndraft:queue") message-inhibit-body-encoding)) (message-send-hook (and group (not (equal group "nndraft:queue")) @@ -185,8 +185,8 @@ article) (while (setq article (pop articles)) (unless (memq article unsendable) - (let ((message-sending-message - (format "Sending message %d of %d..." + (let ((message-sending-message + (format "Sending message %d of %d..." (- total (length articles)) total))) (gnus-draft-send article))))))) diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index bbce56d9ac9..31eca3e1c80 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el @@ -822,7 +822,7 @@ For example: ;; Emacs 21 tool bar. Should be no-op otherwise. (defun gnus-group-make-tool-bar () - (if (and + (if (and (condition-case nil (require 'tool-bar) (error nil)) (fboundp 'tool-bar-add-item-from-menu) (default-value 'tool-bar-mode) @@ -938,7 +938,7 @@ The following commands are available: (let ((item (assoc method gnus-group-name-charset-method-alist)) (alist gnus-group-name-charset-group-alist) result) - (if item + (if item (cdr item) (while (setq item (pop alist)) (if (string-match (car item) group) @@ -1099,9 +1099,9 @@ If REGEXP, only list groups matching REGEXP." (gnus-add-text-properties (point) (prog1 (1+ (point)) (insert " " mark " *: " - (gnus-group-name-decode group + (gnus-group-name-decode group (gnus-group-name-charset - nil group)) + nil group)) "\n")) (list 'gnus-group (gnus-intern-safe group gnus-active-hashtb) 'gnus-unread t @@ -1112,9 +1112,9 @@ If REGEXP, only list groups matching REGEXP." (gnus-add-text-properties (point) (prog1 (1+ (point)) (insert " " mark " *: " - (gnus-group-name-decode group + (gnus-group-name-decode group (gnus-group-name-charset - nil group)) + nil group)) "\n")) (list 'gnus-group (gnus-intern-safe group gnus-active-hashtb) 'gnus-unread t @@ -1168,7 +1168,7 @@ If REGEXP, only list groups matching REGEXP." gnus-tmp-method) "Insert a group line in the group buffer." (let* ((gnus-tmp-method - (gnus-server-get-method gnus-tmp-group gnus-tmp-method)) + (gnus-server-get-method gnus-tmp-group gnus-tmp-method)) (group-name-charset (gnus-group-name-charset gnus-tmp-method gnus-tmp-group)) (gnus-tmp-active (gnus-active gnus-tmp-group)) @@ -1188,13 +1188,13 @@ If REGEXP, only list groups matching REGEXP." ((<= gnus-tmp-level gnus-level-unsubscribed) ?U) ((= gnus-tmp-level gnus-level-zombie) ?Z) (t ?K))) - (gnus-tmp-qualified-group + (gnus-tmp-qualified-group (gnus-group-name-decode (gnus-group-real-name gnus-tmp-group) group-name-charset)) (gnus-tmp-newsgroup-description (if gnus-description-hashtb (or (gnus-group-name-decode - (gnus-gethash gnus-tmp-group gnus-description-hashtb) + (gnus-gethash gnus-tmp-group gnus-description-hashtb) group-name-charset) "") "")) (gnus-tmp-moderated @@ -1840,11 +1840,11 @@ If TEST-MARKED, the line must be marked." (test-marked (goto-char (point-min)) (let (found) - (while (and (not found) + (while (and (not found) (gnus-goto-char (text-property-any (point) (point-max) - 'gnus-group + 'gnus-group (gnus-intern-safe group gnus-active-hashtb)))) (if (gnus-group-mark-line-p) (setq found t) @@ -2308,7 +2308,7 @@ If SOLID (the prefix), create a solid group." default-login 'gnus-group-warchive-login-history) user-mail-address)) (method - `(nnwarchive ,address + `(nnwarchive ,address (nnwarchive-type ,(intern type)) (nnwarchive-login ,login)))) (gnus-group-make-group group method))) @@ -3175,7 +3175,7 @@ entail asking the server for the groups." (gnus-add-text-properties (point) (prog1 (1+ (point)) (insert " *: " - (gnus-group-name-decode group + (gnus-group-name-decode group (gnus-group-name-charset nil group)) "\n")) @@ -3338,7 +3338,7 @@ to use." (lambda (group) (setq b (point)) (let ((charset (gnus-group-name-charset nil (symbol-name group)))) - (insert (format " *: %-20s %s\n" + (insert (format " *: %-20s %s\n" (gnus-group-name-decode (symbol-name group) charset) (gnus-group-name-decode @@ -3709,7 +3709,7 @@ or `gnus-group-catchup-group-hook'." "" (gnus-time-iso8601 time)))) -(defun gnus-group-prepare-flat-list-dead-predicate +(defun gnus-group-prepare-flat-list-dead-predicate (groups level mark predicate) (let (group) (if predicate @@ -3719,8 +3719,8 @@ or `gnus-group-catchup-group-hook'." (when (funcall predicate group) (gnus-add-text-properties (point) (prog1 (1+ (point)) - (insert " " mark " *: " - (gnus-group-name-decode group + (insert " " mark " *: " + (gnus-group-name-decode group (gnus-group-name-charset nil group)) "\n")) @@ -3789,11 +3789,11 @@ This command may read the active file." (assq 'cache marks))) lowest #'(lambda (group) - (or (gnus-gethash group + (or (gnus-gethash group gnus-cache-active-hashtb) - ;; Cache active file might use "." + ;; Cache active file might use "." ;; instead of ":". - (gnus-gethash + (gnus-gethash (mapconcat 'identity (split-string group ":") ".") diff --git a/lisp/gnus/gnus-ml.el b/lisp/gnus/gnus-ml.el index f95cde2283b..156250e7f84 100644 --- a/lisp/gnus/gnus-ml.el +++ b/lisp/gnus/gnus-ml.el @@ -94,8 +94,8 @@ (defun gnus-mailing-list-help () "Get help from mailing list server." - (interactive) - (let ((list-help + (interactive) + (let ((list-help (with-current-buffer gnus-original-article-buffer (gnus-fetch-field "list-help")))) (cond (list-help (gnus-mailing-list-message list-help)) @@ -104,7 +104,7 @@ (defun gnus-mailing-list-subscribe () "Subscribe" (interactive) - (let ((list-subscribe + (let ((list-subscribe (with-current-buffer gnus-original-article-buffer (gnus-fetch-field "list-subscribe")))) (cond (list-subscribe (gnus-mailing-list-message list-subscribe)) @@ -113,7 +113,7 @@ (defun gnus-mailing-list-unsubscribe () "Unsubscribe" (interactive) - (let ((list-unsubscribe + (let ((list-unsubscribe (with-current-buffer gnus-original-article-buffer (gnus-fetch-field "list-unsubscribe")))) (cond (list-unsubscribe (gnus-mailing-list-message list-unsubscribe)) @@ -122,7 +122,7 @@ (defun gnus-mailing-list-post () "Post message (really useful ?)" (interactive) - (let ((list-post + (let ((list-post (with-current-buffer gnus-original-article-buffer (gnus-fetch-field "list-post")))) (cond (list-post (gnus-mailing-list-message list-post)) @@ -131,7 +131,7 @@ (defun gnus-mailing-list-owner () "Mail to the owner" (interactive) - (let ((list-owner + (let ((list-owner (with-current-buffer gnus-original-article-buffer (gnus-fetch-field "list-owner")))) (cond (list-owner (gnus-mailing-list-message list-owner)) @@ -140,7 +140,7 @@ (defun gnus-mailing-list-archive () "Browse archive" (interactive) - (let ((list-archive + (let ((list-archive (with-current-buffer gnus-original-article-buffer (gnus-fetch-field "list-archive")))) (cond (list-archive (gnus-mailing-list-message list-archive)) @@ -155,7 +155,7 @@ (subject "None") (body "") ) - (cond + (cond ((string-match "<mailto:\\([^>]*\\)>" address) (let ((args (match-string 1 address))) (cond ; with param @@ -168,9 +168,9 @@ (setq body (match-string 1 param))) (if (string-match "to=\\([^&]*\\)" param) (push (match-string 1 param) to)) - )) + )) (t (setq mailto args))))) ; without param - + ; other case <http://... to be done. (t nil)) (gnus-setup-message 'message (message-mail mailto subject)) diff --git a/lisp/gnus/gnus-msg.el b/lisp/gnus/gnus-msg.el index b35a6e47d9a..528789b6fe6 100644 --- a/lisp/gnus/gnus-msg.el +++ b/lisp/gnus/gnus-msg.el @@ -697,7 +697,7 @@ The original article will be yanked." (gnus-summary-reply-with-original n t)) (defun gnus-summary-mail-forward (&optional arg post) - "Forward the current message to another user. + "Forward the current message to another user. If ARG is nil, see `message-forward-as-mime' and `message-forward-show-mml'; if ARG is 1, decode the message and forward directly inline; if ARG is 2, forward message as an rfc822 MIME section; @@ -708,7 +708,7 @@ If POST, post instead of mail." (interactive "P") (let ((message-forward-as-mime message-forward-as-mime) (message-forward-show-mml message-forward-show-mml)) - (cond + (cond ((null arg)) ((eq arg 1) (setq message-forward-as-mime nil message-forward-show-mml t)) diff --git a/lisp/gnus/gnus-range.el b/lisp/gnus/gnus-range.el index 223a32e33b3..9994be1e8c4 100644 --- a/lisp/gnus/gnus-range.el +++ b/lisp/gnus/gnus-range.el @@ -343,7 +343,7 @@ modified." range item selector) (while (or item1 item2) (setq selector - (cond + (cond ((null item1) nil) ((null item2) t) ((and (numberp item1) (numberp item2)) (< item1 item2)) @@ -353,30 +353,30 @@ modified." (setq item (or (let ((tmp1 item) (tmp2 (if selector item1 item2))) - (cond + (cond ((null tmp1) tmp2) ((null tmp2) tmp1) ((and (numberp tmp1) (numberp tmp2)) - (cond + (cond ((eq tmp1 tmp2) tmp1) ((eq (1+ tmp1) tmp2) (cons tmp1 tmp2)) ((eq (1+ tmp2) tmp1) (cons tmp2 tmp1)) (t nil))) ((numberp tmp1) - (cond + (cond ((and (>= tmp1 (car tmp2)) (<= tmp1 (cdr tmp2))) tmp2) ((eq (1+ tmp1) (car tmp2)) (cons tmp1 (cdr tmp2))) ((eq (1- tmp1) (cdr tmp2)) (cons (car tmp2) tmp1)) (t nil))) ((numberp tmp2) - (cond + (cond ((and (>= tmp2 (car tmp1)) (<= tmp2 (cdr tmp1))) tmp1) ((eq (1+ tmp2) (car tmp1)) (cons tmp2 (cdr tmp1))) ((eq (1- tmp2) (cdr tmp1)) (cons (car tmp1) tmp2)) (t nil))) ((< (1+ (cdr tmp1)) (car tmp2)) nil) ((< (1+ (cdr tmp2)) (car tmp1)) nil) - (t (cons (min (car tmp1) (car tmp2)) + (t (cons (min (car tmp1) (car tmp2)) (max (cdr tmp1) (cdr tmp2)))))) (progn (if item (push item range)) diff --git a/lisp/gnus/gnus-srvr.el b/lisp/gnus/gnus-srvr.el index 5204db1bb8d..db638fcc2c9 100644 --- a/lisp/gnus/gnus-srvr.el +++ b/lisp/gnus/gnus-srvr.el @@ -138,7 +138,7 @@ The following specs are understood: "n" next-line "p" previous-line - + "g" gnus-server-regenerate-server "\C-c\C-i" gnus-info-find-node @@ -607,9 +607,9 @@ The following commands are available: (goto-char (point-min)) (unless (string= gnus-ignored-newsgroups "") (delete-matching-lines gnus-ignored-newsgroups)) - (while (not (eobp)) + (while (not (eobp)) (ignore-errors - (push (cons + (push (cons (if (eq (char-after) ?\") (read cur) (let ((p (point)) (name "")) @@ -758,7 +758,7 @@ buffer. nil nil (if (gnus-server-equal gnus-browse-current-method "native") nil - (gnus-method-simplify + (gnus-method-simplify gnus-browse-current-method))) gnus-level-default-subscribed gnus-level-killed (and (car (nth 1 gnus-newsrc-alist)) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 0fc46a934e7..024230c5074 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -1825,7 +1825,7 @@ increase the score of each group you read." gnus-article-commands-menu gnus-article-mode-map "" (cons "Commands" innards)) ;; in Emacs, don't share menu. - (setq gnus-article-commands-menu + (setq gnus-article-commands-menu (copy-keymap gnus-summary-article-menu)) (define-key gnus-article-mode-map [menu-bar commands] (cons "Commands" gnus-article-commands-menu)))) @@ -3757,8 +3757,8 @@ If LINE, insert the rebuilt thread starting on line LINE." threads (gnus-message 8 "Sorting threads...") (prog1 - (gnus-sort-threads-1 - threads + (gnus-sort-threads-1 + threads (gnus-make-sort-function gnus-thread-sort-functions)) (gnus-message 8 "Sorting threads...done")))) @@ -4196,7 +4196,7 @@ or a straight list of headers." gnus-list-identifiers (mapconcat 'identity gnus-list-identifiers " *\\|")))) (dolist (header gnus-newsgroup-headers) - (when (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp + (when (string-match (concat "\\(\\(\\(Re: +\\)?\\(" regexp " *\\)\\)+\\(Re: +\\)?\\)") (mail-header-subject header)) (mail-header-set-subject @@ -4418,7 +4418,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (gnus-sorted-complement gnus-newsgroup-unreads articles))) (when gnus-alter-articles-to-read-function (setq gnus-newsgroup-unreads - (sort + (sort (funcall gnus-alter-articles-to-read-function gnus-newsgroup-name gnus-newsgroup-unreads) '<))) @@ -4530,7 +4530,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (unless (memq (cdr type) uncompressed) (setq list (gnus-compress-sequence (set symbol (sort list '<)) t))) - + (when (gnus-check-backend-function 'request-set-mark gnus-newsgroup-name) ;; propagate flags to server, with the following exceptions: @@ -4549,7 +4549,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (push (list add 'add (list (cdr type))) delta-marks)) (when del (push (list del 'del (list (cdr type))) delta-marks))))) - + (when list (push (cons (cdr type) list) newmarked))) @@ -4557,7 +4557,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." (unless (gnus-check-group gnus-newsgroup-name) (error "Can't open server for %s" gnus-newsgroup-name)) (gnus-request-set-mark gnus-newsgroup-name delta-marks)) - + ;; Enter these new marks into the info of the group. (if (nthcdr 3 info) (setcar (nthcdr 3 info) newmarked) @@ -4589,9 +4589,9 @@ If WHERE is `summary', the summary mode line format will be used." (let* ((mformat (symbol-value (intern (format "gnus-%s-mode-line-format-spec" where)))) - (gnus-tmp-group-name (gnus-group-name-decode + (gnus-tmp-group-name (gnus-group-name-decode gnus-newsgroup-name - (gnus-group-name-charset + (gnus-group-name-charset nil gnus-newsgroup-name))) (gnus-tmp-article-number (or gnus-current-article 0)) @@ -6406,17 +6406,17 @@ If given a prefix, remove all limits." (defun gnus-summary-limit-to-subject (subject &optional header not-matching) "Limit the summary buffer to articles that have subjects that match a regexp. If NOT-MATCHING, excluding articles that have subjects that match a regexp." - (interactive + (interactive (list (read-string (if current-prefix-arg "Exclude subject (regexp): " - "Limit to subject (regexp): ")) + "Limit to subject (regexp): ")) nil current-prefix-arg)) (unless header (setq header "subject")) (when (not (equal "" subject)) (prog1 (let ((articles (gnus-summary-find-matching - (or header "subject") subject 'all nil nil + (or header "subject") subject 'all nil nil not-matching))) (unless articles (error "Found no matches for \"%s\"" subject)) @@ -6426,10 +6426,10 @@ If NOT-MATCHING, excluding articles that have subjects that match a regexp." (defun gnus-summary-limit-to-author (from &optional not-matching) "Limit the summary buffer to articles that have authors that match a regexp. If NOT-MATCHING, excluding articles that have authors that match a regexp." - (interactive + (interactive (list (read-string (if current-prefix-arg "Exclude author (regexp): " - "Limit to author (regexp): ")) + "Limit to author (regexp): ")) current-prefix-arg)) (gnus-summary-limit-to-subject from "from" not-matching)) @@ -6487,14 +6487,14 @@ articles that are younger than AGE days." nil t)))) (list header - (read-string (format "%s header %s (regexp): " + (read-string (format "%s header %s (regexp): " (if current-prefix-arg "Exclude" "Limit to") header)) current-prefix-arg))) (when (not (equal "" regexp)) (prog1 (let ((articles (gnus-summary-find-matching - (cons 'extra header) regexp 'all nil nil + (cons 'extra header) regexp 'all nil nil not-matching))) (unless articles (error "Found no matches for \"%s\"" regexp)) @@ -7053,8 +7053,8 @@ to guess what the document format is." ;; the parent article. (when (setq to-address (or (message-fetch-field "reply-to") (message-fetch-field "from"))) - (setq params (append - (list (cons 'to-address + (setq params (append + (list (cons 'to-address (funcall gnus-decode-encoded-word-function to-address)))))) (setq dig (nnheader-set-temp-buffer " *gnus digest buffer*")) @@ -7248,7 +7248,7 @@ The search stars on the current article and goes forwards unless BACKWARD is non-nil. If BACKWARD is `all', do all articles. If UNREAD is non-nil, only unread articles will be taken into consideration. If NOT-CASE-FOLD, case won't be folded -in the comparisons. If NOT-MATCHING, return a list of all articles that +in the comparisons. If NOT-MATCHING, return a list of all articles that not match REGEXP on HEADER." (let ((case-fold-search (not not-case-fold)) articles d func) @@ -7271,7 +7271,7 @@ not match REGEXP on HEADER." (gnus-data-unread-p d)) ; Or just unreads. (vectorp (gnus-data-header d)) ; It's not a pseudo. (if not-matching - (not (string-match + (not (string-match regexp (funcall func (gnus-data-header d)))) (string-match regexp @@ -7936,13 +7936,13 @@ delete these instead." "Edit the current article. This will have permanent effect only in mail groups. If ARG is nil, edit the decoded articles. -If ARG is 1, edit the raw articles. +If ARG is 1, edit the raw articles. If ARG is 2, edit the raw articles even in read-only groups. Otherwise, allow editing of articles even in read-only groups." (interactive "P") (let (force raw) - (cond + (cond ((null arg)) ((eq arg 1) (setq raw t)) ((eq arg 2) (setq raw t @@ -7965,8 +7965,8 @@ groups." (if (equal gnus-newsgroup-name "nndraft:drafts") (setq raw t)) (gnus-article-edit-article - (if raw 'ignore - #'(lambda () + (if raw 'ignore + #'(lambda () (let ((mbl mml-buffer-list)) (setq mml-buffer-list nil) (mime-to-mml) @@ -7977,17 +7977,17 @@ groups." (add-hook 'kill-buffer-hook 'mml-destroy-buffers t t)))) `(lambda (no-highlight) (let ((mail-parse-charset ',gnus-newsgroup-charset) - (mail-parse-ignored-charsets + (mail-parse-ignored-charsets ',gnus-newsgroup-ignored-charsets)) - ,(if (not raw) '(progn + ,(if (not raw) '(progn (mml-to-mime) (mml-destroy-buffers) - (remove-hook 'kill-buffer-hook + (remove-hook 'kill-buffer-hook 'mml-destroy-buffers t) (kill-local-variable 'mml-buffer-list))) (gnus-summary-edit-article-done ,(or (mail-header-references gnus-current-headers) "") - ,(gnus-group-read-only-p) + ,(gnus-group-read-only-p) ,gnus-summary-buffer no-highlight)))))))) (defalias 'gnus-summary-edit-article-postpone 'gnus-article-edit-exit) @@ -9349,12 +9349,12 @@ save those articles instead." "Save parts matching TYPE to DIR. If REVERSE, save parts that do not match TYPE." (interactive - (list (read-string "Save parts of type: " + (list (read-string "Save parts of type: " (or (car gnus-summary-save-parts-type-history) gnus-summary-save-parts-default-mime) 'gnus-summary-save-parts-type-history) (setq gnus-summary-save-parts-last-directory - (read-file-name "Save to directory: " + (read-file-name "Save to directory: " gnus-summary-save-parts-last-directory nil t)) current-prefix-arg)) @@ -9697,7 +9697,7 @@ If REVERSE, save parts that do not match TYPE." `(progn (gnus-info-set-marks ',info ',(gnus-info-marks info) t) (gnus-info-set-read ',info ',(gnus-info-read info)) - (gnus-get-unread-articles-in-group ',info + (gnus-get-unread-articles-in-group ',info (gnus-active ,group)) (gnus-group-update-group ,group t) ,setmarkundo)))) @@ -9848,7 +9848,7 @@ treated as multipart/mixed." mark (car lway) lway name))) (setq func (eval func)) (define-key map (nth 4 lway) func))))) - + (defun gnus-summary-make-marking-command-1 (mark way lway name) `(defun ,(intern (format "gnus-summary-put-mark-as-%s%s" @@ -9865,7 +9865,7 @@ returned." name (cadr lway)) (interactive "p") (gnus-summary-generic-mark n ,mark ',(nth 2 lway) ,(nth 3 lway)))) - + (defun gnus-summary-generic-mark (n mark move unread) "Mark N articles with MARK." (unless (eq major-mode 'gnus-summary-mode) diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index 2ef54f7be7c..521269e6e9e 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el @@ -163,7 +163,7 @@ with some simple extensions. (dolist (topic (gnus-current-topics topic)) (gnus-topic-fold t)) (gnus-topic-goto-topic topic)) - + (defun gnus-current-topic () "Return the name of the current topic." (let ((result @@ -233,14 +233,14 @@ If RECURSIVE is t, return groups in its subtopics too." ;; Add this group to the list of visible groups. (push (or entry group) visible-groups))) (setq visible-groups (nreverse visible-groups)) - (when recursive + (when recursive (if (eq recursive t) (setq recursive (cdr (gnus-topic-find-topology topic)))) (mapcar (lambda (topic-topology) - (setq visible-groups - (nconc visible-groups + (setq visible-groups + (nconc visible-groups (gnus-topic-find-groups - (caar topic-topology) + (caar topic-topology) level all lowest topic-topology)))) (cdr recursive))) visible-groups)) @@ -1146,10 +1146,10 @@ When used interactively, PARENT will be the topic under point." (gnus-group-list-groups) (gnus-topic-goto-topic topic)) -;; FIXME: -;; 1. When the marked groups are overlapped with the process +;; FIXME: +;; 1. When the marked groups are overlapped with the process ;; region, the behavior of move or remove is not right. -;; 2. Can't process on several marked groups with a same name, +;; 2. Can't process on several marked groups with a same name, ;; because gnus-group-marked only keeps one copy. (defun gnus-topic-move-group (n topic &optional copyp) @@ -1158,7 +1158,7 @@ If COPYP, copy the groups instead." (interactive (list current-prefix-arg (completing-read "Move to topic: " gnus-topic-alist nil t))) - (let ((use-marked (and (not n) (not (gnus-region-active-p)) + (let ((use-marked (and (not n) (not (gnus-region-active-p)) gnus-group-marked t)) (groups (gnus-group-process-prefix n)) (topicl (assoc topic gnus-topic-alist)) @@ -1185,7 +1185,7 @@ If COPYP, copy the groups instead." (defun gnus-topic-remove-group (&optional n) "Remove the current group from the topic." (interactive "P") - (let ((use-marked (and (not n) (not (gnus-region-active-p)) + (let ((use-marked (and (not n) (not (gnus-region-active-p)) gnus-group-marked t)) (groups (gnus-group-process-prefix n))) (mapcar @@ -1283,7 +1283,7 @@ If PERMANENT, make it stay hidden in subsequent sessions as well." (when (gnus-current-topic) (gnus-topic-goto-topic (gnus-current-topic)) (if permanent - (setcar (cddr + (setcar (cddr (cadr (gnus-topic-find-topology (gnus-current-topic)))) 'hidden)) @@ -1296,8 +1296,8 @@ If PERMANENT, make it stay shown in subsequent sessions as well." (when (gnus-group-topic-p) (if (not permanent) (gnus-topic-remove-topic t nil) - (let ((topic - (gnus-topic-find-topology + (let ((topic + (gnus-topic-find-topology (completing-read "Show topic: " gnus-topic-alist nil t)))) (setcar (cddr (cadr topic)) nil) (setcar (cdr (cadr topic)) 'visible) @@ -1312,7 +1312,7 @@ If RECURSIVE is t, mark its subtopics too." (if (not topic) (call-interactively 'gnus-group-mark-group) (save-excursion - (let ((groups (gnus-topic-find-groups topic gnus-level-killed t nil + (let ((groups (gnus-topic-find-groups topic gnus-level-killed t nil recursive))) (while groups (funcall (if unmark 'gnus-group-remove-mark 'gnus-group-set-mark) @@ -1558,7 +1558,7 @@ If REVERSE, sort in reverse order." (mapcar `(lambda (top) (gnus-topic-sort-topics-1 top ,reverse)) (sort (cdr top) - '(lambda (t1 t2) + '(lambda (t1 t2) (string-lessp (caar t1) (caar t2))))))) (setcdr top (if reverse (reverse subtop) subtop)))) top) @@ -1566,8 +1566,8 @@ If REVERSE, sort in reverse order." (defun gnus-topic-sort-topics (&optional topic reverse) "Sort topics in TOPIC alphabetically by topic name. If REVERSE, reverse the sorting order." - (interactive - (list (completing-read "Sort topics in : " gnus-topic-alist nil t + (interactive + (list (completing-read "Sort topics in : " gnus-topic-alist nil t (gnus-current-topic)) current-prefix-arg)) (let ((topic-topology (or (and topic (cdr (gnus-topic-find-topology topic))) @@ -1579,8 +1579,8 @@ If REVERSE, reverse the sorting order." (defun gnus-topic-move (current to) "Move the CURRENT topic to TO." - (interactive - (list + (interactive + (list (gnus-group-topic-name) (completing-read "Move to topic: " gnus-topic-alist nil t))) (unless (and current to) @@ -1613,7 +1613,7 @@ If REVERSE, reverse the sorting order." ;; Add the group to the topic. (nconc (assoc topic gnus-topic-alist) (list newsgroup)) (throw 'end t)))))) - + (provide 'gnus-topic) ;;; gnus-topic.el ends here diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 56f17d6a8d8..9ce98cd05ac 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -2852,7 +2852,7 @@ Disallow invalid group names." (let ((prefix "") group) (while (not group) - (when (string-match + (when (string-match gnus-invalid-group-regexp (setq group (read-string (concat prefix prompt) (cons (or default "") 0) diff --git a/lisp/gnus/ietf-drums.el b/lisp/gnus/ietf-drums.el index 8cbf280fa7c..54bd3a82bcc 100644 --- a/lisp/gnus/ietf-drums.el +++ b/lisp/gnus/ietf-drums.el @@ -52,7 +52,7 @@ "Textual token including full stop.") (defvar ietf-drums-qtext-token (concat ietf-drums-no-ws-ctl-token "\041\043-\133\135-\177") - "Non-white-space control characters, plus the rest of ASCII excluding + "Non-white-space control characters, plus the rest of ASCII excluding backslash and doublequote.") (defvar ietf-drums-tspecials "][()<>@,;:\\\"/?=" "Tspecials.") diff --git a/lisp/gnus/mail-source.el b/lisp/gnus/mail-source.el index ad0f5fc23d7..e9fc96087f1 100644 --- a/lisp/gnus/mail-source.el +++ b/lisp/gnus/mail-source.el @@ -92,12 +92,12 @@ See Info node `(gnus)Mail Source Specifiers'." (const :format "" pop) (checklist :tag "Options" :greedy t (group :inline t - (const :format "" :value :server) + (const :format "" :value :server) (string :tag "Server")) (group :inline t - (const :format "" :value :port) + (const :format "" :value :port) (choice :tag "Port" - :value "pop3" + :value "pop3" (number :format "%v") (string :format "%v"))) (group :inline t @@ -119,7 +119,7 @@ See Info node `(gnus)Mail Source Specifiers'." (const :format "" :value :function) (function :tag "Function")) (group :inline t - (const :format "" + (const :format "" :value :authentication) (choice :tag "Authentication" :value apop @@ -145,8 +145,8 @@ See Info node `(gnus)Mail Source Specifiers'." (string :tag "Server")) (group :inline t (const :format "" :value :port) - (choice :tag "Port" - :value 143 + (choice :tag "Port" + :value 143 number string)) (group :inline t (const :format "" :value :user) @@ -171,7 +171,7 @@ See Info node `(gnus)Mail Source Specifiers'." :value "INBOX")) (group :inline t (const :format "" :value :predicate) - (string :tag "Predicate" + (string :tag "Predicate" :value "UNSEEN UNDELETED")) (group :inline t (const :format "" :value :fetchflag) @@ -187,7 +187,7 @@ See Info node `(gnus)Mail Source Specifiers'." (cons :tag "Webmail server" (const :format "" webmail) (checklist :tag "Options" :greedy t - (group :inline t + (group :inline t (const :format "" :value :subtype) ;; Should be generated from ;; `webmail-type-definition', but we @@ -739,7 +739,7 @@ If ARGS, PROMPT is used as an argument to `format'." (defvar mail-source-report-new-mail-timer nil) (defvar mail-source-report-new-mail-idle-timer nil) -(eval-when-compile +(eval-when-compile (if (featurep 'xemacs) (require 'itimer) (require 'timer))) @@ -810,16 +810,16 @@ This only works when `display-time' is enabled." (when (and (not (file-directory-p file)) (not (if function (funcall function file mail-source-crash-box) - (let ((coding-system-for-write + (let ((coding-system-for-write mm-text-coding-system) - (coding-system-for-read + (coding-system-for-read mm-text-coding-system)) (with-temp-file mail-source-crash-box (insert-file-contents file) (goto-char (point-min)) ;;; ;; Unix mail format ;;; (unless (looking-at "\n*From ") -;;; (insert "From maildir " +;;; (insert "From maildir " ;;; (current-time-string) "\n")) ;;; (while (re-search-forward "^From " nil t) ;;; (replace-match ">From ")) @@ -915,14 +915,14 @@ This only works when `display-time' is enabled." (when (eq authentication 'password) (setq password (or password - (cdr (assoc (format "webmail:%s:%s" subtype user) + (cdr (assoc (format "webmail:%s:%s" subtype user) mail-source-password-cache)) (mail-source-read-passwd (format "Password for %s at %s: " user subtype)))) (when (and password - (not (assoc (format "webmail:%s:%s" subtype user) + (not (assoc (format "webmail:%s:%s" subtype user) mail-source-password-cache))) - (push (cons (format "webmail:%s:%s" subtype user) password) + (push (cons (format "webmail:%s:%s" subtype user) password) mail-source-password-cache))) (webmail-fetch mail-source-crash-box subtype user password) (mail-source-callback callback (symbol-name subtype))))) diff --git a/lisp/gnus/mailcap.el b/lisp/gnus/mailcap.el index 89a643fa57b..4a029d812cc 100644 --- a/lisp/gnus/mailcap.el +++ b/lisp/gnus/mailcap.el @@ -306,7 +306,7 @@ If you are unsure what to do, please answer \"no\"." "Text of warning message displayed by `mailcap-maybe-eval'. Make sure that this text consists only of few text lines. Otherwise, Gnus might fail to display all of it.") - + (defun mailcap-maybe-eval () "Maybe evaluate a buffer of Emacs Lisp code." (let ((lisp-buffer (current-buffer))) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 698cc7c0a57..18922429ae5 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -3635,7 +3635,7 @@ than 988 characters long, and if they are not, trim them until they are." (cdr item))) headers) nil switch-function yank-action actions))))) - + (eval-when-compile (defvar mc-modes-alist)) (defun message-setup-1 (headers &optional replybuffer actions) (when (and (boundp 'mc-modes-alist) @@ -4164,7 +4164,7 @@ The form is: [Source] Subject, where if the original message was mail, Source is the sender, and if the original message was news, Source is the list of newsgroups is was posted to." (concat "[" - (let ((prefix + (let ((prefix (or (message-fetch-field "newsgroups") (message-fetch-field "from") "(nowhere)"))) @@ -4305,7 +4305,7 @@ Optional DIGEST will use digest to forward." "Let RMAIL uses message to forward." (interactive) (setq rmail-enable-mime-composing t) - (setq rmail-insert-mime-forwarded-message-function + (setq rmail-insert-mime-forwarded-message-function 'message-forward-rmail-make-body)) ;;;###autoload @@ -4498,7 +4498,7 @@ which specify the range to operate on." (eval-when-compile (defvar tool-bar-map)) (if (featurep 'xemacs) (require 'messagexmas) - (when (and + (when (and (condition-case nil (require 'tool-bar) (error nil)) (fboundp 'tool-bar-add-item-from-menu) tool-bar-mode) @@ -4508,7 +4508,7 @@ which specify the range to operate on." (dolist (key '(print-buffer kill-buffer save-buffer write-file dired open-file)) (define-key tool-bar-map (vector key) nil)) - + (tool-bar-add-item-from-menu 'message-send-and-exit "mail_send" message-mode-map) (tool-bar-add-item-from-menu diff --git a/lisp/gnus/mm-decode.el b/lisp/gnus/mm-decode.el index 1a8fc6db819..201ed291b7b 100644 --- a/lisp/gnus/mm-decode.el +++ b/lisp/gnus/mm-decode.el @@ -164,7 +164,7 @@ "List of media types that are to be displayed inline." :type '(repeat string) :group 'mime-display) - + (defcustom mm-automatic-display '("text/plain" "text/enriched" "text/richtext" "text/html" "text/x-vcard" "image/.*" "message/delivery-status" "multipart/.*" @@ -466,7 +466,7 @@ external if displayed external." (mm-handle-set-undisplayer handle (cons file buffer))) (message "Displaying %s..." (format method file)) 'external))))))) - + (defun mm-mailcap-command (method file type-list) (let ((ctl (cdr type-list)) (beg 0) @@ -493,7 +493,7 @@ external if displayed external." (push "<" out) (push (mm-quote-arg file) out))) (mapconcat 'identity (nreverse out) ""))) - + (defun mm-remove-parts (handles) "Remove the displayed MIME parts represented by HANDLES." (if (and (listp handles) diff --git a/lisp/gnus/mm-encode.el b/lisp/gnus/mm-encode.el index 6c7febb2a6b..0d585a651a5 100644 --- a/lisp/gnus/mm-encode.el +++ b/lisp/gnus/mm-encode.el @@ -1,4 +1,4 @@ -;;; mm-encode.el --- functions for encoding MIME things +;;; mm-encode.el --- functions for encoding MIME things ;; Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org> @@ -144,7 +144,7 @@ The encoding used is returned." (while rules (when (string-match (caar rules) type) (throw 'found - (let ((encoding + (let ((encoding (if (eq (cadr (car rules)) 'qp-or-base64) (mm-qp-or-base64) (cadr (car rules))))) diff --git a/lisp/gnus/mm-partial.el b/lisp/gnus/mm-partial.el index c65ddfad56f..3598d5fa691 100644 --- a/lisp/gnus/mm-partial.el +++ b/lisp/gnus/mm-partial.el @@ -25,7 +25,7 @@ ;;; Code: -(eval-when-compile +(eval-when-compile (require 'cl)) (require 'gnus-sum) @@ -40,13 +40,13 @@ (while (setq header (pop headers)) (unless (eq (aref header 0) art) (mm-with-unibyte-buffer - (gnus-request-article-this-buffer (aref header 0) + (gnus-request-article-this-buffer (aref header 0) gnus-newsgroup-name) (when (search-forward id nil t) (let ((nhandles (mm-dissect-buffer)) nid) (if (consp (car nhandles)) (mm-destroy-parts nhandles) - (setq nid (cdr (assq 'id + (setq nid (cdr (assq 'id (cdr (mm-handle-type nhandles))))) (if (not (equal id nid)) (mm-destroy-parts nhandles) @@ -56,10 +56,10 @@ ;;;###autoload (defun mm-inline-partial (handle &optional no-display) "Show the partial part of HANDLE. -This function replaces the buffer of HANDLE with a buffer contains +This function replaces the buffer of HANDLE with a buffer contains the entire message. If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing." - (let ((id (cdr (assq 'id (cdr (mm-handle-type handle))))) + (let ((id (cdr (assq 'id (cdr (mm-handle-type handle))))) phandles (b (point)) (n 1) total phandle nn ntotal @@ -68,18 +68,18 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing." (unless id (error "Can not find message/partial id")) (setq phandles - (sort (cons handle + (sort (cons handle (mm-partial-find-parts - id + id (save-excursion (set-buffer gnus-summary-buffer) (gnus-summary-article-number)))) #'(lambda (a b) - (let ((anumber (string-to-number - (cdr (assq 'number + (let ((anumber (string-to-number + (cdr (assq 'number (cdr (mm-handle-type a)))))) - (bnumber (string-to-number - (cdr (assq 'number + (bnumber (string-to-number + (cdr (assq 'number (cdr (mm-handle-type b))))))) (< anumber bnumber))))) (setq gnus-article-mime-handles @@ -90,15 +90,15 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing." (save-excursion (set-buffer (generate-new-buffer " *mm*")) (while (setq phandle (pop phandles)) - (setq nn (string-to-number - (cdr (assq 'number + (setq nn (string-to-number + (cdr (assq 'number (cdr (mm-handle-type phandle)))))) - (setq ntotal (string-to-number - (cdr (assq 'total + (setq ntotal (string-to-number + (cdr (assq 'total (cdr (mm-handle-type phandle)))))) (if ntotal (if total - (unless (eq total ntotal) + (unless (eq total ntotal) (error "The numbers of total are different")) (setq total ntotal))) (unless (< nn n) @@ -134,7 +134,7 @@ If NO-DISPLAY is nil, display it. Otherwise, do nothing after replacing." (nconc (if (listp (car gnus-article-mime-handles)) gnus-article-mime-handles (list gnus-article-mime-handles)) - (if (listp (car handles)) + (if (listp (car handles)) handles (list handles))))) (mm-handle-set-undisplayer handle diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 1bfa63663c9..f80560e63c1 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -128,7 +128,7 @@ '((iso-8859-15 . iso-8859-1))) ;; Windows-1252 is actually a superset of Latin-1. See also ;; `gnus-article-dumbquotes-map'. - ,@(unless (mm-coding-system-p 'windows-1252) + ,@(unless (mm-coding-system-p 'windows-1252) (if (mm-coding-system-p 'cp1252) '((windows-1252 . cp1252)) '((windows-1252 . iso-8859-1)))) @@ -263,7 +263,7 @@ Valid elements include: `iso-2022-jp-2' convert ISO-2022-jp to ISO-2022-jp-2 if ISO-2022-jp-2 exists." ) -(defvar mm-iso-8859-15-compatible +(defvar mm-iso-8859-15-compatible '((iso-8859-1 "\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE") (iso-8859-9 "\xA4\xA6\xA8\xB4\xB8\xBC\xBD\xBE\xD0\xDD\xDE\xF0\xFD\xFE")) "ISO-8859-15 exchangeable coding systems and inconvertible characters.") @@ -271,16 +271,16 @@ Valid elements include: (defvar mm-iso-8859-x-to-15-table (and (fboundp 'coding-system-p) (mm-coding-system-p 'iso-8859-15) - (mapcar + (mapcar (lambda (cs) (if (mm-coding-system-p (car cs)) - (let ((c (string-to-char + (let ((c (string-to-char (decode-coding-string "\341" (car cs))))) (cons (char-charset c) (cons - (- (string-to-char + (- (string-to-char (decode-coding-string "\341" 'iso-8859-15)) c) - (string-to-list (decode-coding-string (car (cdr cs)) + (string-to-list (decode-coding-string (car (cdr cs)) (car cs)))))) '(gnus-charset 0))) mm-iso-8859-15-compatible)) @@ -479,8 +479,8 @@ If the charset is `composition', return the actual one." (goto-char (point-min)) (skip-chars-forward "\0-\177") (while (not (eobp)) - (cond - ((not (setq item (assq (char-charset (setq c (char-after))) + (cond + ((not (setq item (assq (char-charset (setq c (char-after))) mm-iso-8859-x-to-15-table))) (forward-char)) ((memq c (cdr (cdr item))) @@ -507,7 +507,7 @@ charset, and a longer list means no appropriate charset." ;; system that has one. (let ((systems (find-coding-systems-region b e))) (when mm-coding-system-priorities - (setq systems + (setq systems (sort systems 'mm-sort-coding-systems-predicate))) ;; Fixme: The `mime-charset' (`x-ctext') of `compound-text' ;; is not in the IANA list. @@ -523,7 +523,7 @@ charset, and a longer list means no appropriate charset." charsets)) ;; Otherwise we're not multibyte, XEmacs or a single coding ;; system won't cover it. - (setq charsets + (setq charsets (mm-delete-duplicates (mapcar 'mm-mime-charset (delq 'ascii @@ -552,7 +552,7 @@ Also bind `default-enable-multibyte-characters' to nil. Equivalent to `progn' in XEmacs" (let ((multibyte (make-symbol "multibyte")) (buffer (make-symbol "buffer"))) - `(if mm-emacs-mule + `(if mm-emacs-mule (let ((,multibyte enable-multibyte-characters) (,buffer (current-buffer))) (unwind-protect diff --git a/lisp/gnus/mm-view.el b/lisp/gnus/mm-view.el index 707bd708459..02827262a84 100644 --- a/lisp/gnus/mm-view.el +++ b/lisp/gnus/mm-view.el @@ -228,8 +228,8 @@ (setq handles gnus-article-mime-handles)) (when handles (setq gnus-article-mime-handles - (nconc gnus-article-mime-handles - (if (listp (car handles)) + (nconc gnus-article-mime-handles + (if (listp (car handles)) handles (list handles)))))) (fundamental-mode) (goto-char (point-min))) @@ -266,8 +266,8 @@ (insert "----------\n\n") (when handles (setq gnus-article-mime-handles - (nconc gnus-article-mime-handles - (if (listp (car handles)) + (nconc gnus-article-mime-handles + (if (listp (car handles)) handles (list handles))))) (mm-handle-set-undisplayer handle diff --git a/lisp/gnus/mml.el b/lisp/gnus/mml.el index e28fa1e9e1e..2dd4cd43f29 100644 --- a/lisp/gnus/mml.el +++ b/lisp/gnus/mml.el @@ -39,7 +39,7 @@ (defvar mml-generate-multipart-alist nil "*Alist of multipart generation functions. Each entry has the form (NAME . FUNCTION), where -NAME is a string containing the name of the part (without the +NAME is a string containing the name of the part (without the leading \"/multipart/\"), FUNCTION is a Lisp function which is called to generate the part. @@ -75,7 +75,7 @@ one charsets.") (defvar mml-generate-mime-preprocess-function nil "A function called before generating a mime part. -The function is called with one parameter, which is the part to be +The function is called with one parameter, which is the part to be generated.") (defvar mml-generate-mime-postprocess-function nil @@ -86,7 +86,7 @@ The function is called with one parameter, which is the generated part.") (defvar mml-buffer-list nil) -(defun mml-generate-new-buffer (name) +(defun mml-generate-new-buffer (name) (let ((buf (generate-new-buffer name))) (push buf mml-buffer-list) buf)) @@ -128,7 +128,7 @@ The function is called with one parameter, which is the generated part.") (setq raw (cdr (assq 'raw tag)) point (point) contents (mml-read-part (eq 'mml (car tag))) - charsets (if raw nil + charsets (if raw nil (mm-find-mime-charset-region point (point)))) (when (and (not raw) (memq nil charsets)) (if (or (memq 'unknown-encoding mml-confirmation-set) @@ -137,7 +137,7 @@ The function is called with one parameter, which is the generated part.") Message contains characters with unknown encoding. Really send?") (set (make-local-variable 'mml-confirmation-set) (push 'unknown-encoding mml-confirmation-set)))) - (if (setq use-ascii + (if (setq use-ascii (or (memq 'use-ascii mml-confirmation-set) (y-or-n-p "Use ASCII as charset?"))) (setq charsets (delq nil charsets)) @@ -169,7 +169,7 @@ A message part needs to be split into %d charset parts. Really send? " (forward-line 1)) (nreverse struct))) -(defun mml-parse-singlepart-with-multiple-charsets +(defun mml-parse-singlepart-with-multiple-charsets (orig-tag beg end &optional use-ascii) (save-excursion (save-restriction @@ -261,7 +261,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (if (re-search-forward "<#\\(/\\)?mml." nil t) (setq count (+ count (if (match-beginning 1) -1 1))) (goto-char (point-max)))) - (buffer-substring-no-properties beg (if (> count 0) + (buffer-substring-no-properties beg (if (> count 0) (point) (match-beginning 0)))) (if (re-search-forward @@ -325,7 +325,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." "<#!+/?\\(part\\|multipart\\|external\\|mml\\)" nil t) (delete-region (+ (match-beginning 0) 2) (+ (match-beginning 0) 3)))))) - (cond + (cond ((eq (car cont) 'mml) (let ((mml-boundary (funcall mml-boundary-function (incf mml-multipart-number))) @@ -338,7 +338,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (let ((mm-7bit-chars (concat mm-7bit-chars "\x1b"))) ;; ignore 0x1b, it is part of iso-2022-jp (setq encoding (mm-body-7-or-8)))) - (t + (t (setq charset (mm-encode-body)) (setq encoding (mm-body-encoding charset (cdr (assq 'encoding cont)))))) @@ -579,7 +579,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (save-excursion (set-buffer (setq buffer (mml-generate-new-buffer " *mml*"))) (mm-insert-part handle) - (if (setq mmlp (equal (mm-handle-media-type handle) + (if (setq mmlp (equal (mm-handle-media-type handle) "message/rfc822")) (mime-to-mml))))) (if mmlp @@ -588,7 +588,7 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." (equal (mm-handle-media-type handle) "text/plain")) (mml-insert-mml-markup handle buffer textp))) (cond - (mmlp + (mmlp (insert-buffer buffer) (goto-char (point-max)) (insert "<#/mml>\n")) @@ -828,12 +828,12 @@ TYPE is the MIME type to use." If RAW, don't highlight the article." (interactive "P") (let ((buf (current-buffer)) - (message-posting-charset (or (gnus-setup-posting-charset + (message-posting-charset (or (gnus-setup-posting-charset (save-restriction (message-narrow-to-headers-or-head) (message-fetch-field "Newsgroups"))) message-posting-charset))) - (switch-to-buffer (get-buffer-create + (switch-to-buffer (get-buffer-create (concat (if raw "*Raw MIME preview of " "*MIME preview of ") (buffer-name)))) (erase-buffer) diff --git a/lisp/gnus/nnagent.el b/lisp/gnus/nnagent.el index b445395e287..8cc48f15f6b 100644 --- a/lisp/gnus/nnagent.el +++ b/lisp/gnus/nnagent.el @@ -67,7 +67,7 @@ (nnagent-active-file ,(gnus-agent-lib-file "active")) (nnagent-newsgroups-file ,(gnus-agent-lib-file "newsgroups")) (nnagent-get-new-mail nil))) - (nnoo-change-server 'nnagent + (nnoo-change-server 'nnagent (nnagent-server server) defs) (let ((dir (gnus-agent-directory)) @@ -155,33 +155,33 @@ (list articles group (nnagent-server server) force))) (deffoo nnagent-request-list (&optional server) - (nnoo-parent-function 'nnagent 'nnml-request-list + (nnoo-parent-function 'nnagent 'nnml-request-list (list (nnagent-server server)))) (deffoo nnagent-request-list-newsgroups (&optional server) - (nnoo-parent-function 'nnagent 'nnml-request-list-newsgroups + (nnoo-parent-function 'nnagent 'nnml-request-list-newsgroups (list (nnagent-server server)))) -(deffoo nnagent-request-move-article +(deffoo nnagent-request-move-article (article group server accept-form &optional last) - (nnoo-parent-function 'nnagent 'nnml-request-move-article - (list article group (nnagent-server server) + (nnoo-parent-function 'nnagent 'nnml-request-move-article + (list article group (nnagent-server server) accept-form last))) (deffoo nnagent-request-rename-group (group new-name &optional server) - (nnoo-parent-function 'nnagent 'nnml-request-rename-group + (nnoo-parent-function 'nnagent 'nnml-request-rename-group (list group new-name (nnagent-server server)))) (deffoo nnagent-request-scan (&optional group server) - (nnoo-parent-function 'nnagent 'nnml-request-scan + (nnoo-parent-function 'nnagent 'nnml-request-scan (list group (nnagent-server server)))) (deffoo nnagent-retrieve-headers (sequence &optional group server fetch-old) - (nnoo-parent-function 'nnagent 'nnml-retrieve-headers + (nnoo-parent-function 'nnagent 'nnml-retrieve-headers (list sequence group (nnagent-server server) fetch-old))) (deffoo nnagent-set-status (article name value &optional group server) - (nnoo-parent-function 'nnagent 'nnml-set-status + (nnoo-parent-function 'nnagent 'nnml-set-status (list article name value group (nnagent-server server)))) (deffoo nnagent-server-opened (&optional server) diff --git a/lisp/gnus/nnbabyl.el b/lisp/gnus/nnbabyl.el index 8389e17fb04..4dd06ea632b 100644 --- a/lisp/gnus/nnbabyl.el +++ b/lisp/gnus/nnbabyl.el @@ -282,8 +282,8 @@ (progn (unless (eq nnmail-expiry-target 'delete) (with-temp-buffer - (nnbabyl-request-article (car articles) - newsgroup server + (nnbabyl-request-article (car articles) + newsgroup server (current-buffer)) (let ((nnml-current-directory nil)) (nnmail-expiry-target-group diff --git a/lisp/gnus/nndoc.el b/lisp/gnus/nndoc.el index 101bb4023f9..3d28f8ea716 100644 --- a/lisp/gnus/nndoc.el +++ b/lisp/gnus/nndoc.el @@ -630,7 +630,7 @@ from the document.") (setq subject (concat " (" (match-string 1) ")")) (when (re-search-forward "^From: \\(.*\\)" nil t) (setq from (concat "<" - (cadr (funcall gnus-extract-address-components + (cadr (funcall gnus-extract-address-components (match-string 1))) ">"))) (if (re-search-forward "^Date: +\\([^(]*\\)" nil t) (setq date (match-string 1)) diff --git a/lisp/gnus/nnfolder.el b/lisp/gnus/nnfolder.el index ea83acf8081..f24e5482cb2 100644 --- a/lisp/gnus/nnfolder.el +++ b/lisp/gnus/nnfolder.el @@ -95,7 +95,7 @@ message, a huge time saver for large mailboxes.") (defvoo nnfolder-scantime-alist nil) (defvoo nnfolder-active-timestamp nil) (defvoo nnfolder-active-file-coding-system mm-text-coding-system) -(defvoo nnfolder-active-file-coding-system-for-write +(defvoo nnfolder-active-file-coding-system-for-write nnmail-active-file-coding-system) (defvoo nnfolder-file-coding-system mm-text-coding-system) (defvoo nnfolder-file-coding-system-for-write nnheader-file-coding-system @@ -189,7 +189,7 @@ If nil, `nnfolder-file-coding-system' is used.") (cons nnfolder-current-group article) (goto-char (point-min)) (cons nnfolder-current-group - (if (search-forward (concat "\n" nnfolder-article-marker) + (if (search-forward (concat "\n" nnfolder-article-marker) nil t) (string-to-int (buffer-substring @@ -313,7 +313,7 @@ If nil, `nnfolder-file-coding-system' is used.") (let ((marker (concat "\n" nnfolder-article-marker)) (number "[0-9]+") numbers) - + (while (and (search-forward marker nil t) (re-search-forward number nil t)) (let ((newnum (string-to-number (match-string 0)))) @@ -352,7 +352,7 @@ If nil, `nnfolder-file-coding-system' is used.") force nnfolder-inhibit-expiry)) (unless (eq nnmail-expiry-target 'delete) (with-temp-buffer - (nnfolder-request-article (car maybe-expirable) + (nnfolder-request-article (car maybe-expirable) newsgroup server (current-buffer)) (let ((nnml-current-directory nil)) (nnmail-expiry-target-group @@ -384,7 +384,7 @@ If nil, `nnfolder-file-coding-system' is used.") (goto-char (point-min)) (while (re-search-forward (concat "^" nnfolder-article-marker) - (save-excursion (and (search-forward "\n\n" nil t) (point))) + (save-excursion (and (search-forward "\n\n" nil t) (point))) t) (delete-region (progn (beginning-of-line) (point)) (progn (forward-line 1) (point)))) @@ -629,7 +629,7 @@ deleted. Point is left where the deleted region was." ;; See whether we need to create the new file. (unless (file-exists-p file) (gnus-make-directory (file-name-directory file)) - (let ((nnmail-file-coding-system + (let ((nnmail-file-coding-system (or nnfolder-file-coding-system-for-write nnfolder-file-coding-system-for-write))) (nnmail-write-region (point-min) (point-min) @@ -746,7 +746,7 @@ deleted. Point is left where the deleted region was." (defun nnfolder-read-folder (group) (let* ((file (nnfolder-group-pathname group)) (buffer (set-buffer - (let ((nnheader-file-coding-system + (let ((nnheader-file-coding-system nnfolder-file-coding-system)) (nnheader-find-file-noselect file))))) (mm-enable-multibyte) ;; Use multibyte buffer for future copying. @@ -886,7 +886,7 @@ This command does not work if you use short group names." (when (buffer-modified-p) (run-hooks 'nnfolder-save-buffer-hook) (gnus-make-directory (file-name-directory (buffer-file-name))) - (let ((coding-system-for-write + (let ((coding-system-for-write (or nnfolder-file-coding-system-for-write nnfolder-file-coding-system))) (save-buffer)))) diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 6a57941f404..145fd994364 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -369,7 +369,7 @@ If EXAMINE is non-nil the group is selected read-only." maxuid (if maxuid (max maxuid uid) uid))) 'UID)) (list (imap-mailbox-get 'exists) minuid maxuid))))) - + (defun nnimap-possibly-change-group (group &optional server) "Make GROUP the current group, and SERVER the current server." (when (nnimap-possibly-change-server server) @@ -598,7 +598,7 @@ If EXAMINE is non-nil the group is selected read-only." (port (if nnimap-server-port (int-to-string nnimap-server-port) "imap")) - (alist (gnus-netrc-machine list (or nnimap-server-address + (alist (gnus-netrc-machine list (or nnimap-server-address nnimap-address server) port "imap")) (user (gnus-netrc-get alist "login")) @@ -683,7 +683,7 @@ function is generally only called when Gnus is shutting down." (insert (with-current-buffer nnimap-server-buffer (nnimap-demule - (if (imap-capability 'IMAP4rev1) + (if (imap-capability 'IMAP4rev1) ;; xxx don't just use car? alist doesn't contain ;; anything else now, but it might... (nth 2 (car (imap-message-get (imap-current-message) 'BODYDETAIL))) @@ -857,7 +857,7 @@ function is generally only called when Gnus is shutting down." (with-current-buffer nnimap-server-buffer (gnus-message 5 "nnimap: Updating info for %s..." (gnus-info-group info)) - + (when (nnimap-mark-permanent-p 'read) (let (seen unseen) ;; read info could contain articles marked unread by other @@ -897,7 +897,7 @@ function is generally only called when Gnus is shutting down." ;; nnimap mark dormant article as ticked too (for other clients) ;; so we remove that mark for gnus since we support dormant (gnus-info-set-marks - info + info (nnimap-update-alist-soft 'tick (gnus-remove-from-range @@ -905,7 +905,7 @@ function is generally only called when Gnus is shutting down." (cdr-safe (assoc 'dormant (gnus-info-marks info)))) (gnus-info-marks info)) t) - + (gnus-message 5 "nnimap: Updating info for %s...done" (gnus-info-group info)) @@ -987,7 +987,7 @@ function is generally only called when Gnus is shutting down." to-groups) (or nnimap-split-crosspost (throw 'split-done to-groups)))))))))) - + (defun nnimap-assoc-match (key alist) (let (element) (while (and alist (not element)) @@ -1000,7 +1000,7 @@ function is generally only called when Gnus is shutting down." (if (and (listp nnimap-split-rule) (listp (car nnimap-split-rule)) (list (cdar nnimap-split-rule)) (listp (cadar nnimap-split-rule))) ;; extended format - (cadr (nnimap-assoc-match inbox (cdr (nnimap-assoc-match + (cadr (nnimap-assoc-match inbox (cdr (nnimap-assoc-match server nnimap-split-rule)))) nnimap-split-rule)) @@ -1056,7 +1056,7 @@ function is generally only called when Gnus is shutting down." (nnimap-before-find-minmax-bugworkaround) (dolist (pattern (nnimap-pattern-to-list-arguments nnimap-list-pattern)) - (dolist (mbx (imap-mailbox-lsub "*" (car pattern) nil + (dolist (mbx (imap-mailbox-lsub "*" (car pattern) nil nnimap-server-buffer)) (or (catch 'found (dolist (mailbox (imap-mailbox-get 'list-flags mbx @@ -1072,7 +1072,7 @@ function is generally only called when Gnus is shutting down." (gnus-message 5 "nnimap: Listing subscribed mailboxes%s%s...done" (if (> (length server) 0) " on " "") server)) t)) - + (deffoo nnimap-request-create-group (group &optional server args) (when (nnimap-possibly-change-server server) (or (imap-mailbox-status group 'uidvalidity nnimap-server-buffer) @@ -1154,7 +1154,7 @@ function is generally only called when Gnus is shutting down." result) (nnimap-request-expire-articles (list article) group server t)) result)))) - + (deffoo nnimap-request-accept-article (group &optional server last) (when (nnimap-possibly-change-server server) (let (uid) @@ -1311,7 +1311,7 @@ sure of changing the value of `foo'." (cdr alist) (setcdr alist (nnimap-remassoc key (cdr alist))) alist))) - + (defun nnimap-update-alist-soft (key value alist) (if value (cons (cons key value) (nnimap-remassoc key alist)) diff --git a/lisp/gnus/nnkiboze.el b/lisp/gnus/nnkiboze.el index 1ad6f8c9c89..58157c0f3ae 100644 --- a/lisp/gnus/nnkiboze.el +++ b/lisp/gnus/nnkiboze.el @@ -149,7 +149,7 @@ nnkiboze-remove-read-articles) (let ((coding-system-for-write nnkiboze-file-coding-system)) (with-temp-file (nnkiboze-nov-file-name) - (let ((cur (current-buffer)) + (let ((cur (current-buffer)) (nnheader-file-coding-system nnkiboze-file-coding-system)) (nnheader-insert-file-contents (nnkiboze-nov-file-name)) (goto-char (point-min)) diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index 60980e39bb9..99c856a702c 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el @@ -316,7 +316,7 @@ the following: GROUP: Mail will be stored in GROUP (a string). \(FIELD VALUE [- RESTRICT [- RESTRICT [...]]] SPLIT): If the message - field FIELD (a regexp) contains VALUE (a regexp), store the messages + field FIELD (a regexp) contains VALUE (a regexp), store the messages as specified by SPLIT. If RESTRICT (a regexp) matches some string after FIELD and before the end of the matched VALUE, return nil, otherwise process SPLIT. Multiple RESTRICTs add up, further @@ -364,12 +364,12 @@ Example: (any \"procmail@informatik\\\\.rwth-aachen\\\\.de\" \"procmail.list\") (any \"SmartList@informatik\\\\.rwth-aachen\\\\.de\" \"SmartList.list\") ;; Both lists below have the same suffix, so prevent - ;; cross-posting to mkpkg.list of messages posted only to + ;; cross-posting to mkpkg.list of messages posted only to ;; the bugs- list, but allow cross-posting when the ;; message was really cross-posted. (any \"bugs-mypackage@somewhere\" \"mypkg.bugs\") (any \"mypackage@somewhere\" - \"bugs-mypackage\" \"mypkg.list\") - ;; + ;; ;; People... (any \"larsi@ifi\\\\.uio\\\\.no\" \"people.Lars Magne Ingebrigtsen\")) ;; Unmatched mail goes to the catch all group. @@ -1047,7 +1047,7 @@ Return the number of characters in the body." (let (lines chars) (save-excursion (goto-char (point-min)) - (unless (search-forward "\n\n" nil t) + (unless (search-forward "\n\n" nil t) (goto-char (point-max)) (insert "\n")) (setq chars (- (point-max) (point))) diff --git a/lisp/gnus/nnmbox.el b/lisp/gnus/nnmbox.el index 555d0a793ce..8624fb3c376 100644 --- a/lisp/gnus/nnmbox.el +++ b/lisp/gnus/nnmbox.el @@ -189,7 +189,7 @@ (car active) (cdr active) group))))) (defun nnmbox-save-buffer () - (let ((coding-system-for-write + (let ((coding-system-for-write (or nnmbox-file-coding-system-for-write nnmbox-file-coding-system))) (save-buffer))) @@ -264,8 +264,8 @@ (progn (unless (eq nnmail-expiry-target 'delete) (with-temp-buffer - (nnmbox-request-article (car articles) - newsgroup server + (nnmbox-request-article (car articles) + newsgroup server (current-buffer)) (let ((nnml-current-directory nil)) (nnmail-expiry-target-group diff --git a/lisp/gnus/nnml.el b/lisp/gnus/nnml.el index 52624a71c6e..ad7d040560a 100644 --- a/lisp/gnus/nnml.el +++ b/lisp/gnus/nnml.el @@ -323,8 +323,8 @@ all. This may very well take some time.") (and (nnml-deletable-article-p group article) (nnml-request-article article group server) - (let (nnml-current-directory - nnml-current-group + (let (nnml-current-directory + nnml-current-group nnml-article-file-alist) (save-excursion (set-buffer buf) diff --git a/lisp/gnus/nnslashdot.el b/lisp/gnus/nnslashdot.el index 8290b2c73b1..45a3db8737c 100644 --- a/lisp/gnus/nnslashdot.el +++ b/lisp/gnus/nnslashdot.el @@ -98,7 +98,7 @@ (entry (assoc group nnslashdot-groups)) (sid (nth 2 entry)) (first-comments t) - headers article subject score from date lines parent point cid + headers article subject score from date lines parent point cid s startats changed) (save-excursion (set-buffer nnslashdot-buffer) @@ -189,7 +189,7 @@ from date (concat "<" (nnslashdot-sid-strip sid) "%" cid "@slashdot>") (if parent - (concat "<" (nnslashdot-sid-strip sid) "%" + (concat "<" (nnslashdot-sid-strip sid) "%" parent "@slashdot>") "") 0 lines nil nil)) @@ -197,7 +197,7 @@ (while (and articles (<= (car articles) article)) (pop articles)) (setq article (1+ article))) - (if nnslashdot-threaded + (if nnslashdot-threaded (progn (setq start (pop startats)) (if start (setq start (+ start 2)))) @@ -252,7 +252,7 @@ (when (numberp article) (if (= article 1) (progn - (re-search-forward + (re-search-forward "Posted by") (search-forward "<BR>") (setq contents @@ -262,7 +262,7 @@ (re-search-forward "< [ \t\r\n]*<A HREF=\"\\(\\(http:\\)?//slashdot\\.org\\)?/article") (match-beginning 0))))) - (setq cid (cdr (assq article + (setq cid (cdr (assq article (nth 4 (assoc group nnslashdot-groups))))) (search-forward (format "<a name=\"%s\">" cid)) (setq contents diff --git a/lisp/gnus/nnsoup.el b/lisp/gnus/nnsoup.el index 99edd79b6dd..eaa56aa934f 100644 --- a/lisp/gnus/nnsoup.el +++ b/lisp/gnus/nnsoup.el @@ -257,7 +257,7 @@ backend for the messages.") (nth 1 (nnsoup-article-to-area article nnsoup-current-group)))))) (cond ((= kind ?m) 'mail) - ((= kind ?n) 'news) + ((= kind ?n) 'news) (t 'unknown))))) (deffoo nnsoup-close-group (group &optional server) diff --git a/lisp/gnus/nnspool.el b/lisp/gnus/nnspool.el index 3111bc842ec..a21bb648295 100644 --- a/lisp/gnus/nnspool.el +++ b/lisp/gnus/nnspool.el @@ -1,7 +1,7 @@ ;;; nnspool.el --- spool access for GNU Emacs ;; Copyright (C) 1988, 1989, 1990, 1993, 1994, 1995, 1996, 1997, 1998, -;; 2000, 2002 +;; 2000, 2002 ;; Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@flab.flab.fujitsu.junet> diff --git a/lisp/gnus/nntp.el b/lisp/gnus/nntp.el index ad3ed90cc2c..9d5c600a080 100644 --- a/lisp/gnus/nntp.el +++ b/lisp/gnus/nntp.el @@ -350,8 +350,8 @@ noticing asynchronous data.") (wait-for (nntp-wait-for process wait-for buffer decode)) (t t))) - (error - (nnheader-report 'nntp "Couldn't open connection to %s: %s" + (error + (nnheader-report 'nntp "Couldn't open connection to %s: %s" address err)) (quit (message "Quit retrieving data from nntp") @@ -1179,11 +1179,11 @@ password contained in '~/.nntp-authinfo'." (setq in-process-buffer-p (stringp nntp-server-xover)) (nntp-send-xover-command first (car articles)) (setq articles (cdr articles)) - + (when (and nntp-server-xover in-process-buffer-p) ;; Don't count tried request. (setq count (1+ count)) - + ;; Every 400 requests we have to read the stream in ;; order to avoid deadlocks. (when (or (null articles) ;All requests have been sent. diff --git a/lisp/gnus/nnvirtual.el b/lisp/gnus/nnvirtual.el index ed89fec04af..0b7091fec8e 100644 --- a/lisp/gnus/nnvirtual.el +++ b/lisp/gnus/nnvirtual.el @@ -362,7 +362,7 @@ component group will show up when you enter the virtual group.") (gnus-request-post (gnus-find-method-for-group group))))) -(deffoo nnvirtual-request-expire-articles (articles group +(deffoo nnvirtual-request-expire-articles (articles group &optional server force) (nnvirtual-possibly-change-server server) (setq nnvirtual-component-groups diff --git a/lisp/gnus/nnwarchive.el b/lisp/gnus/nnwarchive.el index 8e2bd65aa8a..aae57a431f6 100644 --- a/lisp/gnus/nnwarchive.el +++ b/lisp/gnus/nnwarchive.el @@ -26,7 +26,7 @@ ;; Note: You need to have `url' (w3 0.46) or greater version ;; installed for this backend to work. -;; Todo: +;; Todo: ;; 1. To support more web archives. ;; 2. Generalize webmail to other MHonArc archive. @@ -60,20 +60,20 @@ (defvar nnwarchive-type-definition '((egroups (address . "www.egroups.com") - (open-url - "http://www.egroups.com/login.cgi?&login_email=%s&login_password=%s" + (open-url + "http://www.egroups.com/login.cgi?&login_email=%s&login_password=%s" nnwarchive-login nnwarchive-passwd) - (list-url + (list-url "http://www.egroups.com/mygroups") (list-dissect . nnwarchive-egroups-list) (list-groups . nnwarchive-egroups-list-groups) - (xover-url + (xover-url "http://www.egroups.com/messages/%s/%d" group aux) - (xover-last-url + (xover-last-url "http://www.egroups.com/messages/%s/" group) (xover-page-size . 13) (xover-dissect . nnwarchive-egroups-xover) - (article-url + (article-url "http://www.egroups.com/message/%s/%d?source=1" group article) (article-dissect . nnwarchive-egroups-article) (authentication . t) @@ -82,17 +82,17 @@ (mail-archive (address . "www.mail-archive.com") (open-url) - (list-url + (list-url "http://www.mail-archive.com/lists.html") (list-dissect . nnwarchive-mail-archive-list) (list-groups . nnwarchive-mail-archive-list-groups) - (xover-url + (xover-url "http://www.mail-archive.com/%s/mail%d.html" group aux) - (xover-last-url + (xover-last-url "http://www.mail-archive.com/%s/maillist.html" group) (xover-page-size) (xover-dissect . nnwarchive-mail-archive-xover) - (article-url + (article-url "http://www.mail-archive.com/%s/msg%05d.html" group article1) (article-dissect . nnwarchive-mail-archive-article) (xover-files . nnwarchive-mail-archive-xover-files) @@ -163,12 +163,12 @@ (let ((defs (cdr (assq type nnwarchive-type-definition))) def) (dolist (def defs) - (set (intern (concat "nnwarchive-" (symbol-name (car def)))) + (set (intern (concat "nnwarchive-" (symbol-name (car def)))) (cdr def))))) (defmacro nnwarchive-backlog (&rest form) `(let ((gnus-keep-backlog nnwarchive-keep-backlog) - (gnus-backlog-buffer + (gnus-backlog-buffer (format " *nnwarchive backlog %s*" nnwarchive-address)) (gnus-backlog-articles nnwarchive-backlog-articles) (gnus-backlog-hashtb nnwarchive-backlog-hashtb)) @@ -183,10 +183,10 @@ (nnwarchive-backlog (gnus-backlog-enter-article group number buffer))) -(defun nnwarchive-get-article (article &optional group server buffer) +(defun nnwarchive-get-article (article &optional group server buffer) (if (numberp article) (if (nnwarchive-backlog - (gnus-backlog-request-article group article + (gnus-backlog-request-article group article (or buffer nntp-server-buffer))) (cons group article) (let (contents) @@ -298,7 +298,7 @@ (setq nnwarchive-passwd (or nnwarchive-passwd (mail-source-read-passwd - (format "Password for %s at %s: " + (format "Password for %s at %s: " nnwarchive-login server))))) (unless nnwarchive-groups (nnwarchive-read-groups)) @@ -322,7 +322,7 @@ (nnwarchive-open-server server))) (defun nnwarchive-read-groups () - (let ((file (expand-file-name (concat "groups-" nnwarchive-address) + (let ((file (expand-file-name (concat "groups-" nnwarchive-address) nnwarchive-directory))) (when (file-exists-p file) (with-temp-buffer @@ -331,14 +331,14 @@ (setq nnwarchive-groups (read (current-buffer))))))) (defun nnwarchive-write-groups () - (with-temp-file (expand-file-name (concat "groups-" nnwarchive-address) + (with-temp-file (expand-file-name (concat "groups-" nnwarchive-address) nnwarchive-directory) (prin1 nnwarchive-groups (current-buffer)))) (defun nnwarchive-init (server) "Initialize buffers and such." (let ((type (intern server)) (defs nnwarchive-type-definition) def) - (cond + (cond ((equal server "") (setq type nnwarchive-default-type)) ((assq type nnwarchive-type-definition) t) @@ -390,13 +390,13 @@ (mm-with-unibyte-current-buffer (let ((url-confirmation-func 'identity) (url-cookie-multiple-line nil)) - (cond + (cond ((eq (car xurl) 'post) (pop xurl) (nnwarchive-fetch-form (car xurl) (nnwarchive-eval (cdr xurl)))) (t (nnweb-insert (apply 'format (nnwarchive-eval xurl)))))))) - + (defun nnwarchive-generate-active () (save-excursion (set-buffer nntp-server-buffer) @@ -420,12 +420,12 @@ (save-excursion (let (articles) (set-buffer nnwarchive-buffer) - (dolist (group groups) + (dolist (group groups) (erase-buffer) (nnwarchive-url nnwarchive-xover-last-url) (goto-char (point-min)) (when (re-search-forward "of \\([0-9]+\\)[ \t\n\r]*</title>" nil t) - (setq articles (string-to-number (match-string 1)))) + (setq articles (string-to-number (match-string 1)))) (let ((elem (assoc group nnwarchive-groups))) (if elem (setcar (cdr elem) articles) @@ -441,7 +441,7 @@ (let ((case-fold-search t) group description elem articles) (goto-char (point-min)) - (while + (while (re-search-forward "href=\"/group/\\([^/\"\> ]+\\)" nil t) (setq group (match-string 1) description (match-string 2)) @@ -469,12 +469,12 @@ (push (cons article (make-full-mail-header - article + article (nnweb-decode-entities-string subject) (nnweb-decode-entities-string from) date (concat "<" group "%" - (number-to-string article) + (number-to-string article) "@egroup.com>") "" 0 0 "")) nnwarchive-headers)))) @@ -523,7 +523,7 @@ (let ((elem (assoc group nnwarchive-headers-cache))) (if elem (setcdr elem nnwarchive-headers) - (push (cons group nnwarchive-headers) + (push (cons group nnwarchive-headers) nnwarchive-headers-cache))))))) (defun nnwarchive-mail-archive-list () @@ -558,7 +558,7 @@ (push (cons article (make-full-mail-header - article + article (nnweb-decode-entities-string subject) (nnweb-decode-entities-string from) date @@ -608,14 +608,14 @@ (insert from-r13) (let ((message-caesar-translation-table (or nnwarchive-caesar-translation-table - (setq nnwarchive-caesar-translation-table + (setq nnwarchive-caesar-translation-table (nnwarchive-make-caesar-translation-table))))) (message-caesar-region (point-min) (point-max)) (buffer-string))))) (defun nnwarchive-mail-archive-article (group article) - (let (p refs url mime e - from subject date id + (let (p refs url mime e + from subject date id done (case-fold-search t)) (save-restriction @@ -630,9 +630,9 @@ (goto-char (point-min)) (while (search-forward " -->" nil t) (replace-match "")) - (setq from + (setq from (or (mail-fetch-field "from") - (nnwarchive-from-r13 + (nnwarchive-from-r13 (mail-fetch-field "from-r13")))) (setq date (mail-fetch-field "date")) (setq id (mail-fetch-field "message-id")) @@ -667,7 +667,7 @@ (goto-char (point-max)) (widen) (insert "\n")) - (setq p (point)) + (setq p (point)) (when (search-forward "X-Body-of-Message" nil t) (forward-line) (delete-region p (point)) @@ -679,8 +679,8 @@ (if (> (skip-chars-forward "\040\n\r\t") 0) (delete-region (point-min) (point))) (while (not (eobp)) - (cond - ((looking-at "<PRE>\r?\n?") + (cond + ((looking-at "<PRE>\r?\n?") (delete-region (match-beginning 0) (match-end 0)) (setq p (point)) (when (search-forward "</PRE>" nil t) @@ -692,15 +692,15 @@ (goto-char (point-max))))) ((looking-at "<P><A HREF=\"\\([^\"]+\\)") (setq url (match-string 1)) - (delete-region (match-beginning 0) + (delete-region (match-beginning 0) (progn (forward-line) (point))) - ;; I hate to download the url encode it, then immediately + ;; I hate to download the url encode it, then immediately ;; decode it. ;; FixMe: Find a better solution to attach the URL. ;; Maybe do some hack in external part of mml-generate-mim-1. (insert "<#part>" "\n--\nExternal: \n" - (format "<URL:http://www.mail-archive.com/%s/%s>" + (format "<URL:http://www.mail-archive.com/%s/%s>" group url) "\n--\n" "<#/part>") @@ -709,8 +709,8 @@ (setq p (point)) (insert "<#part type=\"text/html\" disposition=inline>") (goto-char - (if (re-search-forward - "[\040\n\r\t]*<PRE>\\|[\040\n\r\t]*<P><A HREF=\"" + (if (re-search-forward + "[\040\n\r\t]*<PRE>\\|[\040\n\r\t]*<P><A HREF=\"" nil t) (match-beginning 0) (point-max))) @@ -736,7 +736,7 @@ (insert " " (pop refs))) (insert "\n")) (when mime - (unless (looking-at "$") + (unless (looking-at "$") (search-forward "\n\n" nil t) (forward-line -1)) (narrow-to-region (point) (point-max)) diff --git a/lisp/gnus/rfc1843.el b/lisp/gnus/rfc1843.el index 484f0f29cf4..e34957ac962 100644 --- a/lisp/gnus/rfc1843.el +++ b/lisp/gnus/rfc1843.el @@ -88,7 +88,7 @@ ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc" rfc1843-hzp-word-regexp rfc1843-word-regexp) (point-max) t) ;;; Text with extents may cause XEmacs crash - (setq str (buffer-substring-no-properties + (setq str (buffer-substring-no-properties (match-beginning 1) (match-end 1))) (setq firstc (aref str 0)) @@ -145,7 +145,7 @@ ftp://ftp.math.psu.edu/pub/simpson/chinese/hzp/hzp.doc" (ct (message-fetch-field "Content-Type" t)) (ctl (and ct (ignore-errors (mail-header-parse-content-type ct))))) - (if (and ctl (not (string-match "/" (car ctl)))) + (if (and ctl (not (string-match "/" (car ctl)))) (setq ctl nil)) (goto-char (point-max)) (widen) diff --git a/lisp/gnus/rfc2045.el b/lisp/gnus/rfc2045.el index ff7716aa074..bce3b8a55d9 100644 --- a/lisp/gnus/rfc2045.el +++ b/lisp/gnus/rfc2045.el @@ -19,7 +19,7 @@ ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, ;; Boston, MA 02111-1307, USA. - + ;; RFC 2045 is: "Multipurpose Internet Mail Extensions (MIME) Part ;; One: Format of Internet Message Bodies". diff --git a/lisp/gnus/rfc2104.el b/lisp/gnus/rfc2104.el index 64dbe53ea3e..5496a4f81bf 100644 --- a/lisp/gnus/rfc2104.el +++ b/lisp/gnus/rfc2104.el @@ -53,7 +53,7 @@ ;;; 2000-05-12 added sha-1 example, added test case reference ;;; Code: - + (eval-when-compile (require 'cl)) ;; Magic character for inner HMAC round. 0x36 == 54 == '6' @@ -66,7 +66,7 @@ (defconst rfc2104-zero ?\x00) ;; Alist for converting hex to decimal. -(defconst rfc2104-hex-alist +(defconst rfc2104-hex-alist '((?0 . 0) (?a . 10) (?A . 10) (?1 . 1) (?b . 11) (?B . 11) (?2 . 2) (?c . 12) (?C . 12) @@ -95,7 +95,7 @@ (defun rfc2104-hash (hash block-length hash-length key text) (let* (;; if key is longer than B, reset it to HASH(key) - (key (if (> (length key) block-length) + (key (if (> (length key) block-length) (funcall hash key) key)) (k_ipad (append key nil)) (k_opad (append key nil))) diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 9757c234162..a300cdef558 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -83,7 +83,7 @@ (define-category ?| "While filling, we can break a line at this character.") ;; For indentation calculation. -(define-category ? +(define-category ? "This character counts as a space for indentation purposes.") ;; Keep the following for `kinsoku' processing. See comments in @@ -557,7 +557,7 @@ ;; ?K is double width, ?k isn't specified (modify-category-entry (decode-char 'ucs c) ?k) (modify-category-entry (decode-char 'ucs c) ?j) - (modify-category-entry (decode-char 'ucs c) ?\|) + (modify-category-entry (decode-char 'ucs c) ?\|) (setq c (1+ c)))) ;; Hiragana block @@ -566,7 +566,7 @@ ;; ?H is actually defined to be double width (modify-category-entry (decode-char 'ucs c) ?H) ;;(modify-category-entry (decode-char 'ucs c) ?j) - (modify-category-entry (decode-char 'ucs c) ?\|) + (modify-category-entry (decode-char 'ucs c) ?\|) (setq c (1+ c)))) ;; JISX0208 @@ -675,7 +675,7 @@ ("(1PRS]`(B-(1d(B" "w" ?1) ; vowel base ("(1QT(B-(1W[m(B" "w" ?2) ; vowel upper ("(1XY(B" "w" ?3) ; vowel lower - ("(1h(B-(1l(B" "w" ?4) ; tone mark + ("(1h(B-(1l(B" "w" ?4) ; tone mark ("(1\(B" "w" ?9) ; semivowel lower ("(1p(B-(1y(B" "w" ?6) ; digit ("(1Of(B" "_" ?5) ; symbol @@ -684,7 +684,7 @@ ("$,1DPDRDSD]D`(B-$,1Dd(B" "w" ?1) ; vowel base ("$,1DQDT(B-$,1DWD[Dm(B" "w" ?2) ; vowel upper ("$,1DXDY(B" "w" ?3) ; vowel lower - ("$,1Dh(B-$,1Dk(B" "w" ?4) ; tone mark + ("$,1Dh(B-$,1Dk(B" "w" ?4) ; tone mark ("$,1D\D](B" "w" ?9) ; semivowel lower ("$,1Dp(B-$,1Dy(B" "w" ?6) ; digit ("$,1DODf(B" "_" ?5) ; symbol @@ -722,7 +722,7 @@ (",TDFPRS`(B-,Te(B" "w" ?1) ; vowel base (",TQT(B-,TWgn(B" "w" ?2) ; vowel upper (",TX(B-,TZ(B" "w" ?3) ; vowel lower - (",Th(B-,Tm(B" "w" ?4) ; tone mark + (",Th(B-,Tm(B" "w" ?4) ; tone mark (",Tp(B-,Ty(B" "w" ?6) ; digit (",TOf_oz{(B" "_" ?5) ; symbol ;; Unicode equivalents @@ -730,7 +730,7 @@ ("$,1C$C&C0C2C3C@(B-$,1CE(B" "w" ?1) ; vowel base ("$,1C1C4(B-$,1C7CGCN(B" "w" ?2) ; vowel upper ("$,1C8(B-$,1C:(B" "w" ?3) ; vowel lower - ("$,1CH(B-$,1CM(B" "w" ?4) ; tone mark + ("$,1CH(B-$,1CM(B" "w" ?4) ; tone mark ("$,1CP(B-$,1CY(B" "w" ?6) ; digit ("$,1C/CFC?COCZC[(B" "_" ?5) ; symbol )) @@ -1054,7 +1054,7 @@ (and (>= c #x048c) (<= c #x04be)) (and (>= c #x04d0) (<= c #x04f4))) (set-case-syntax-pair - (decode-char 'ucs c) (decode-char 'ucs (1+ c)) tbl)) + (decode-char 'ucs c) (decode-char 'ucs (1+ c)) tbl)) (setq c (1+ c))) (set-case-syntax-pair ?$,1*!(B ?$,1*"(B tbl) (set-case-syntax-pair ?$,1*#(B ?$,1*$(B tbl) diff --git a/lisp/international/code-pages.el b/lisp/international/code-pages.el index 3af57bc775b..c99fd03e6f7 100644 --- a/lisp/international/code-pages.el +++ b/lisp/international/code-pages.el @@ -2362,7 +2362,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, nil nil nil - ?\ + ?\ ?\ภ?\ข ?\ฃ @@ -2493,7 +2493,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, ?\Å¥ ?\ž ?\ź - ?\ + ?\ ?\ˇ ?\˘ ?\Å @@ -2625,7 +2625,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, ?\Ñœ ?\Ñ› ?\ÑŸ - ?\ + ?\ ?\ÐŽ ?\Ñž ?\Ј @@ -2757,7 +2757,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, nil nil ?\Ÿ - ?\ + ?\ ?\¡ ?\¢ ?\£ @@ -2888,7 +2888,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, nil nil nil - ?\ + ?\ ?\Î… ?\Ά ?\£ @@ -3020,7 +3020,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, nil nil ?\Ÿ - ?\ + ?\ ?\¡ ?\¢ ?\£ @@ -3152,7 +3152,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, nil nil nil - ?\ + ?\ ?\¡ ?\¢ ?\£ @@ -3284,7 +3284,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, ?\Ø¢ ?\Ø£ ?\Ÿ - ?\ + ?\ ?\ؤ ?\Ø¥ ?\£ @@ -3416,7 +3416,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, nil nil nil - ?\ + ?\ nil ?\¢ ?\£ @@ -3547,7 +3547,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, nil nil ?\Ÿ - ?\ + ?\ ?\¡ ?\¢ ?\£ @@ -3646,7 +3646,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, (cp-make-coding-system next - [?\ + [?\ ?\À ?\à ?\ @@ -3916,7 +3916,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, ;; Equivalent National Standard: ;; Romanian Standard SR 14111:1998, Romanian Standards Institution ;; (ASRO). - + ;; Intended usage: ;; "This set of coded graphic characters is intended for use in data and @@ -3928,9 +3928,9 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, ;; Slovenian. This set of coded graphic characters may be regarded as a ;; version of an 8-bit code according to ISO/IEC 2022 or ISO/IEC 4873 at ;; level 1." [ISO 8859-16:2001(E), p. 1] - + ;; This charset is suitable for use in MIME text body parts. - + ;; ISO 8859-16 was primarily designed for single-byte encoding the Romanian ;; language. The UTF-8 charset is the preferred and in today's MIME software ;; more widely implemented encoding suitable for Romanian. @@ -3938,7 +3938,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, iso-latin-10 ; consistent with, e.g. Latin-1 [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil - ?\ + ?\ ?\Ä„ ?\Ä… ?\Å @@ -4047,7 +4047,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, iso-8859-6 [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil - ?\ + ?\ ?\¤ ?\ØŒ ?\ @@ -4109,7 +4109,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, iso-latin-6 [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil - ?\ + ?\ ?\Ä„ ?\Ä’ ?\Ä¢ @@ -4215,7 +4215,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, iso-latin-7 [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil - ?\ + ?\ ?\¡ ?\¢ ?\£ @@ -4320,8 +4320,8 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, (cp-make-coding-system georgian-ps ; used by glibc for ka_GE - [?\€ - ?\ + [?\ + ?\ ?\‚ ?\Æ’ ?\„ @@ -4333,10 +4333,10 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, ?\Å ?\‹ ?\Å’ - ?\ - ?\ÂŽ - ?\ - ?\ + ?\ + ?\ + ?\ + ?\ ?\‘ ?\’ ?\“ @@ -4349,10 +4349,10 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, ?\Å¡ ?\› ?\Å“ - ?\ - ?\ž + ?\ + ?\ ?\Ÿ - ?\ + ?\ ?\¡ ?\¢ ?\£ @@ -4730,7 +4730,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, ?┼ ?â•£ ?â•‘ ?â•š ?â•” ?â•© ?╦ ?â• ?â• ?╬ ?â” ?â–‘ ?â–’ ?â–“ ?│ ?┤ ?â„– ?§ ?â•— ?â• ?┘ ?┌ ?â–ˆ ?â–„ ?â–Œ ?â– ?â–€ ?α ?β ?Γ ?Ï€ ?Σ ?σ ?μ ?Ï„ ?Φ ?Θ ?Ω ?δ ?∞ ?∅ ?∈ ?∩ ?≡ ?± ?≥ ?≤ ?⌠?⌡ ?÷ ?≈ ?° ?∙ ?· ?√ ?â¿ ?² ?â– ? ]) - + ;; Suggested by Anton Zinoviev <anton@lml.bas.bg>: similar to CP1251 ;; and used for some non-Slavic Cyrillic languages. Table found at ;; <URL:ftp://ftp.logic.ru/pub/logic/linux/cyr-asian/PT154>. See also @@ -4744,7 +4744,7 @@ corresponding args of `make-coding-system'. If MNEMONIC isn't given, ?Е ?Ж ?З ?И ?Й ?К ?Л ?Ðœ ?Ð ?О ?П ?Ð ?С ?Т ?У ?Ф ?Ð¥ ?Ц ?Ч ?Ш ?Щ ?Ъ ?Ы ?Ь ?Ð ?Ю ?Я ?а ?б ?в ?г ?д ?е ?ж ?з ?и ?й ?к ?л ?м ?н ?о ?п ?Ñ€ ?Ñ ?Ñ‚ ?у ?Ñ„ ?Ñ… ?ц ?ч ?ш ?щ ?ÑŠ ?Ñ‹ ?ÑŒ ?Ñ ?ÑŽ ?Ñ]) - + (cp-make-coding-system iso-8859-11 [nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil diff --git a/lisp/international/codepage.el b/lisp/international/codepage.el index 8b06d90c563..1b6caaebd5b 100644 --- a/lisp/international/codepage.el +++ b/lisp/international/codepage.el @@ -37,7 +37,7 @@ ;; terminal display and input methods. ;; ;; Thanks to Ken'ichi Handa <handa@etl.go.jp> for writing the CCL -;; encoders/decoders, and for help in debugging this code. +;; encoders/decoders, and for help in debugging this code. ;;; Code: diff --git a/lisp/international/encoded-kb.el b/lisp/international/encoded-kb.el index 6adeeb0a6a3..6d8982b4934 100644 --- a/lisp/international/encoded-kb.el +++ b/lisp/international/encoded-kb.el @@ -253,7 +253,7 @@ The following key sequence may cause multilingual text insertion." ((eq encoded-kbd-coding 'iso2022-7) (define-key encoded-kbd-mode-map "\e" 'encoded-kbd-iso2022-esc-prefix)) - + ((eq encoded-kbd-coding 'iso2022-8) (define-key encoded-kbd-mode-map (vector ?\216) 'encoded-kbd-self-insert-iso2022-8bit) @@ -307,13 +307,13 @@ as a multilingual text encoded in a coding system set by (let ((coding (keyboard-coding-system))) (setq saved-input-mode (current-input-mode)) (cond ((null coding) - (setq encoded-kbd-mode nil) + (setq encoded-kbd-mode nil) (error "No coding system for keyboard input is set")) ((= (coding-system-type coding) 1) ; SJIS (set-input-mode (nth 0 saved-input-mode) (nth 1 saved-input-mode) - 'use-8th-bit (nth 3 saved-input-mode)) + 'use-8th-bit (nth 3 saved-input-mode)) (setq encoded-kbd-coding 'sjis)) ((= (coding-system-type coding) 2) ; ISO2022 @@ -321,7 +321,7 @@ as a multilingual text encoded in a coding system set by (setq encoded-kbd-coding 'iso2022-7) (set-input-mode (nth 0 saved-input-mode) (nth 1 saved-input-mode) - 'use-8th-bit (nth 3 saved-input-mode)) + 'use-8th-bit (nth 3 saved-input-mode)) (setq encoded-kbd-coding 'iso2022-8)) (setq encoded-kbd-iso2022-designations (make-vector 4 nil)) (let ((flags (coding-system-flags coding)) @@ -341,13 +341,13 @@ as a multilingual text encoded in a coding system set by ((= (coding-system-type coding) 3) ; BIG5 (set-input-mode (nth 0 saved-input-mode) (nth 1 saved-input-mode) - 'use-8th-bit (nth 3 saved-input-mode)) + 'use-8th-bit (nth 3 saved-input-mode)) (setq encoded-kbd-coding 'big5)) ((= (coding-system-type coding) 4) ; CCL based coding (set-input-mode (nth 0 saved-input-mode) (nth 1 saved-input-mode) - 'use-8th-bit (nth 3 saved-input-mode)) + 'use-8th-bit (nth 3 saved-input-mode)) (setq encoded-kbd-coding 'ccl)) (t diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 53cf2479ad2..f845837c8db 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -432,7 +432,7 @@ variable `x-font-name-charset-alist'), add that information to FONTLIST." (or (assq charset fontlist) (setq fontlist (cons (cons charset ascii-font-spec) fontlist)))))))) - + fontlist)) (defun fontset-name-p (fontset) @@ -510,7 +510,7 @@ It returns a name of the created fontset." (name (match-string 0 fontset-spec)) xlfd-fields charset fontlist ascii-font) (if (query-fontset name) - (or noerror + (or noerror (error "Fontset \"%s\" already exists" name)) (setq xlfd-fields (x-decompose-font-name name)) (or xlfd-fields diff --git a/lisp/international/iso-acc.el b/lisp/international/iso-acc.el index 10e587e52f9..840a564800d 100644 --- a/lisp/international/iso-acc.el +++ b/lisp/international/iso-acc.el @@ -46,14 +46,14 @@ ;; , (cedilla) -> cedilla under the character (some languages only) ;; ;; The action taken depends on the key that follows the pseudo accent. -;; In general: +;; In general: ;; ;; pseudo-accent + appropriate letter -> accented letter ;; pseudo-accent + space -> pseudo-accent (except comma and period) ;; pseudo-accent + pseudo-accent -> accent (if available) ;; pseudo-accent + other -> pseudo-accent + other ;; -;; If the pseudo-accent is followed by anything else than a +;; If the pseudo-accent is followed by anything else than a ;; self-insert-command, the dead-key code is terminated, the ;; pseudo-accent inserted 'as is' and the bell is rung to signal this. ;; @@ -110,7 +110,7 @@ (?^ (?A . ?\302) (?E . ?\312) (?I . ?\316) (?O . ?\324) (?U . ?\333) (?a . ?\342) (?e . ?\352) (?i . ?\356) (?o . ?\364) (?u . ?\373) (?\ . ?^)) - (?\" (?E . ?\313) (?I . ?\317) + (?\" (?E . ?\313) (?I . ?\317) (?e . ?\353) (?i . ?\357) (?\ . ?\")) (?~ (?< . ?\253) (?> . ?\273) (?C . ?\307) (?c . ?\347) @@ -155,7 +155,7 @@ (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) (?Y . ?\335) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372) (?y . ?\375) (?' . ?\264) - (?\ . ?')) + (?\ . ?')) (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322) (?U . ?\331) (?a . ?\340) (?e . ?\350) (?i . ?\354) (?o . ?\362) (?u . ?\371) (?` . ?`) (?\ . ?`)) @@ -182,7 +182,7 @@ (?a . ?\341) (?c . ?\346) (?d . ?\360) (?e . ?\351) (?i . ?\355) (?l . ?\345) (?n . ?\361) (?o . ?\363) (?r . ?\340) (?s . ?\266) (?u . ?\372) (?y . ?\375) (?z . ?\274) - (?' . ?\264) (?\ . ?')) + (?' . ?\264) (?\ . ?')) (?` (?A . ?\241) (?C . ?\307) (?E . ?\312) (?L . ?\243) (?S . ?\252) (?T . ?\336) (?Z . ?\257) (?a . ?\261) (?l . ?\263) (?c . ?\347) (?e . ?\352) (?s . ?\272) @@ -211,7 +211,7 @@ ("latin-3" latin-iso8859-3 (?' (?A . ?\301) (?E . ?\311) (?I . ?\315) (?O . ?\323) (?U . ?\332) (?a . ?\341) (?e . ?\351) (?i . ?\355) (?o . ?\363) (?u . ?\372) - (?' . ?\264) (?\ . ?')) + (?' . ?\264) (?\ . ?')) (?` (?A . ?\300) (?E . ?\310) (?I . ?\314) (?O . ?\322) (?U . ?\331) (?a . ?\340) (?e . ?\350) (?i . ?\354) (?o . ?\362) (?u . ?\371) (?` . ?`) (?\ . ?`)) @@ -229,7 +229,7 @@ (?$ . ?\245) (?S . ?\252) (?s . ?\272) (?G . ?\253) (?g . ?\273) (?U . ?\335) (?u . ?\375) (?` . ?\242) (?~ . ?\270) (?\ . ?~)) - (?/ (?C . ?\305) (?G . ?\325) (?H . ?\241) (?I . ?\251) (?Z . ?\257) + (?/ (?C . ?\305) (?G . ?\325) (?H . ?\241) (?I . ?\251) (?Z . ?\257) (?c . ?\345) (?g . ?\365) (?h . ?\261) (?i . ?\271) (?z . ?\277) (?r . ?\256) (?. . ?\377) (?# . ?\243) (?$ . ?\244) @@ -350,7 +350,7 @@ Special combinations: ~c gives a c with cedilla, ~! gives an inverted exclamation mark. ~? gives an inverted question mark. -With an argument, a positive argument enables ISO Accents mode, +With an argument, a positive argument enables ISO Accents mode, and a negative argument disables it." (interactive "P") diff --git a/lisp/international/iso-cvt.el b/lisp/international/iso-cvt.el index 7374c7f5d41..6c8a31a8fac 100644 --- a/lisp/international/iso-cvt.el +++ b/lisp/international/iso-cvt.el @@ -128,7 +128,7 @@ The region between FROM and TO is translated using the table TRANS-TAB. Optional arg BUFFER is ignored (for use in `format-alist')." (interactive "*r") (iso-translate-conventions from to iso-german-trans-tab)) - + (defvar iso-iso2tex-trans-tab '( ("ä" "{\\\\\"a}") @@ -825,7 +825,7 @@ Optional arg BUFFER is ignored (for use in `format-alist')." "Warn that format is write-only." (interactive) (error "This format is write-only")) - + ;;;###autoload (defun iso-cvt-define-menu () "Add submenus to the Files menu, to convert to and from various formats." diff --git a/lisp/international/iso-swed.el b/lisp/international/iso-swed.el index 30ede7c30de..156e3452693 100644 --- a/lisp/international/iso-swed.el +++ b/lisp/international/iso-swed.el @@ -33,7 +33,7 @@ ;; terminals that have ASCII in the G0 set and a Swedish/Finnish ;; version of ISO 646 in the G1 set. The G1 set differs from ;; ASCII as follows: -;; +;; ;; ASCII G1 ;; $ general currency sign ;; @ capital E with acute accent diff --git a/lisp/international/iso-transl.el b/lisp/international/iso-transl.el index 86a12103828..ea5f9ff53ae 100644 --- a/lisp/international/iso-transl.el +++ b/lisp/international/iso-transl.el @@ -43,7 +43,7 @@ ;;;###autoload (or key-translation-map (setq key-translation-map (make-sparse-keymap))) ;;;###autoload (define-key key-translation-map "\C-x8" 'iso-transl-ctl-x-8-map) ;;;###autoload (autoload 'iso-transl-ctl-x-8-map "iso-transl" "Keymap for C-x 8 prefix." t 'keymap) - + (defvar iso-transl-dead-key-alist '((?\' . mute-acute) (?\` . mute-grave) @@ -224,7 +224,7 @@ sequence VECTOR. (VECTOR is normally one character long.)") ("c" . [?ç])) ("German" ("A" . [?Ä]) - ("O" . [?Ö]) + ("O" . [?Ö]) ("U" . [?Ü]) ("a" . [?ä]) ("o" . [?ö]) diff --git a/lisp/international/ja-dic-cnv.el b/lisp/international/ja-dic-cnv.el index 38c8edf4450..8cf9ec331e0 100644 --- a/lisp/international/ja-dic-cnv.el +++ b/lisp/international/ja-dic-cnv.el @@ -162,7 +162,7 @@ (save-excursion (set-buffer buf) (insert ")\n\n"))) - + (defconst skkdic-prefix-list '(skkdic-prefix-list)) (defun skkdic-convert-prefix (skkbuf buf) @@ -192,7 +192,7 @@ (save-excursion (set-buffer buf) (insert ")\n\n"))) - + ;; FROM and TO point the head and tail of "/J../J../.../". (defun skkdic-get-candidate-list (from to) (let (candidates) @@ -407,7 +407,7 @@ The name of generated file is specified by the variable `ja-dic-filename'." (goto-char to) (skkdic-convert-prefix skkbuf buf) - ;; + ;; (skkdic-collect-okuri-nasi) ;; Convert okuri-nasi general entries. diff --git a/lisp/international/kinsoku.el b/lisp/international/kinsoku.el index 4fc99bcac6a..b551161a6f3 100644 --- a/lisp/international/kinsoku.el +++ b/lisp/international/kinsoku.el @@ -160,7 +160,7 @@ the context of text formatting." (if enable-kinsoku (if (or (and ;; The character after point can't be placed at beginning - ;; of line. + ;; of line. (aref (char-category-set (following-char)) ?>) ;; We at first try to dissolve this situation by making a ;; line longer. If it fails, then try making a line diff --git a/lisp/international/kkc.el b/lisp/international/kkc.el index ff95fa18858..2d9740207bd 100644 --- a/lisp/international/kkc.el +++ b/lisp/international/kkc.el @@ -168,7 +168,7 @@ area while indicating the current selection by `<N>'." ;; kkc-current-conversions for key sequence kkc-current-key of length ;; LEN. If no conversion is found in the dictionary, don't change ;; kkc-current-conversions and return nil. -;; Postfixes are handled only if POSTFIX is non-nil. +;; Postfixes are handled only if POSTFIX is non-nil. (defun kkc-lookup-key (len &optional postfix prefer-noun) ;; At first, prepare cache data if any. (unless kkc-init-file-flag diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index 871298ff57e..874632f0ba1 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el @@ -781,7 +781,7 @@ is. If FORCE is non-nil, set up the display regardless." (?,Lx(B "j"))))) (t (error "Unsupported character set: %S" set))) - + (sit-for 0)) ;;;###autoload diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index 91e62f34d7a..ffa3840801d 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -285,7 +285,7 @@ wrong, use this command again to toggle back to the right mode." (when (eq cmd 'universal-argument) (call-interactively cmd) - + ;; Process keys bound in `universal-argument-map'. (while (progn (setq keyseq (read-key-sequence nil t) @@ -302,7 +302,7 @@ wrong, use this command again to toggle back to the right mode." ;; set's the final `prefix-arg. (let ((current-prefix-arg prefix-arg)) (call-interactively cmd)) - + ;; Read the command to execute with the given prefix arg. (setq prefix prefix-arg keyseq (read-key-sequence nil t) @@ -719,7 +719,7 @@ and TO is ignored." 0 (length from) coding 11 from)))) unsafe)) - (setq unsafe + (setq unsafe (mapcar #'(lambda (coding) (cons coding (mapcar #'(lambda (pos) @@ -788,7 +788,7 @@ e.g., for sending an email message.\n ") (mapc #'(lambda (x) (princ " ") (princ x)) rejected) (insert "\n")) (when unsafe - (insert (if rejected "And the others" + (insert (if rejected "And the others" "However, each of them") " encountered these problematic characters:\n") (mapc @@ -853,7 +853,7 @@ on your risk of losing the problematic characters.\n"))) ;; Read a coding system. (setq default-coding-system (or (car safe) (car codings))) (setq coding-system - (read-coding-system + (read-coding-system (format "Select coding system (default %s): " default-coding-system) default-coding-system)) @@ -2162,7 +2162,7 @@ will be translated according to the table specified by See also `locale-charset-language-names', `locale-language-names', `locale-preferred-coding-systems' and `locale-coding-system'." (interactive "sSet environment for locale: ") - + ;; Do this at runtime for the sake of binaries possibly transported ;; to a system without X. (setq locale-translation-file-name diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index 4b11cc67f2c..337e8ec274c 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -523,7 +523,7 @@ for decoding and encoding files, process I/O, etc." coding-category-iso-8-else coding-category-emacs-mule coding-category-raw-text - coding-category-sjis + coding-category-sjis coding-category-big5 coding-category-ccl coding-category-binary diff --git a/lisp/international/ogonek.el b/lisp/international/ogonek.el index 5684abd10c1..05dc2bd520b 100644 --- a/lisp/international/ogonek.el +++ b/lisp/international/ogonek.el @@ -28,7 +28,7 @@ ;; To use this library load it using ;; M-x load-library [enter] ogonek ;; Then, you may get a short info by calling one of -;; M-x ogonek-jak -- in Polish +;; M-x ogonek-jak -- in Polish ;; M-x ogonek-how -- in English " ;;; Code: @@ -39,29 +39,29 @@ :group 'i18n) (defconst ogonek-name-encoding-alist - '(("ascii" . (?A ?C ?E ?L ?N ?O ?S ?Z ?Z - ?a ?c ?e ?l ?n ?o ?s ?z ?z)) - ("iso8859-2" . (161 198 202 163 209 211 166 172 175 - 177 230 234 179 241 243 182 188 191)) - ("mazovia" . (143 149 144 156 165 163 152 160 161 + '(("ascii" . (?A ?C ?E ?L ?N ?O ?S ?Z ?Z + ?a ?c ?e ?l ?n ?o ?s ?z ?z)) + ("iso8859-2" . (161 198 202 163 209 211 166 172 175 + 177 230 234 179 241 243 182 188 191)) + ("mazovia" . (143 149 144 156 165 163 152 160 161 134 141 145 146 164 162 158 166 167)) - ("windows-EE" . (165 198 202 163 209 211 140 143 175 + ("windows-EE" . (165 198 202 163 209 211 140 143 175 185 230 234 179 241 243 156 159 191)) - ("windows-PL" . (165 198 202 163 209 211 140 143 175 + ("windows-PL" . (165 198 202 163 209 211 140 143 175 185 230 234 179 241 243 156 159 191)) - ("latin-2" . (164 143 168 157 227 224 151 141 189 + ("latin-2" . (164 143 168 157 227 224 151 141 189 165 134 169 136 228 162 152 171 190)) - ("CP852" . (164 143 168 157 227 224 151 141 189 + ("CP852" . (164 143 168 157 227 224 151 141 189 165 134 169 136 228 162 152 171 190)) - ("MeX" . (129 130 134 138 139 211 145 153 155 + ("MeX" . (129 130 134 138 139 211 145 153 155 161 162 166 170 171 243 177 185 187)) - ("CorelDraw" . (197 242 201 163 209 211 255 225 237 + ("CorelDraw" . (197 242 201 163 209 211 255 225 237 229 236 230 198 241 243 165 170 186)) - ("Amiga" . (194 202 203 206 207 211 212 218 219 + ("Amiga" . (194 202 203 206 207 211 212 218 219 226 234 235 238 239 243 244 250 251)) - ("Mac" . (132 140 162 252 193 238 229 143 251 + ("Mac" . (132 140 162 252 193 238 229 143 251 136 141 171 184 196 151 230 144 253)) - ) + ) "The constant `ogonek-name-encoding-alist' is a list of (NAME.LIST) pairs. Each LIST contains codes for 18 Polish diacritic characters. The codes are given in the following order: @@ -74,49 +74,49 @@ are given in the following order: " FUNKCJE INTERAKCYJNE UDOST/EPNIANE PRZEZ BIBLIOTEK/E `ogonek'. Je/sli czytasz ten tekst, to albo przegl/adasz plik /xr/od/lowy -biblioteki `ogonek.el', albo wywo/la/le/s polecenie `ogonek-jak'. -W drugim przypadku mo/zesz usun/a/c tekst z ekranu, stosuj/ac +biblioteki `ogonek.el', albo wywo/la/le/s polecenie `ogonek-jak'. +W drugim przypadku mo/zesz usun/a/c tekst z ekranu, stosuj/ac polecenie `M-x kill-buffer'. Niniejsza biblioteka dostarcza funkcji do zmiany kodowania polskich znak/ow diakrytycznych. Funkcje te mo/zna pogrupowa/c nast/epuj/aco. - 1. `ogonek-recode-region' oraz `ogonek-recode-buffer' - przekodowuj/a zaznaczony fragment wzgl/ednie ca/ly buffor. + 1. `ogonek-recode-region' oraz `ogonek-recode-buffer' + przekodowuj/a zaznaczony fragment wzgl/ednie ca/ly buffor. Po wywo/laniu interakcyjnym funkcji zadawane s/a pytania o parametry przekodowania: nazw/e kodowania - w tek/scie /xr/od/lowym i nazw/e kodowania docelowego. - Poni/zsze przyk/lady powinny wyja/sni/c, jakich parametr/ow + w tek/scie /xr/od/lowym i nazw/e kodowania docelowego. + Poni/zsze przyk/lady powinny wyja/sni/c, jakich parametr/ow oczekuj/a wymienione funkcje: (ogonek-recode-region (poczatek-fragmentu) (koniec-fragmentu) nazwa-kodowania-w-tekscie-zrodlowym nazwa-kodowania-docelowa) - (ogonek-recode-buffer - nazwa-kodowania-w-tekscie-zrodlowym nazwa-kodowania-docelowa) + (ogonek-recode-buffer + nazwa-kodowania-w-tekscie-zrodlowym nazwa-kodowania-docelowa) 2. `ogonek-prefixify-region' oraz `ogonek-prefixify-buffer' s/lu/z/a do wprowadzania notacji prefiksowej. (ogonek-prefixify-region (poczatek-fragmentu) (koniec-fragmentu) nazwa-kodowania-w-tekscie-zrodlowym znak-prefiksu) - (ogonek-prefixify-buffer - nazwa-kodowania-w-tekscie-zrodlowym znak-prefiksu) + (ogonek-prefixify-buffer + nazwa-kodowania-w-tekscie-zrodlowym znak-prefiksu) - 3. `ogonek-deprefixify-region' oraz `ogonek-deprefixify-buffer' + 3. `ogonek-deprefixify-region' oraz `ogonek-deprefixify-buffer' s/lu/z/a do usuwania notacji prefiksowej. - + (ogonek-deprefixify-region (poczatek-fragmentu) (koniec-fragmentu) znak-prefiksu nazwa-kodowania-docelowa) - (ogonek-prefixify-buffer - znak-prefiksu nazwa-kodowania-docelowa) + (ogonek-prefixify-buffer + znak-prefiksu nazwa-kodowania-docelowa) U/zycie klawisza TAB w trybie interakcyjnym powoduje wy/swietlenie listy dopuszczalnych nazw kod/ow, pami/etanych w sta/lej - `ogonek-name-encoding-alist'. + `ogonek-name-encoding-alist'. - Funkcje biblioteki odwo/luj/a si/e do pi/eciu zmiennych, kt/ore + Funkcje biblioteki odwo/luj/a si/e do pi/eciu zmiennych, kt/ore przechowuj/a podpowiedzi do zadawanych pyta/n. Nazwy tych zmiennych - oraz ich warto/sci domy/slne s/a nast/epuj/ace: + oraz ich warto/sci domy/slne s/a nast/epuj/ace: ogonek-from-encoding iso8859-2 ogonek-to-encoding ascii @@ -131,7 +131,7 @@ znak/ow diakrytycznych. Funkcje te mo/zna pogrupowa/c nast/epuj/aco. (setq ogonek-prefix-to-encoding \"iso8859-2\") Zamiast wczytywania ca/lej biblioteki `ogonek.el' mo/zna w pliku - `~/.emacs' za/z/ada/c wczytania wybranych funkcji, na dodatek dopiero + `~/.emacs' za/z/ada/c wczytania wybranych funkcji, na dodatek dopiero w chwili ich rzeczywistego u/zycia: (autoload 'ogonek-jak \"ogonek\") @@ -147,7 +147,7 @@ znak/ow diakrytycznych. Funkcje te mo/zna pogrupowa/c nast/epuj/aco. (ogonek-deprefixify-region start end ?/ \"iso8859-2\")) (global-set-key \"\\C-cd\" 'deprefixify-iso8859-2-region) ; ctrl-c d - (defun mazovia-to-iso8859-2 (start end) + (defun mazovia-to-iso8859-2 (start end) (interactive \"*r\") (ogonek-recode-region start end \"mazovia\" \"iso8859-2\")) (global-set-key \"\\C-cr\" 'mazovia-to-iso8859-2) ; ctrl-c r @@ -182,49 +182,49 @@ diacritic characters, the ones with an `ogonek' below or above them. The functions come in the following groups. 1. `ogonek-recode-region' and `ogonek-recode-buffer' to change - between one-character encodings, such as `iso-8859-2', `mazovia', - plain `ascii' or `TeX'. As the names suggest you may recode - either the entire current buffer or just a marked region - in it. You may use the functions interactively as commands. - Once you call a command you will be asked about the code - currently used in your text and the target encoding, the one - you want to get. The following example shows a non-interactive - use of the functions in a program. This also illustrates what + between one-character encodings, such as `iso-8859-2', `mazovia', + plain `ascii' or `TeX'. As the names suggest you may recode + either the entire current buffer or just a marked region + in it. You may use the functions interactively as commands. + Once you call a command you will be asked about the code + currently used in your text and the target encoding, the one + you want to get. The following example shows a non-interactive + use of the functions in a program. This also illustrates what type of parameters the functions expect to be called with: - (ogonek-recode-region + (ogonek-recode-region (region-beginning) (region-end) from-code-name to-code-name) - (ogonek-recode-buffer from-code-name to-code-name) + (ogonek-recode-buffer from-code-name to-code-name) - 2. `ogonek-prefixify-region' and `ogonek-prefixify-buffer' for + 2. `ogonek-prefixify-region' and `ogonek-prefixify-buffer' for introducing prefix notation: - (ogonek-prefixify-region + (ogonek-prefixify-region (region-beginning) (region-end) from-code-name prefix-char) - (ogonek-prefixify-buffer from-code-name prefix-char) - - 3. `ogonek-deprefixify-region' and `ogonek-deprefixify-buffer' for + (ogonek-prefixify-buffer from-code-name prefix-char) + + 3. `ogonek-deprefixify-region' and `ogonek-deprefixify-buffer' for removing prefix notation: - - (ogonek-deprefixify-region + + (ogonek-deprefixify-region (region-beginning) (region-end) prefix-char to-code-name) - (ogonek-prefixify-buffer prefix-char to-code-name) + (ogonek-prefixify-buffer prefix-char to-code-name) The TAB character used in interactive mode makes `emacs' - display the list of encodings recognized by the library. The list + display the list of encodings recognized by the library. The list is stored in the constant `ogonek-name-encoding-alist'. The `ogonek' functions refer to five variables in which the suggested - answers to dialogue questions are stored. The variables and their + answers to dialogue questions are stored. The variables and their default values are: - + ogonek-from-encoding iso8859-2 ogonek-to-encoding ascii ogonek-prefix-char / ogonek-prefix-from-encoding iso8859-2 ogonek-prefix-to-encoding iso8859-2 - The above default values can be changed by placing appropriate settings + The above default values can be changed by placing appropriate settings in the '~/.emacs' file: (setq ogonek-prefix-char ?/) @@ -246,7 +246,7 @@ The functions come in the following groups. (ogonek-deprefixify-region start end ?/ \"iso8859-2\")) (global-set-key \"\\C-cd\" 'deprefixify-iso8859-2-region) ; ctrl-c d - (defun mazovia-to-iso8859-2 (start end) + (defun mazovia-to-iso8859-2 (start end) (interactive \"*r\") (ogonek-recode-region start end \"mazovia\" \"iso8859-2\")) (global-set-key \"\\C-cr\" 'mazovia-to-iso8859-2) ; ctrl-c r @@ -268,7 +268,7 @@ The functions come in the following groups. ;; ---- Variables keeping the suggested answers to dialogue questions ----- (defvar ogonek-encoding-choices - (cons 'choice + (cons 'choice (mapcar (lambda (x) (list 'const (car x))) ogonek-name-encoding-alist)) "List of ogonek encodings. Used only for customization.") @@ -299,37 +299,37 @@ The functions come in the following groups. "Read encoding name with completion based on `ogonek-name-encoding-alist'. Store the name in the parameter-variable DEFAULT-NAME-VAR. PROMPT is a string to be shown when the user is asked for a name." - (let ((encoding - (completing-read + (let ((encoding + (completing-read (format "%s (default %s): " prompt (eval default-name-var)) ogonek-name-encoding-alist nil t))) ;; change the default name to the one just read - (set default-name-var - (if (string= encoding "") (eval default-name-var) encoding)) + (set default-name-var + (if (string= encoding "") (eval default-name-var) encoding)) ;; return the new default as the name you read (eval default-name-var))) (defun ogonek-read-prefix (prompt default-prefix-var) "Read a prefix character for prefix notation. -The result is stored in the variable DEFAULT-PREFIX-VAR. +The result is stored in the variable DEFAULT-PREFIX-VAR. PROMPT is a string to be shown when the user is asked for a new prefix." - (let ((prefix-string - (read-string - (format "%s (default %s): " prompt + (let ((prefix-string + (read-string + (format "%s (default %s): " prompt (char-to-string (eval default-prefix-var)))))) (if (> (length prefix-string) 1) - (error "! Only one character expected") + (error "! Only one character expected") ;; set the default prefix character to the one just read (set default-prefix-var - (if (string= prefix-string "") - (eval default-prefix-var) + (if (string= prefix-string "") + (eval default-prefix-var) (string-to-char prefix-string))) ;; the new default prefix is the function's result: (eval default-prefix-var)))) (defun ogonek-lookup-encoding (encoding) "Pick up an association for ENCODING in `ogonek-name-encoding-alist'. -Before returning a result test whether the string ENCODING is in +Before returning a result test whether the string ENCODING is in the list `ogonek-name-encoding-alist'" (let ((code-list (assoc encoding ogonek-name-encoding-alist))) (if (null code-list) @@ -340,8 +340,8 @@ the list `ogonek-name-encoding-alist'" ;; ---- An auxiliary function for zipping two lists of equal length ---- (defun ogonek-zip-lists (xs ys) - "Build a list of pairs from lists XS and YS of the same length." - (let ((pairs nil)) + "Build a list of pairs from lists XS and YS of the same length." + (let ((pairs nil)) (while xs (setq pairs (cons (cons (car xs) (car ys)) pairs)) (setq xs (cdr xs)) @@ -351,17 +351,17 @@ the list `ogonek-name-encoding-alist'" ;; ---- An auxiliary function building a one-to-one recoding table ----- -(defun ogonek-build-table (recoding-pairs) +(defun ogonek-build-table (recoding-pairs) "Build a table required by Emacs's `translate-region' function. RECODING-PAIRS is a list of character pairs for which recoding -is not an identity. +is not an identity. By using the built-in `translate-region' function we gain better performance compared to converting characters by a hand-written routine as it is done for prefix encodings." (let ((table (make-string 256 0)) (i 0)) - (while (< i 256) - (aset table i i) + (while (< i 256) + (aset table i i) (setq i (1+ i))) ;; make changes in `table' according to `recoding-pairs' (while recoding-pairs @@ -372,57 +372,57 @@ by a hand-written routine as it is done for prefix encodings." ;; ---- Commands for one-to-one recoding ------------------------------- -(defun ogonek-recode-region (start end from-encoding to-encoding) +(defun ogonek-recode-region (start end from-encoding to-encoding) "Recode text in a marked region in one-to-one manner. -When called interactively ask the user for the names of the FROM- -and TO- encodings." +When called interactively ask the user for the names of the FROM- +and TO- encodings." (interactive (progn (barf-if-buffer-read-only) - (list - (region-beginning) + (list + (region-beginning) (region-end) (ogonek-read-encoding "From code" 'ogonek-from-encoding) (ogonek-read-encoding "To code" 'ogonek-to-encoding)))) (save-excursion - (translate-region + (translate-region start end - (ogonek-build-table + (ogonek-build-table (ogonek-zip-lists (ogonek-lookup-encoding from-encoding) (ogonek-lookup-encoding to-encoding)))))) (defun ogonek-recode-buffer (from-encoding to-encoding) "Call `ogonek-recode-region' on the entire buffer. -When called interactively ask the user for the names of the FROM- +When called interactively ask the user for the names of the FROM- and TO- encodings." (interactive (progn (barf-if-buffer-read-only) - (list + (list (ogonek-read-encoding "From code" 'ogonek-from-encoding) (ogonek-read-encoding "To code" 'ogonek-to-encoding)))) - (ogonek-recode-region + (ogonek-recode-region (point-min) (point-max) from-encoding to-encoding)) ;; ---- Recoding with prefix notation ------------------------------- -(defconst ogonek-prefix-code '(?A ?C ?E ?L ?N ?O ?S ?X ?Z - ?a ?c ?e ?l ?n ?o ?s ?x ?z)) - +(defconst ogonek-prefix-code '(?A ?C ?E ?L ?N ?O ?S ?X ?Z + ?a ?c ?e ?l ?n ?o ?s ?x ?z)) + (defun ogonek-prefixify-region (start end from-encoding prefix-char) "In a region, replace FROM-encoded Polish characters with PREFIX pairs. -A PREFIX pair generated consists of PREFIX-CHAR and the respective -character listed in the `ogonek-prefix-code' constant. +A PREFIX pair generated consists of PREFIX-CHAR and the respective +character listed in the `ogonek-prefix-code' constant. PREFIX-CHAR itself gets doubled." (interactive (progn (barf-if-buffer-read-only) - (list - (region-beginning) - (region-end) + (list + (region-beginning) + (region-end) (ogonek-read-encoding "From code" 'ogonek-prefix-from-encoding) (ogonek-read-prefix "Prefix character" 'ogonek-prefix-char)))) - (let* + (let* ((from-code (ogonek-lookup-encoding from-encoding)) (to-code ogonek-prefix-code) (recoding-pairs ; `ogonek-prefix-char' added for doubling - (ogonek-zip-lists - (cons prefix-char from-code) + (ogonek-zip-lists + (cons prefix-char from-code) (cons prefix-char to-code)))) (save-excursion (goto-char start) @@ -441,32 +441,32 @@ PREFIX-CHAR itself gets doubled." (defun ogonek-prefixify-buffer (from-encoding prefix-char) "Call `ogonek-prefixify-region' on the entire buffer." (interactive (progn (barf-if-buffer-read-only) - (list + (list (ogonek-read-encoding "From code" 'ogonek-prefix-from-encoding) (ogonek-read-prefix "Prefix character" 'ogonek-prefix-char)))) - (ogonek-prefixify-region + (ogonek-prefixify-region (point-min) (point-max) from-encoding prefix-char)) (defun ogonek-deprefixify-region (start end prefix-char to-encoding) "In a region, replace PREFIX pairs with their corresponding TO-encodings. -PREFIX-CHAR followed by a Polish character from the `ogonek-prefix-code' +PREFIX-CHAR followed by a Polish character from the `ogonek-prefix-code' list is replaced with the corresponding TO-encoded character. A doubled -PREFIX-CHAR gets replaced with a single one. A combination of PREFIX-CHAR -followed by a non-Polish character, that is one not listed in the +PREFIX-CHAR gets replaced with a single one. A combination of PREFIX-CHAR +followed by a non-Polish character, that is one not listed in the `ogonek-prefix-code' constant, is left unchanged." (interactive (progn (barf-if-buffer-read-only) - (list (region-beginning) + (list (region-beginning) (region-end) - (ogonek-read-prefix + (ogonek-read-prefix "Prefix character" 'ogonek-prefix-char) - (ogonek-read-encoding + (ogonek-read-encoding "To code" 'ogonek-prefix-to-encoding)))) - (let* + (let* ((from-code ogonek-prefix-code) (to-code (ogonek-lookup-encoding to-encoding)) - (recoding-pairs - (ogonek-zip-lists - (cons prefix-char from-code) + (recoding-pairs + (ogonek-zip-lists + (cons prefix-char from-code) (cons prefix-char to-code)))) (save-excursion (goto-char start) @@ -477,10 +477,10 @@ followed by a non-Polish character, that is one not listed in the () ;; now, we can check the next character (let ((pair (assoc (following-char) recoding-pairs))) - (if (null pair) + (if (null pair) ;; `following-char' is not a Polish character nor it is ;; `prefix-char' since the one is among `recoding-pairs' - (forward-char 1) + (forward-char 1) ;; else prefix followed by a Polish character has been found ;; replace it by the corresponding Polish character (backward-char 1) @@ -492,10 +492,10 @@ followed by a non-Polish character, that is one not listed in the (defun ogonek-deprefixify-buffer (prefix-char to-encoding) "Call `ogonek-deprefixify-region' on the entire buffer." (interactive (progn (barf-if-buffer-read-only) - (list + (list (ogonek-read-prefix "Prefix character" 'ogonek-prefix-char) (ogonek-read-encoding "To code" 'ogonek-prefix-to-encoding)))) - (ogonek-deprefixify-region + (ogonek-deprefixify-region (point-min) (point-max) prefix-char to-encoding)) (provide 'ogonek) diff --git a/lisp/international/quail.el b/lisp/international/quail.el index 03dde544ed8..545809d7bdd 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -147,7 +147,7 @@ See the documentation of `quail-define-package' for the other elements.") title (condition-case nil (mapconcat - (lambda (x) + (lambda (x) (cond ((stringp x) x) ((and (listp x) (symbolp (car x)) (= (length x) 3)) (if (symbol-value (car x)) @@ -2404,7 +2404,7 @@ should be made by `quail-build-decode-map' (which see)." (define-button-type 'quail-keyboard-layout-button :supertype 'help-xref - 'help-function '(lambda (layout) + 'help-function '(lambda (layout) (help-setup-xref `(quail-keyboard-layout-button ,layout) nil) (quail-show-keyboard-layout layout)) 'help-echo (purecopy "mouse-2, RET: show keyboard layout")) diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el index f2410a27e27..1caabcce587 100644 --- a/lisp/international/titdic-cnv.el +++ b/lisp/international/titdic-cnv.el @@ -163,10 +163,10 @@ and radicals is as below: first radical: a b c d e f g h i j k l m n o p q r s t u v w x y z - $APD(B $AZ"(B $AJ,(B $AX<(B $A;p(B $A?Z(B $A^P(B $Ac_(B $AZ%(B $A\3(B $AXi(B $AD>(B $Alj(B $Ab;(B $ATB(B $Afy(B $AJ/(B $AMu(B $A0K(B $AX/(B $AHU(B $AeA(B $Aak(B $AVq(B $AR;(B $AHK(B + $APD(B $AZ"(B $AJ,(B $AX<(B $A;p(B $A?Z(B $A^P(B $Ac_(B $AZ%(B $A\3(B $AXi(B $AD>(B $Alj(B $Ab;(B $ATB(B $Afy(B $AJ/(B $AMu(B $A0K(B $AX/(B $AHU(B $AeA(B $Aak(B $AVq(B $AR;(B $AHK(B last radical: a b c d e f g h i j k l m n o p q r s t u v w x y z - $ASV(B $AI=(B $AMA(B $A56(B $AZb(B $A?Z(B $ARB(B $Aqb(B $A4s(B $A6!(B $A[L(B $Ala(B $AJ.(B $A4u(B $AXg(B $ACE(B $A=q(B $AX-(B $AE.(B $ARR(B $A`m(B $AP!(B $A3'(B $A3f(B $A_.(B $A27(B + $ASV(B $AI=(B $AMA(B $A56(B $AZb(B $A?Z(B $ARB(B $Aqb(B $A4s(B $A6!(B $A[L(B $Ala(B $AJ.(B $A4u(B $AXg(B $ACE(B $A=q(B $AX-(B $AE.(B $ARR(B $A`m(B $AP!(B $A3'(B $A3f(B $A_.(B $A27(B \\<quail-translation-docstring>") @@ -331,7 +331,7 @@ SPC, 6, 3, 4, or 7 specifing a tone (SPC:$(0?v(N(B, 6:$(0Dm(N(B, 3:$(0&9Vy (princ (buffer-substring pos (point))) (princ "\n") (forward-line 1))) - + (princ "\n;;; End of the header of original TIT dictionary.\n\n") (princ ";;; Code:\n\n(require 'quail)\n\n") @@ -473,7 +473,7 @@ the generated Quail package is saved." (set-buffer-multibyte nil) (let ((coding-system-for-read 'no-conversion)) (insert-file-contents (expand-file-name filename))) - + ;; Decode the buffer contents from the encoding specified by a ;; value of the key "ENCODE:". (if (not (search-forward "\nBEGIN" nil t)) @@ -563,7 +563,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." ;; Alist of input method names and the corresponding information. ;; Each element has this form: ;; (INPUT-METHOD-NAME ;; Name of the input method. -;; INPUT-METHOD-TITLE ;; Title string of the input method +;; INPUT-METHOD-TITLE ;; Title string of the input method ;; DICFILE ;; Name of the source dictionary file. ;; CODING ;; Coding system of the dictionary file. ;; QUAILFILE ;; Name of the Quail package file. @@ -573,7 +573,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." (defvar quail-misc-package-ext-info '(("chinese-b5-tsangchi" "$(06A(BB" - "cangjie-table.b5" big5 "tsang-b5.el" + "cangjie-table.b5" big5 "tsang-b5.el" tsang-b5-converter "\ ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw> @@ -583,7 +583,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." ;; # this notice is preserved.") ("chinese-b5-quick" "$(0X|(BB" - "cangjie-table.b5" big5 "quick-b5.el" + "cangjie-table.b5" big5 "quick-b5.el" quick-b5-converter "\ ;; # Copyright 2001 Christian Wittern <wittern@iis.sinica.edu.tw> @@ -624,21 +624,21 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." ;; ;; ;; Copyright (C) 1999, Rui He, herui@cs.duke.edu -;; -;; +;; +;; ;; CCE(Console Chinese Environment) 0.32 -;; -;; CCE is free software; you can redistribute it and/or modify it under the -;; terms of the GNU General Public License as published by the Free Software -;; Foundation; either version 1, or (at your option) any later version. -;; -;; CCE is distributed in the hope that it will be useful, but WITHOUT ANY -;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -;; details. -;; +;; +;; CCE is free software; you can redistribute it and/or modify it under the +;; terms of the GNU General Public License as published by the Free Software +;; Foundation; either version 1, or (at your option) any later version. +;; +;; CCE is distributed in the hope that it will be useful, but WITHOUT ANY +;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +;; details. +;; ;; You should have received a copy of the GNU General Public License along with -;; CCE; see the file COPYING. If not, write to the Free Software Foundation, +;; CCE; see the file COPYING. If not, write to the Free Software Foundation, ;; 675 Mass Ave, Cambridge, MA 02139, USA.") ("chinese-ziranma" "$AWTH;(B" @@ -653,21 +653,21 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." ;; ;; ;; Copyright (C) 1999, Rui He, herui@cs.duke.edu -;; -;; +;; +;; ;; CCE(Console Chinese Environment) 0.32 -;; -;; CCE is free software; you can redistribute it and/or modify it under the -;; terms of the GNU General Public License as published by the Free Software -;; Foundation; either version 1, or (at your option) any later version. -;; -;; CCE is distributed in the hope that it will be useful, but WITHOUT ANY -;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -;; details. -;; +;; +;; CCE is free software; you can redistribute it and/or modify it under the +;; terms of the GNU General Public License as published by the Free Software +;; Foundation; either version 1, or (at your option) any later version. +;; +;; CCE is distributed in the hope that it will be useful, but WITHOUT ANY +;; WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +;; FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +;; details. +;; ;; You should have received a copy of the GNU General Public License along with -;; CCE; see the file COPYING. If not, write to the Free Software Foundation, +;; CCE; see the file COPYING. If not, write to the Free Software Foundation, ;; 675 Mass Ave, Cambridge, MA 02139, USA.") ("chinese-ctlau" "$AAuTA(B" @@ -681,17 +681,17 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." ;; It contains the following copyright notice: ;; ;; # Copyright (C) 1988-2001 Fung Fung Lee (lee@umunhum.stanford.edu) -;; # +;; # ;; # This program is free software; you can redistribute it and/or ;; # modify it under the terms of the GNU General Public License ;; # as published by the Free Software Foundation; either version 2 ;; # of the License, or any later version. -;; # +;; # ;; # This program is distributed in the hope that it will be useful, ;; # but WITHOUT ANY WARRANTY; without even the implied warranty of ;; # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; # GNU General Public License for more details. -;; # +;; # ;; # You should have received a copy of the GNU General Public License ;; # along with this program; if not, write to the Free Software Foundation, ;; # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.") @@ -707,17 +707,17 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." ;; It contains the following copyright notice: ;; ;; # Copyright (C) 1988-2001 Fung Fung Lee (lee@umunhum.stanford.edu) -;; # +;; # ;; # This program is free software; you can redistribute it and/or ;; # modify it under the terms of the GNU General Public License ;; # as published by the Free Software Foundation; either version 2 ;; # of the License, or any later version. -;; # +;; # ;; # This program is distributed in the hope that it will be useful, ;; # but WITHOUT ANY WARRANTY; without even the implied warranty of ;; # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; # GNU General Public License for more details. -;; # +;; # ;; # You should have received a copy of the GNU General Public License ;; # along with this program; if not, write to the Free Software Foundation, ;; # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.") @@ -745,7 +745,7 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." [Q $(0'D(B] [W $(0(q(B] [E $(0'V(B] [R $(0&H(B] [T $(0'>(B] [Y $(0&4(B] [U $(0&U(B] [I $(0'B(B] [O $(0&*(B] [P $(0'A(B] [A $(0'K(B] [S $(0&T(B] [D $(0'N(B] [F $(0'W(B] [G $(0&I(B] [H $(0*M(B] [J $(0&3(B] [L $(0&d(B] - + [Z ] [X $(0[E(B] [C $(01[(B] [V $(0&M(B] [B $(0'M(B] [N $(0&_(B] [M $(0&"(B] \\\\<quail-translation-docstring>\"\n" @@ -757,8 +757,8 @@ To get complete usage, invoke \"emacs -batch -f batch-titdic-convert -h\"." [Q $(GEC(B] [W $(GFp(B] [E $(GEU(B] [R $(GDG(B] [T $(GE=(B] [Y $(GD3(B] [U $(GDT(B] [I $(GEA(B] [O $(GD)(B] [P $(GE@(B] [A $(GEJ(B] [S $(GDS(B] [D $(GEM(B] [F $(GEV(B] [G $(GDH(B] [H $(GHL(B] [J $(GD2(B] [L $(GDc(B] - - [Z ] [X $(GyE(B] [C $(GOZ(B] [V $(GDL(B] [B $(GEL(B] [N $(GD^(B] [M $(GD!(B] + + [Z ] [X $(GyE(B] [C $(GOZ(B] [V $(GDL(B] [B $(GEL(B] [N $(GD^(B] [M $(GD!(B] \\\\<quail-translation-docstring>\"\n" fulltitle fulltitle))) @@ -1096,7 +1096,7 @@ To input symbols and punctuations, type `/' followed by one of `a' to the Cantonese romanization of the respective radical ($(0?f5}(B).")) (defun miscdic-convert (filename &optional dirname) - "Convert a dictionary file FILENAME into a Quail package. + "Convert a dictionary file FILENAME into a Quail package. Optional argument DIRNAME if specified is the directory name under which the generated Quail package is saved." (interactive "FInput method dictionary file: ") diff --git a/lisp/international/ucs-tables.el b/lisp/international/ucs-tables.el index 5a21044b764..6b2df6fc925 100644 --- a/lisp/international/ucs-tables.el +++ b/lisp/international/ucs-tables.el @@ -1239,7 +1239,7 @@ unification on input operations." (remq 'mule-utf-16-be (aref char-coding-system-table key))))))) ucs-mule-to-mule-unicode) - + (if (not utf-fragment-on-decoding) (define-translation-table 'utf-translation-table-for-encode) (define-translation-table 'utf-translation-table-for-encode @@ -2411,7 +2411,7 @@ Interactively, prompts for a hex string giving the code." (?(1y(B . ?$,1Dy(B) (?(1|(B . ?$,1D|(B) (?(1}(B . ?$,1D}(B))) - + (other '( ;; latin-jisx0201 is mostly decoded to ascii, with these diff --git a/lisp/international/utf-16.el b/lisp/international/utf-16.el index a026b9678e2..e9b7c801f91 100644 --- a/lisp/international/utf-16.el +++ b/lisp/international/utf-16.el @@ -225,7 +225,7 @@ They correspond to these Emacs character sets: On decoding (e.g. reading a file), Unicode characters not in the above ranges are decoded as U+FFFD, effectively corrupting the data -if they are re-encoded. +if they are re-encoded. On encoding (e.g. writing a file), Emacs characters not belonging to any of the character sets listed above are encoded into the byte diff --git a/lisp/international/utf-8.el b/lisp/international/utf-8.el index 3e6f7af675e..67a1f11a4f5 100644 --- a/lisp/international/utf-8.el +++ b/lisp/international/utf-8.el @@ -403,7 +403,7 @@ default. Also, installing them may be rather slow." (if (r2 < #xa0) (write-multibyte-character r5 r2) (write-multibyte-character r6 r2)))) - + ;; mule-unicode-0100-24ff (>= 0800) ((if (r3 < #x2500) ((r0 = ,(charset-id 'mule-unicode-0100-24ff)) @@ -414,7 +414,7 @@ default. Also, installing them may be rather slow." (translate-character utf-translation-table-for-decode r0 r1) (write-multibyte-character r0 r1)) - + ;; mule-unicode-2500-33ff (if (r3 < #x3400) ((r4 = r3) ; don't zap r3 @@ -464,7 +464,7 @@ default. Also, installing them may be rather slow." (r3 = r5) (r3 = r6)) (write-multibyte-character r3 r2)) - + ;; mule-unicode-e000-ffff ;; Fixme: fffe and ffff are invalid. ((r0 = ,(charset-id 'mule-unicode-e000-ffff)) diff --git a/lisp/language/chinese.el b/lisp/language/chinese.el index 6f67f66d129..14546edbf89 100644 --- a/lisp/language/chinese.el +++ b/lisp/language/chinese.el @@ -64,7 +64,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;; Chinese GB2312 (simplified) +;;; Chinese GB2312 (simplified) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (make-coding-system diff --git a/lisp/language/cyril-util.el b/lisp/language/cyril-util.el index 394400cda97..3c9839eea21 100644 --- a/lisp/language/cyril-util.el +++ b/lisp/language/cyril-util.el @@ -113,7 +113,7 @@ If the argument is nil, we return the display table to its standard state." (aset standard-display-table ?,Lm(B [?e?']) (aset standard-display-table ?,Ln(B [?y?u]) (aset standard-display-table ?,Lo(B [?y?a]) - + (aset standard-display-table ?,L0(B [?A]) (aset standard-display-table ?,L1(B [?B]) (aset standard-display-table ?,L2(B [?V]) diff --git a/lisp/language/devan-util.el b/lisp/language/devan-util.el index cbc5b19a56e..e4353548b7c 100644 --- a/lisp/language/devan-util.el +++ b/lisp/language/devan-util.el @@ -52,7 +52,7 @@ "[$,15U(B-$,15y68(B-$,16?(B]") (defconst devanagari-composable-pattern - (concat + (concat "\\([$,15E(B-$,15T6@6A(B][$,15A5B(B]?\\)\\|$,15C(B" "\\|\\(" "\\(?:\\(?:[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?\\(?:[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?\\(?:[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?[$,15U(B-$,15y68(B-$,16?(B]$,16-(B\\)?" @@ -67,7 +67,7 @@ (narrow-to-region from to) (goto-char (point-min)) (while (re-search-forward devanagari-composable-pattern nil t) - (devanagari-compose-syllable-region (match-beginning 0) + (devanagari-compose-syllable-region (match-beginning 0) (match-end 0)))))) (defun devanagari-compose-string (string) (with-temp-buffer @@ -86,14 +86,14 @@ (defun devanagari-range (from to) "Make the list of the integers of range FROM to TO." - (let (result) + (let (result) (while (<= from to) (setq result (cons to result) to (1- to))) result)) (defun devanagari-regexp-of-hashtbl-keys (hashtbl) "Return a regular expression that matches all keys in hashtable HASHTBL." (let ((max-specpdl-size 1000)) (regexp-opt - (sort + (sort (let (dummy) (maphash (function (lambda (key val) (setq dummy (cons key dummy)))) hashtbl) dummy) @@ -111,13 +111,13 @@ PATTERN regexp." (mapc (function (lambda (ucs) (aset composition-function-table (decode-char 'ucs ucs) - (list (cons devanagari-composable-pattern + (list (cons devanagari-composable-pattern 'devanagari-composition-function))))) (nconc '(#x0903) (devanagari-range #x0905 #x0939) (devanagari-range #x0958 #x0961))) ;; Notes on conversion steps. -;; 1. chars to glyphs +;; 1. chars to glyphs ;; ;; Rules will not be applied to the halant appeared at the end of the ;; text. Also, the preceding/following "r" will be treated as special case. @@ -130,8 +130,8 @@ PATTERN regexp." ;; Note that `consonant-glyph' mentioned here does not contain the ;; vertical bar (right modifier) attached at the right of the ;; consonant. -;; -;; If the glyph-group contains right modifier, +;; +;; If the glyph-group contains right modifier, ;; (1) consonant-glyphs/vowels, with nukta sign ;; (2) spacing ;; (3) right modifier (may be matra) @@ -140,11 +140,11 @@ PATTERN regexp." ;; (6) anuswar ;; (7) following "r" ;; (8) bottom matra or halant. -;; -;; Otherwise, +;; +;; Otherwise, ;; (1) consonant-glyph/vowels, with nukta sign ;; (3) left matra -;; (4) top matra +;; (4) top matra ;; (5) preceding "r" ;; (6) anuswar ;; (7) following "r" @@ -186,15 +186,15 @@ PATTERN regexp." ("$,15M5A(B" . "$,4 b"$(B") ("$,15M5B(B" . "$,4 b"$(B") ("$,16%(B" . "\$,4"L(B") - ("$,15N(B" . "$,4 b"@(B") - ("$,15N5A(B" . "$,4 b"@"&(B") + ("$,15N(B" . "$,4 b"@(B") + ("$,15N5A(B" . "$,4 b"@"&(B") ("$,16&(B" . "\$,4"@(B") ("$,16&5A(B" . "\$,4"@(B\$,4"&(B") - ("$,15O(B" . "$,4 b(B") + ("$,15O(B" . "$,4 b(B") ("$,16'(B" . "\$,4"D(B") ("$,16'5A(B" . "\$,4"D(B\$,4"&(B") - ("$,15P(B" . "$,4 b"D(B") - ("$,15P5A(B" . "$,4 b"D"&(B") + ("$,15P(B" . "$,4 b"D(B") + ("$,15P5A(B" . "$,4 b"D"&(B") ("$,16((B" . "\$,4"H(B") ("$,16(5A(B" . "\$,4"H(B\$,4"&(B") ("$,15Q(B" . "$,4 K")"L(B") ;; special rule for reodering. @@ -203,21 +203,21 @@ PATTERN regexp." ("$,16)(B" . "\$,4")"L(B") ("$,16)5A(B" . "\$,4")"$(B") ("$,16)5B(B" . "\$,4")"$(B") - ("$,15R(B" . "$,4 K")"@(B") - ("$,15R5A(B" . "$,4 K")"@"&(B") + ("$,15R(B" . "$,4 K")"@(B") + ("$,15R5A(B" . "$,4 K")"@"&(B") ("$,16*(B" . "\$,4")"@(B") ("$,16*5A(B" . "\$,4")"@"&(B") ("$,15S(B" . "$,4 K")"D(B") ("$,15S5A(B" . "$,4 K")"D"&(B") ("$,16+(B" . "\$,4")"D(B") ("$,16+5A(B" . "\$,4")"D"&(B") - ("$,15T(B" . "$,4 K")"H(B") - ("$,15T5A(B" . "$,4 K")"H"&(B") + ("$,15T(B" . "$,4 K")"H(B") + ("$,15T5A(B" . "$,4 K")"H"&(B") ("$,16,(B" . "\$,4")"H(B") ("$,16,5A(B" . "\$,4")"H"&(B") - ("$,16@(B" . "$,4 a"Q(B") + ("$,16@(B" . "$,4 a"Q(B") ;;("$,16B(B" . nil) - ;;("$,16A(B" . nil) + ;;("$,16A(B" . nil) ;;("$,16C(B" . nil) ;; GRUTTALS @@ -233,69 +233,69 @@ PATTERN regexp." ("$,15V6-5p(B" . "$,4 l")(B") ("$,15V6-5p6-(B" . "$,4 l(B") - ("$,15W(B" . "$,4 m")(B") - ("$,15W6-(B" . "$,4 m(B") + ("$,15W(B" . "$,4 m")(B") + ("$,15W6-(B" . "$,4 m(B") ("$,15W6-5p(B" . "$,4 o")(B") ("$,15W6-5p6-(B" . "$,4 o(B") - ("$,15X(B" . "$,4 p")(B") - ("$,15X6-(B" . "$,4 p(B") - ("$,15X6-5p(B" . "$,4 q")(B") - ("$,15X6-5p6-(B" . "$,4 q(B") + ("$,15X(B" . "$,4 p")(B") + ("$,15X6-(B" . "$,4 p(B") + ("$,15X6-5p(B" . "$,4 q")(B") + ("$,15X6-5p6-(B" . "$,4 q(B") ("$,15Y(B" . "$,4 r"S(B") - ;; PALATALS - ("$,15Z(B" . "$,4 s")(B") - ("$,15Z6-(B" . "$,4 s(B") - ("$,15Z6-5p(B" . "$,4 t")(B") + ;; PALATALS + ("$,15Z(B" . "$,4 s")(B") + ("$,15Z6-(B" . "$,4 s(B") + ("$,15Z6-5p(B" . "$,4 t")(B") ("$,15Z6-5p6-(B" . "$,4 t(B") - ("$,15[(B" . "$,4 u"T(B") + ("$,15[(B" . "$,4 u"T(B") - ("$,15\(B" . "$,4 v")(B") - ("$,15\6-(B" . "$,4 v(B") - ("$,15\6-5p(B" . "$,4 x")(B") - ("$,15\6-5p6-(B" . "$,4 x(B") - ("$,15\6-5^(B" . "$,4 y")(B") - ("$,15\6-5^6-(B" . "$,4 y(B") + ("$,15\(B" . "$,4 v")(B") + ("$,15\6-(B" . "$,4 v(B") + ("$,15\6-5p(B" . "$,4 x")(B") + ("$,15\6-5p6-(B" . "$,4 x(B") + ("$,15\6-5^(B" . "$,4 y")(B") + ("$,15\6-5^6-(B" . "$,4 y(B") - ("$,15](B" . "$,4 z")(B") - ("$,15]6-(B" . "$,4 z(B") - ("$,15]6-5p(B" . "$,4 {")(B") - ("$,15]6-5p6-(B" . "$,4 {(B") + ("$,15](B" . "$,4 z")(B") + ("$,15]6-(B" . "$,4 z(B") + ("$,15]6-5p(B" . "$,4 {")(B") + ("$,15]6-5p6-(B" . "$,4 {(B") ("$,15^(B" . "$,4 |")(B") ("$,15^6-(B" . "$,4 |(B") - ;; CEREBRALS + ;; CEREBRALS ("$,15_(B" . "$,4 }"U(B") ("$,15_6-5_(B" . "$,4 ~"U(B") ("$,15_6-5`(B" . "$,4 "U(B") - ("$,15`(B" . "$,4! "V(B") - ("$,15`6-5`(B" . "$,4!!"V(B") + ("$,15`(B" . "$,4! "V(B") + ("$,15`6-5`(B" . "$,4!!"V(B") - ("$,15a(B" . "$,4!""W(B") - ("$,15a6-5a(B" . "$,4!$"W(B") - ("$,15a6-5b(B" . "$,4!%"W(B") + ("$,15a(B" . "$,4!""W(B") + ("$,15a6-5a(B" . "$,4!$"W(B") + ("$,15a6-5b(B" . "$,4!%"W(B") - ("$,15b(B" . "$,4!&"X(B") + ("$,15b(B" . "$,4!&"X(B") ("$,15c(B" . "$,4!(")(B") ("$,15c6-(B" . "$,4!((B") - ;; DENTALS - ("$,15d(B" . "$,4!)")(B") - ("$,15d6-(B" . "$,4!)(B") - ("$,15d6-5p(B" . "$,4!*")(B") - ("$,15d6-5p6-(B" . "$,4!*(B") - ("$,15d6-5d(B" . "$,4!+")(B") - ("$,15d6-5d6-(B" . "$,4!+(B") - - ("$,15e(B" . "$,4!,")(B") - ("$,15e6-(B" . "$,4!,(B") - ("$,15e6-5p(B" . "$,4!-")(B") - ("$,15e6-5p6-(B" . "$,4!-(B") - - ("$,15f(B" . "$,4!."Y(B") + ;; DENTALS + ("$,15d(B" . "$,4!)")(B") + ("$,15d6-(B" . "$,4!)(B") + ("$,15d6-5p(B" . "$,4!*")(B") + ("$,15d6-5p6-(B" . "$,4!*(B") + ("$,15d6-5d(B" . "$,4!+")(B") + ("$,15d6-5d6-(B" . "$,4!+(B") + + ("$,15e(B" . "$,4!,")(B") + ("$,15e6-(B" . "$,4!,(B") + ("$,15e6-5p(B" . "$,4!-")(B") + ("$,15e6-5p6-(B" . "$,4!-(B") + + ("$,15f(B" . "$,4!."Y(B") ("$,15f6#(B" . "$,4!/"Y(B") ("$,15f6-5p(B" . "$,4!0"Y(B") ("$,15f6-5f(B" . "$,4!1"Y(B") @@ -304,61 +304,61 @@ PATTERN regexp." ("$,15f6-5o(B" . "$,4!4(B") ("$,15f6-5u(B" . "$,4!5"Y(B") - ("$,15g(B" . "$,4!6")(B") - ("$,15g6-(B" . "$,4!6(B") - ("$,15g6-5p(B" . "$,4!7")(B") - ("$,15g6-5p6-(B" . "$,4!7(B") + ("$,15g(B" . "$,4!6")(B") + ("$,15g6-(B" . "$,4!6(B") + ("$,15g6-5p(B" . "$,4!7")(B") + ("$,15g6-5p6-(B" . "$,4!7(B") - ("$,15h(B" . "$,4!8")(B") - ("$,15h6-(B" . "$,4!8(B") - ("$,15h6-5p(B" . "$,4!9")(B") - ("$,15h6-5p6-(B" . "$,4!9")(B") - ("$,15h6-5h(B" . "$,4!:")(B") - ("$,15h6-5h6-(B" . "$,4!:(B") + ("$,15h(B" . "$,4!8")(B") + ("$,15h6-(B" . "$,4!8(B") + ("$,15h6-5p(B" . "$,4!9")(B") + ("$,15h6-5p6-(B" . "$,4!9")(B") + ("$,15h6-5h(B" . "$,4!:")(B") + ("$,15h6-5h6-(B" . "$,4!:(B") ("$,15i(B" . "$,4!8"#")(B") - ;; LABIALS - ("$,15j(B" . "$,4!;")(B") - ("$,15j6-(B" . "$,4!;(B") - ("$,15j6-5p(B" . "$,4!<")(B") - ("$,15j6-5p6-(B" . "$,4!<(B") - - ("$,15k(B" . "$,4!a"[(B") - ("$,15k6-(B" . "$,4!=(B") - ("$,15k6-5p(B" . "$,4!c"[(B") - - ("$,15l(B" . "$,4!d")(B") - ("$,15l6-(B" . "$,4!d(B") - ("$,15l6-5p(B" . "$,4!e")(B") - ("$,15l6-5p6-(B" . "$,4!e(B") - - ("$,15m(B" . "$,4!f")(B") - ("$,15m6-(B" . "$,4!f(B") - ("$,15m6-5p(B" . "$,4!g")(B") - ("$,15m6-5p6-(B" . "$,4!g(B") + ;; LABIALS + ("$,15j(B" . "$,4!;")(B") + ("$,15j6-(B" . "$,4!;(B") + ("$,15j6-5p(B" . "$,4!<")(B") + ("$,15j6-5p6-(B" . "$,4!<(B") + + ("$,15k(B" . "$,4!a"[(B") + ("$,15k6-(B" . "$,4!=(B") + ("$,15k6-5p(B" . "$,4!c"[(B") + + ("$,15l(B" . "$,4!d")(B") + ("$,15l6-(B" . "$,4!d(B") + ("$,15l6-5p(B" . "$,4!e")(B") + ("$,15l6-5p6-(B" . "$,4!e(B") + + ("$,15m(B" . "$,4!f")(B") + ("$,15m6-(B" . "$,4!f(B") + ("$,15m6-5p(B" . "$,4!g")(B") + ("$,15m6-5p6-(B" . "$,4!g(B") ("$,15n(B" . "$,4!h")(B") ("$,15n6-(B" . "$,4!h(B") ("$,15n6-5p(B" . "$,4!i")(B") ("$,15n6-5p6-(B" . "$,4!i(B") ;; SEMIVOWELS - ("$,15o(B" . "$,4!j")(B") - ("$,15o6-(B" . "$,4!j(B") - ("$,15o6-5p(B" . "$,4!k")(B") - ("$,15o6-5p6-(B" . "$,4!k(B") + ("$,15o(B" . "$,4!j")(B") + ("$,15o6-(B" . "$,4!j(B") + ("$,15o6-5p(B" . "$,4!k")(B") + ("$,15o6-5p6-(B" . "$,4!k(B") ("$,16-5o(B" . "$,4!l(B") ;; when every ohter lig. fails. - ("$,15p(B" . "$,4!n"W(B") + ("$,15p(B" . "$,4!n"W(B") ;; ("$,15p6-(B" . "\$,4"'(B") ;; special case. only the topmost pos. - ("$,15q(B" . "$,4!n"#"W(B") + ("$,15q(B" . "$,4!n"#"W(B") ("$,15q6-(B" . "$,4!m(B") ;; IS 13194 speical rule. - ("$,15p6!(B" . "$,4!o"[(B") - ("$,15p6"(B" . "$,4!p"\(B") + ("$,15p6!(B" . "$,4!o"[(B") + ("$,15p6"(B" . "$,4!p"\(B") - ("$,15r(B" . "$,4!q")(B") - ("$,15r6-(B" . "$,4!q(B") - ("$,15s(B" . "$,4!s(B") - ("$,15s6-(B" . "$,4!r(B") + ("$,15r(B" . "$,4!q")(B") + ("$,15r6-(B" . "$,4!q(B") + ("$,15s(B" . "$,4!s(B") + ("$,15s6-(B" . "$,4!r(B") ("$,15t(B" . "$,4!s"#(B") ("$,15t6-(B" . "$,4!r"#(B") @@ -366,8 +366,8 @@ PATTERN regexp." ("$,15u6-(B" . "$,4!t(B") ("$,15u6-5p(B" . "$,4!u")(B") ("$,15u6-5p6-(B" . "$,4!u(B") - ;; SIBILANTS - ("$,15v(B" . "$,4!v")(B") + ;; SIBILANTS + ("$,15v(B" . "$,4!v")(B") ("$,15v6-(B" . "$,4!v(B") ("$,15v6-5u(B" . "$,4!w")(B") ("$,15v6-5u6-(B" . "$,4!w(B") @@ -387,42 +387,42 @@ PATTERN regexp." ("$,15y6-5p(B" . "$,4!(B") ("$,15y6-5n(B" . "$,4" (B") ("$,15y6-5o(B" . "$,4"!(B") - ;; NUKTAS + ;; NUKTAS ("$,168(B" . "$,4 f"R"S(B") - ("$,1686-(B" . "$,4 d(B") - ("$,169(B" . "$,4 k")(B") - ("$,1696-(B" . "$,4 k(B") - ("$,16:(B" . "$,4 n")(B") - ("$,16:6-(B" . "$,4 n(B") - ("$,16;(B" . "$,4 w")(B") - ("$,16;6-(B" . "$,4 w(B") - ("$,16<(B" . "$,4!#"W(B") - ("$,16=(B" . "$,4!'"X(B") - ("$,16>(B" . "$,4!b"[(B") - ("$,16>6-(B" . "$,4!>(B") + ("$,1686-(B" . "$,4 d(B") + ("$,169(B" . "$,4 k")(B") + ("$,1696-(B" . "$,4 k(B") + ("$,16:(B" . "$,4 n")(B") + ("$,16:6-(B" . "$,4 n(B") + ("$,16;(B" . "$,4 w")(B") + ("$,16;6-(B" . "$,4 w(B") + ("$,16<(B" . "$,4!#"W(B") + ("$,16=(B" . "$,4!'"X(B") + ("$,16>(B" . "$,4!b"[(B") + ("$,16>6-(B" . "$,4!>(B") ("$,16?(B" . "$,4!j"#")(B") ;; misc modifiers. ("$,15A(B" . "\$,4"$(B") - ("$,15B(B" . "\$,4"&(B") + ("$,15B(B" . "\$,4"&(B") ("$,15C(B" . "$,4 F(B") ("$,15|(B" . "$,4"#(B") ("$,15}(B" . "$,4 E(B") ("$,16-(B" . "$,4""(B") ("$,16-5p(B" . "$,4"%(B") ;; following "r" - ;; ("$,160(B" . "$,4 D(B") + ;; ("$,160(B" . "$,4 D(B") ;; ("$,16D(B" . "$,4 J(B") - ;; ("$,16F(B" . "") - ;; ("$,16G(B" . "") - ;; ("$,16H(B" . "") - ;; ("$,16I(B" . "") - ;; ("$,16J(B" . "") - ;; ("$,16K(B" . "") - ;; ("$,16L(B" . "") - ;; ("$,16M(B" . "") - ;; ("$,16N(B" . "") + ;; ("$,16F(B" . "") + ;; ("$,16G(B" . "") + ;; ("$,16H(B" . "") + ;; ("$,16I(B" . "") + ;; ("$,16J(B" . "") + ;; ("$,16K(B" . "") + ;; ("$,16L(B" . "") + ;; ("$,16M(B" . "") + ;; ("$,16N(B" . "") ;; ("$,16O(B" . "") ) - "Devanagari characters to glyphs conversion table. + "Devanagari characters to glyphs conversion table. Default value contains only the basic rules. You may add your own preferred rule from the sanskrit fonts." ) @@ -436,7 +436,7 @@ preferred rule from the sanskrit fonts." ) (devanagari-regexp-of-hashtbl-keys dev-char-glyph-hash)) ;; glyph-to-glyph conversion table. -;; it is supposed that glyphs are ordered in +;; it is supposed that glyphs are ordered in ;; [consonant/nukta] - [matra/halant] - [preceding-r] - [anuswar]. (defvar dev-glyph-glyph @@ -497,7 +497,7 @@ preferred rule from the sanskrit fonts." ) (devanagari-range from to))) (defvar dev-glyph-cvn - (append + (append (dev-charseq #x2b) (dev-charseq #x3c #xc1) (dev-charseq #xc3)) @@ -508,7 +508,7 @@ preferred rule from the sanskrit fonts." ) "Devanagari Spacing Glyphs") (defvar dev-glyph-right-modifier - (append + (append (dev-charseq #xc9) (dev-charseq #xd2 #xd5)) "Devanagari Modifiers attached at the right side.") @@ -525,7 +525,7 @@ preferred rule from the sanskrit fonts." ) "Devanagari Matras attached at the top side.") (defvar dev-glyph-bottom-modifier - (append + (append (dev-charseq #xd6 #xdf) (dev-charseq #xc2)) "Devanagari Modifiers attached at the bottom.") @@ -541,9 +541,9 @@ preferred rule from the sanskrit fonts." ) (,(dev-charseq #xc5) . 7) (,dev-glyph-bottom-modifier . 8))) -(mapc +(mapc (function (lambda (x) - (mapc + (mapc (function (lambda (y) (put-char-code-property y 'composition-order (cdr x)))) (car x)))) @@ -563,7 +563,7 @@ preferred rule from the sanskrit fonts." ) (defun devanagari-compose-syllable-region (from to) "Compose devanagari syllable in region FROM to TO." (let ((glyph-str nil) (cons-num 0) glyph-str-list - (last-halant nil) (preceding-r nil) (last-modifier nil) + (last-halant nil) (preceding-r nil) (last-modifier nil) (last-char (char-before to)) match-str glyph-block split-pos) (save-excursion @@ -586,23 +586,23 @@ preferred rule from the sanskrit fonts." ) ;; translate the rest characters into glyphs (while (re-search-forward dev-char-glyph-regexp nil t) (setq match-str (match-string 0)) - (setq glyph-str + (setq glyph-str (concat glyph-str (gethash match-str dev-char-glyph-hash))) ;; count the number of consonant-glyhs. (if (string-match devanagari-consonant match-str) (setq cons-num (1+ cons-num)))) ;; preceding-r must be attached before the anuswar if exists. - (if preceding-r + (if preceding-r (if last-modifier - (setq glyph-str (concat (substring glyph-str 0 -1) + (setq glyph-str (concat (substring glyph-str 0 -1) "$,4"'(B" (substring glyph-str -1))) (setq glyph-str (concat glyph-str "$,4"'(B")))) (if last-halant (setq glyph-str (concat glyph-str "$,4""(B"))) ;;; *** glyph-to-glyph conversion *** (when (string-match dev-glyph-glyph-regexp glyph-str) (setq glyph-str - (replace-match (gethash (match-string 0 glyph-str) + (replace-match (gethash (match-string 0 glyph-str) dev-glyph-glyph-hash) nil t glyph-str)) (if (and (> cons-num 1) @@ -615,8 +615,8 @@ preferred rule from the sanskrit fonts." ) (while (setq split-pos (string-match "$,4""(B\\|.$" glyph-str)) (setq glyph-block (substring glyph-str 0 (1+ split-pos))) (setq glyph-str (substring glyph-str (1+ split-pos))) - (setq - glyph-block + (setq + glyph-block (if (string-match dev-glyph-right-modifier-regexp glyph-block) (sort (string-to-list glyph-block) (function (lambda (x y) @@ -630,11 +630,11 @@ preferred rule from the sanskrit fonts." ) (setq glyph-str-list (nconc glyph-str-list glyph-block))) ;; concatenate and attach reference-points. (setq glyph-str - (cdr - (apply - 'nconc - (mapcar - (function (lambda (x) + (cdr + (apply + 'nconc + (mapcar + (function (lambda (x) (list (or (get-char-code-property x 'reference-point) '(5 . 3) ;; default reference point. diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el index f61e1798526..3b59ddca661 100644 --- a/lisp/language/ethio-util.el +++ b/lisp/language/ethio-util.el @@ -103,7 +103,7 @@ ;; but file I/O is done in SERA. ;; ;; If the filename ends in ".java", editing is done in fidel -;; but file I/O is done in the \uXXXX style, where XXXX is +;; but file I/O is done in the \uXXXX style, where XXXX is ;; the Unicode codepoint for the Ethiopic character. ;; ;; If the filename ends in ".tex", editing is done in fidel @@ -168,7 +168,7 @@ If nil, use uppercases.") ;; ;; SERA to FIDEL ;; - + (defconst ethio-sera-to-fidel-table [ nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil @@ -230,7 +230,7 @@ If nil, use uppercases.") ;;; I ("$(3"h(B" (?2 "$(3#:(B")) ;;; J - ("$(3#j(B" (?e "$(3#e(B") (?u "$(3#f(B") (?i "$(3#g(B") (?a "$(3#h(B") (?E "$(3#i(B") (?o "$(3#k(B") + ("$(3#j(B" (?e "$(3#e(B") (?u "$(3#f(B") (?i "$(3#g(B") (?a "$(3#h(B") (?E "$(3#i(B") (?o "$(3#k(B") (?W "$(3#l(B" (?a "$(3#l(B") (?e "$(3#j%n(B") (?u "$(3#j%r(B") (?i "$(3#j%o(B") (?E "$(3#j%q(B"))) ;;; K @@ -301,18 +301,18 @@ If nil, use uppercases.") (?! "$(3%t(B") (?e "$(3#5(B") (?u "$(3#6(B") (?U "$(3#6(B") (?i "$(3#7(B") (?a "$(3#8(B") (?A "$(3#8(B") (?E "$(3#9(B") (?I "$(3#:(B") (?o "$(3#;(B") (?O "$(3#;(B") - (?g "$(3%^(B" + (?g "$(3%^(B" (?e "$(3%Y(B") (?u "$(3%Z(B") (?i "$(3%[(B") (?a "$(3%\(B") (?E "$(3%](B") (?o "$(3%_(B")) (?h "$(3"H(B" (?e "$(3"C(B") (?u "$(3"D(B") (?i "$(3"E(B") (?a "$(3"F(B") (?E "$(3"G(B") (?o "$(3"I(B") (?W "$(3"P(B" (?e "$(3"K(B") (?u "$(3"P(B") (?i "$(3"M(B") (?a "$(3"N(B") (?E "$(3"O(B"))) - (?k "$(3%>(B" + (?k "$(3%>(B" (?e "$(3%9(B") (?u "$(3%:(B") (?i "$(3%;(B") (?a "$(3%<(B") (?E "$(3%=(B") (?o "$(3%?(B")) - (?s "$(3!F(B" + (?s "$(3!F(B" (?e "$(3!A(B") (?u "$(3!B(B") (?i "$(3!C(B") (?a "$(3!D(B") (?E "$(3!E(B") (?o "$(3!G(B") (?W "$(3!H(B" (?a "$(3!H(B") (?e "$(3!F%n(B") (?u "$(3!F%r(B") (?i "$(3!F%o(B") (?E "$(3!F%q(B"))) - (?S "$(3$L(B" + (?S "$(3$L(B" (?e "$(3$G(B") (?u "$(3$H(B") (?i "$(3$I(B") (?a "$(3$J(B") (?E "$(3$K(B") (?o "$(3$M(B") (?W "$(3$F(B" (?a "$(3$F(B") (?e "$(3$L%n(B") (?u "$(3$L%r(B") (?i "$(3$L%o(B") (?E "$(3$L%q(B"))) @@ -337,7 +337,7 @@ If nil, use uppercases.") (?W "$(3%d(B" (?e "$(3%4(B") (?u "$(3%d(B") (?i "$(3%D(B") (?a "$(3$V(B") (?E "$(3%T(B")) (?Y "$(3$a(B" (?a "$(3$a(B"))) ;;; g - ("$(3#r(B" (?e "$(3#m(B") (?u "$(3#n(B") (?i "$(3#o(B") (?a "$(3#p(B") (?E "$(3#q(B") (?o "$(3#s(B") + ("$(3#r(B" (?e "$(3#m(B") (?u "$(3#n(B") (?i "$(3#o(B") (?a "$(3#p(B") (?E "$(3#q(B") (?o "$(3#s(B") (?W "$(3#z(B" (?e "$(3#u(B") (?u "$(3#z(B") (?i "$(3#w(B") (?a "$(3#x(B") (?E "$(3#y(B")) (?2 "$(3%^(B" (?e "$(3%Y(B") (?u "$(3%Z(B") (?i "$(3%[(B") (?a "$(3%\(B") (?E "$(3%](B") (?o "$(3%_(B"))) ;;; h @@ -348,7 +348,7 @@ If nil, use uppercases.") ;;; i ("$(3"e(B" (?2 "$(3#7(B")) ;;; j - ("$(3#j(B" (?e "$(3#e(B") (?u "$(3#f(B") (?i "$(3#g(B") (?a "$(3#h(B") (?E "$(3#i(B") (?o "$(3#k(B") + ("$(3#j(B" (?e "$(3#e(B") (?u "$(3#f(B") (?i "$(3#g(B") (?a "$(3#h(B") (?E "$(3#i(B") (?o "$(3#k(B") (?W "$(3#l(B" (?a "$(3#l(B") (?e "$(3#j%n(B") (?u "$(3#j%r(B") (?i "$(3#j%o(B") (?E "$(3#j%q(B"))) ;;; k @@ -580,7 +580,7 @@ the conversion of \"a\"." start table table2 ch) (setcar (aref ethio-sera-to-fidel-table ?a) - (if (eq lang 'tigrigna) "$(3"f(B" "$(3"c(B")) + (if (eq lang 'tigrigna) "$(3"f(B" "$(3"c(B")) (while (and (not (eobp)) (null new-language)) (setq ch (following-char)) @@ -773,7 +773,7 @@ Delete the escape even it is not recognised." ((or (string= flag "ti") (string= flag "tir")) 'tigrigna) ((or (string= flag "am") (string= flag "amh")) 'amharic) (t nil))) - + (defun ethio-convert-digit nil "Convert Arabic digits to Ethiopic digits." (let (ch z) @@ -1114,7 +1114,7 @@ See also the descriptions of the variables fidel nil digit t)) - ;; reduction = 2 and following 10s, 100s, 10000s + ;; reduction = 2 and following 10s, 100s, 10000s ((and (= ethio-numeric-reduction 2) (memq ch '(370 379 380))) (insert (substring (aref ethio-fidel-to-sera-map ch) 1)) @@ -1811,7 +1811,7 @@ Otherwise, [0-9A-F]." (insert (ethio-ethiocode-to-char (- ucode 64560)))) (t nil))) - + ;; gemination (goto-char (point-min)) (while (re-search-forward "\\ce$(3%s(B" nil 0) diff --git a/lisp/language/ethiopic.el b/lisp/language/ethiopic.el index 27c7e77f4b7..b198cf43084 100644 --- a/lisp/language/ethiopic.el +++ b/lisp/language/ethiopic.el @@ -59,7 +59,7 @@ (input-method . "ethiopic") (features ethio-util) (sample-text . "$(3$Q#U!.(B") - (documentation . + (documentation . "This language envrironment provides these function key bindings \(old bindings are shown in parentheses): [f3] ethio-fidel-to-sera-buffer (f5) diff --git a/lisp/language/european.el b/lisp/language/european.el index 233c099b734..ed4607c6b9a 100644 --- a/lisp/language/european.el +++ b/lisp/language/european.el @@ -582,7 +582,7 @@ but it selects the Dutch tutorial and input method.")) (setq translation-table (make-translation-table-from-vector encoding-vector)) (define-translation-table 'mac-roman-decoder translation-table) - (define-translation-table 'mac-roman-encoder + (define-translation-table 'mac-roman-encoder (char-table-extra-slot translation-table 0))) (define-ccl-program decode-mac-roman @@ -640,7 +640,7 @@ positions (integers or markers) specifying the region." (compose-string string idx (match-end 0)) (setq idx (match-end 0)))) string) - + (defun diacritic-compose-buffer () "Compose diacritic characters in the current buffer." (interactive) diff --git a/lisp/language/ind-util.el b/lisp/language/ind-util.el index aa40f6d02fb..dfd092dd00a 100644 --- a/lisp/language/ind-util.el +++ b/lisp/language/ind-util.el @@ -44,7 +44,7 @@ "Returns the regular expression of hashtable keys." (let ((max-specpdl-size 1000)) (regexp-opt - (sort + (sort (let (dummy) (maphash (function (lambda (key val) (setq dummy (cons key dummy)))) hashtbl) @@ -59,15 +59,15 @@ (?$,15Q(B ?$,16)(B) (?$,15R(B ?$,16*(B) (?$,15S(B ?$,16+(B) (?$,15T(B ?$,16,(B) (?$,16@(B ?$,16B(B) (?$,16A(B ?$,16C(B)) (;; CONSONANTS (currently 42, including special cases) ?$,15U(B ?$,15V(B ?$,15W(B ?$,15X(B ?$,15Y(B ;; GUTTRULS - ?$,15Z(B ?$,15[(B ?$,15\(B ?$,15](B ?$,15^(B ;; PALATALS - ?$,15_(B ?$,15`(B ?$,15a(B ?$,15b(B ?$,15c(B ;; CEREBRALS - ?$,15d(B ?$,15e(B ?$,15f(B ?$,15g(B ?$,15h(B ?$,15i(B ;; DENTALS - ?$,15j(B ?$,15k(B ?$,15l(B ?$,15m(B ?$,15n(B ;; LABIALS + ?$,15Z(B ?$,15[(B ?$,15\(B ?$,15](B ?$,15^(B ;; PALATALS + ?$,15_(B ?$,15`(B ?$,15a(B ?$,15b(B ?$,15c(B ;; CEREBRALS + ?$,15d(B ?$,15e(B ?$,15f(B ?$,15g(B ?$,15h(B ?$,15i(B ;; DENTALS + ?$,15j(B ?$,15k(B ?$,15l(B ?$,15m(B ?$,15n(B ;; LABIALS ?$,15o(B ?$,15p(B ?$,15q(B ?$,15r(B ?$,15s(B ?$,15t(B ?$,15u(B ;; SEMIVOWELS - ?$,15v(B ?$,15w(B ?$,15x(B ?$,15y(B ;; SIBILANTS - ?$,168(B ?$,169(B ?$,16:(B ?$,16;(B ?$,16<(B ?$,16=(B ?$,16>(B ?$,16?(B ;; NUKTAS + ?$,15v(B ?$,15w(B ?$,15x(B ?$,15y(B ;; SIBILANTS + ?$,168(B ?$,169(B ?$,16:(B ?$,16;(B ?$,16<(B ?$,16=(B ?$,16>(B ?$,16?(B ;; NUKTAS "$,15\6-5^(B" "$,15U6-5w(B") - (;; Misc Symbols (7) + (;; Misc Symbols (7) ?$,15A(B ?$,15B(B ?$,15C(B ?$,15}(B ?$,16-(B ?$,160(B ?$,16D(B) (;; Digits (10) ?$,16F(B ?$,16G(B ?$,16H(B ?$,16I(B ?$,16J(B ?$,16K(B ?$,16L(B ?$,16M(B ?$,16N(B ?$,16O(B) @@ -85,7 +85,7 @@ (defvar indian-base-table-to-language-alist '((indian-dev-base-table . "Devanagari") - (indian-pnj-base-table . "Punjabi") + (indian-pnj-base-table . "Punjabi") (indian-ori-base-table . "Oriya") (indian-bng-base-table . "Bengali") (indian-asm-base-table . "Assamese") @@ -100,11 +100,11 @@ "a" ("aa" "A") "i" ("ii" "I") "u" ("uu" "U") ("RRi" "R^i") ("LLi" "L^i") (".c" "e.c") nil "e" "ai" "o.c" nil "o" "au" ("RRI" "R^I") ("LLI" "L^I")) - (;; consonants -- 40 + (;; consonants -- 40 "k" "kh" "g" "gh" ("~N" "N^") "ch" ("Ch" "chh") "j" "jh" ("~n" "JN") "T" "Th" "D" "Dh" "N" - "t" "th" "d" "dh" "n" "nh" + "t" "th" "d" "dh" "n" "nh" "p" "ph" "b" "bh" "m" "y" "r" "rh" "l" ("L" "ld") nil ("v" "w") "sh" ("Sh" "shh") "s" "h" @@ -196,10 +196,10 @@ arguments, with all possible combinations of these multiple SEQUENCES. Thus, if SEQ1 contains 3 elements and SEQ2 contains 5 elements, then FUNCTION will be called 15 times." (if seqrest - (mapcar + (mapcar (lambda (x) - (apply - 'mapthread + (apply + 'mapthread `(lambda (&rest y) (apply ',function x y)) seqrest)) seq1) @@ -225,7 +225,7 @@ FUNCTION will be called 15 times." (funcall f (pop l1) (pop l2)))) (defun indian--puthash-v (v trans-v hashtbls) - (indian--map + (indian--map (lambda (v trans-v) (indian--puthash-char (car v) trans-v hashtbls)) v trans-v)) @@ -253,7 +253,7 @@ FUNCTION will be called 15 times." (setq v (if (char-valid-p (cadr v)) (char-to-string (cadr v)) "")) (if (stringp trans-c) (setq trans-c (list trans-c))) (if (stringp trans-v) (setq trans-v (list trans-v))) - (indian--puthash-char + (indian--puthash-char (concat c v) (apply 'append (mapthread 'concat trans-c trans-v)) @@ -277,7 +277,7 @@ FUNCTION will be called 15 times." (trans-digits '("0" "1" "2" "3" "4" "5" "6" "7" "8" "9"))) (indian--puthash-v vowels trans-vowels hashtbls) (indian--puthash-c consonants trans-consonants halant hashtbls) - (indian--puthash-cv consonants trans-consonants + (indian--puthash-cv consonants trans-consonants vowels trans-vowels hashtbls) (indian--puthash-m misc trans-misc hashtbls) (indian--puthash-m digits trans-digits hashtbls) @@ -298,13 +298,13 @@ FUNCTION will be called 15 times." (defmacro indian-translate-region (from to hashtable encode-p) `(save-excursion (save-restriction - (let ((regexp ,(indian-regexp-of-hashtbl-keys - (if encode-p (car (eval hashtable)) + (let ((regexp ,(indian-regexp-of-hashtbl-keys + (if encode-p (car (eval hashtable)) (cdr (eval hashtable)))))) (narrow-to-region from to) (goto-char (point-min)) (while (re-search-forward regexp nil t) - (let ((matchstr (gethash (match-string 0) + (let ((matchstr (gethash (match-string 0) (if ,encode-p (car ,hashtable) (cdr ,hashtable))))) @@ -314,7 +314,7 @@ FUNCTION will be called 15 times." (defun indian-dev-itrans-v5-encode-region (from to) (interactive "r") - (indian-translate-region + (indian-translate-region from to indian-dev-itrans-v5-hash t)) (defun indian-dev-itrans-v5-decode-region (from to) @@ -324,7 +324,7 @@ FUNCTION will be called 15 times." (defun indian-dev-kyoto-harvard-encode-region (from to) (interactive "r") - (indian-translate-region + (indian-translate-region from to indian-dev-kyoto-harvard-hash t)) (defun indian-dev-kyoto-harvard-decode-region (from to) @@ -334,7 +334,7 @@ FUNCTION will be called 15 times." (defun indian-dev-aiba-encode-region (from to) (interactive "r") - (indian-translate-region + (indian-translate-region from to indian-dev-aiba-hash t)) (defun indian-dev-aiba-decode-region (from to) @@ -525,18 +525,18 @@ FUNCTION will be called 15 times." (defvar is13194-to-ucs-malayalam-hashtbl nil) (defvar is13194-to-ucs-malayalam-regexp nil) -(mapc - (function (lambda (script) - (let ((hashtable (intern (concat "is13194-to-ucs-" +(mapc + (function (lambda (script) + (let ((hashtable (intern (concat "is13194-to-ucs-" (symbol-name script) "-hashtbl" ))) (regexp (intern (concat "is13194-to-ucs-" (symbol-name script) "-regexp")))) (set hashtable (make-hash-table :test 'equal :size 128)) (mapc (function (lambda (x) - (put-char-code-property (decode-char 'ucs (car x)) + (put-char-code-property (decode-char 'ucs (car x)) 'script script) - (put-char-code-property (decode-char 'ucs (car x)) + (put-char-code-property (decode-char 'ucs (car x)) 'iscii (cdr x)) (puthash (cdr x) (char-to-string (decode-char 'ucs (car x))) (eval hashtable)))) @@ -553,7 +553,7 @@ FUNCTION will be called 15 times." "Regexp that matches to conversion") (defun ucs-to-iscii-region (from to) - "Converts the indian UCS characters in the region to ISCII. + "Converts the indian UCS characters in the region to ISCII. Returns new end position." (interactive "r") ;; only Devanagari is supported now. @@ -563,13 +563,13 @@ Returns new end position." (goto-char (point-min)) (let* ((current-repertory is13194-default-repartory)) (while (re-search-forward ucs-to-is13194-regexp nil t) - (replace-match + (replace-match (get-char-code-property (string-to-char (match-string 0)) 'iscii)))) (point-max)))) (defun iscii-to-ucs-region (from to) - "Converts the ISCII characters in the region to UCS. + "Converts the ISCII characters in the region to UCS. Returns new end position." (interactive "r") ;; only Devanagari is supported now. @@ -579,13 +579,13 @@ Returns new end position." (goto-char (point-min)) (let* ((current-repertory is13194-default-repartory) (current-hashtable - (intern (concat "is13194-to-ucs-" + (intern (concat "is13194-to-ucs-" (symbol-name current-repertory) "-hashtbl"))) (current-regexp - (intern (concat "is13194-to-ucs-" + (intern (concat "is13194-to-ucs-" (symbol-name current-repertory) "-regexp")))) (while (re-search-forward (eval current-regexp) nil t) - (replace-match + (replace-match (gethash (match-string 0) (eval current-hashtable) "")))) (point-max)))) @@ -603,7 +603,7 @@ Returns new end position." ;;;###autoload (defun indian-compose-string (string) - (with-temp-buffer + (with-temp-buffer (insert string) (indian-compose-region (point-min) (point-max)) (buffer-string))) @@ -1029,7 +1029,7 @@ See also the function `indian-glyph-char'." (error "Invalid indian-glyph char: %d" char)) (setq code (+ (* (- (nth 1 split) 32) 96) (nth 2 split) -32)) (cons (% code 256) (aref indian-script-table (/ code 256))))) - + (provide 'ind-util) - + ;;; ind-util.el ends here diff --git a/lisp/language/japan-util.el b/lisp/language/japan-util.el index 465477c6550..97554d1c0de 100644 --- a/lisp/language/japan-util.el +++ b/lisp/language/japan-util.el @@ -135,7 +135,7 @@ belongs to `japanese-jisx0201-kana'.") (defconst japanese-alpha-numeric-table '((?$B#0(B . ?0) (?$B#1(B . ?1) (?$B#2(B . ?2) (?$B#3(B . ?3) (?$B#4(B . ?4) (?$B#5(B . ?5) (?$B#6(B . ?6) (?$B#7(B . ?7) (?$B#8(B . ?8) (?$B#9(B . ?9) - (?$B#A(B . ?A) (?$B#B(B . ?B) (?$B#C(B . ?C) (?$B#D(B . ?D) (?$B#E(B . ?E) + (?$B#A(B . ?A) (?$B#B(B . ?B) (?$B#C(B . ?C) (?$B#D(B . ?D) (?$B#E(B . ?E) (?$B#F(B . ?F) (?$B#G(B . ?G) (?$B#H(B . ?H) (?$B#I(B . ?I) (?$B#J(B . ?J) (?$B#K(B . ?K) (?$B#L(B . ?L) (?$B#M(B . ?M) (?$B#N(B . ?N) (?$B#O(B . ?O) (?$B#P(B . ?P) (?$B#Q(B . ?Q) (?$B#R(B . ?R) (?$B#S(B . ?S) (?$B#T(B . ?T) diff --git a/lisp/language/lao-util.el b/lisp/language/lao-util.el index 0f8d472bdde..7105ae1beb6 100644 --- a/lisp/language/lao-util.el +++ b/lisp/language/lao-util.el @@ -86,7 +86,7 @@ (?(1Q(B vowel-upper "VOWEL SIGN MAI KAN") (?(1R(B vowel-base "VOWEL SIGN SARA AR") (?(1S(B vowel-base "VOWEL SIGN SARA AM") - (?(1T(B vowel-upper "VOWEL SIGN SARA I") + (?(1T(B vowel-upper "VOWEL SIGN SARA I") (?(1U(B vowel-upper "VOWEL SIGN SARA II") (?(1V(B vowel-upper "VOWEL SIGN SARA EU") (?(1W(B vowel-upper "VOWEL SIGN SARA UR") @@ -104,7 +104,7 @@ (?(1c(B vowel-base "VOWEL SIGN SARA EI MAI MUAN\"") (?(1d(B vowel-base "VOWEL SIGN SARA AI MAI MAY") (?(1e(B invalid nil) - (?(1f(B special "KO LA (REPETITION)") + (?(1f(B special "KO LA (REPETITION)") (?(1g(B invalid nil) (?(1h(B tone "TONE MAI EK") (?(1i(B tone "TONE MAI THO") @@ -162,7 +162,7 @@ (?$,1DQ(B vowel-upper "VOWEL SIGN MAI KAN") (?$,1DR(B vowel-base "VOWEL SIGN SARA AR") (?$,1DS(B vowel-base "VOWEL SIGN SARA AM") - (?$,1DT(B vowel-upper "VOWEL SIGN SARA I") + (?$,1DT(B vowel-upper "VOWEL SIGN SARA I") (?$,1DU(B vowel-upper "VOWEL SIGN SARA II") (?$,1DV(B vowel-upper "VOWEL SIGN SARA EU") (?$,1DW(B vowel-upper "VOWEL SIGN SARA UR") diff --git a/lisp/language/thai-util.el b/lisp/language/thai-util.el index bbf116485ea..58588f974d7 100644 --- a/lisp/language/thai-util.el +++ b/lisp/language/thai-util.el @@ -265,7 +265,7 @@ positions (integers or markers) specifying the region." (compose-string string idx (match-end 0)) (setq idx (match-end 0))))) string) - + ;;;###autoload (defun thai-compose-buffer () "Compose Thai characters in the current buffer." diff --git a/lisp/language/thai.el b/lisp/language/thai.el index 1c1909976a5..f822e93bd1b 100644 --- a/lisp/language/thai.el +++ b/lisp/language/thai.el @@ -50,7 +50,7 @@ (input-method . "thai-kesmanee") (unibyte-display . thai-tis620) (features thai-util) - (sample-text + (sample-text . (thai-compose-string (copy-sequence "Thai (,T@RIRd7B(B) ,TJ0GQ1J04U1$0CQ1:(B, ,TJ0GQ1J04U10$h1P(B"))) (documentation . t))) diff --git a/lisp/language/tibet-util.el b/lisp/language/tibet-util.el index 14987e22663..2336b988fd0 100644 --- a/lisp/language/tibet-util.el +++ b/lisp/language/tibet-util.el @@ -163,7 +163,7 @@ The returned string has no composition information." ;; If 'a follows a consonant, turn it into the subjoined form. ;; * Disabled by Tomabechi 2000/06/09 * ;; Because in Unicode, $(7"A(B may follow directly a consonant without - ;; any intervening vowel, as in 4$(7"90"914""0"""Q14"A0"A1!;(B=4$(7"90"91(B 4$(7""0""1(B 4$(7"A0"A1(B not 4$(7"90"91(B 4$(7""0""1(B $(7"Q(B 4$(7"A0"A1(B + ;; any intervening vowel, as in 4$(7"90"914""0"""Q14"A0"A1!;(B=4$(7"90"91(B 4$(7""0""1(B 4$(7"A0"A1(B not 4$(7"90"91(B 4$(7""0""1(B $(7"Q(B 4$(7"A0"A1(B ;;(if (and (= char ?$(7"A(B) ;; (aref (char-category-set (car last)) ?0)) ;; (setq char ?$(7"R(B)) ;; modified for new font by Tomabechi 1999/12/10 @@ -370,7 +370,7 @@ See also docstring of the function tibetan-compose-region." ;;; ;;; Unicode-related definitions. -;;; +;;; (defvar tibetan-canonicalize-for-unicode-alist '(("$(7"Q(B" . "") ;; remove vowel a diff --git a/lisp/language/tibetan.el b/lisp/language/tibetan.el index e85f4132124..3ca1da9d839 100644 --- a/lisp/language/tibetan.el +++ b/lisp/language/tibetan.el @@ -27,7 +27,7 @@ ;; Created: Feb. 17. 1997 ;; History: -;; 1997.03.13 Modification for special signs and punctuations. +;; 1997.03.13 Modification for special signs and punctuations. ;;; Commentary: @@ -55,7 +55,7 @@ ;;;2260 $(7"`(B $(7"a(B $(7"b(B $(7"c(B $(7"d(B $(7"e(B $(7"f(B $(7"g(B $(7"h(B $(7"i(B $(7"j(B $(7"k(B $(7"l(B $(7"m(B $(7"n(B $(7"o(B ; Long vowels and ;;;2270 $(7"p(B $(7"q(B $(7"r(B $(7"s(B $(7"t(B $(7"u(B $(7"v(B $(7"w(B $(7"x(B $(7"y(B $(7"z(B $(7"{(B $(7"|(B $(7"}(B $(7"~(B // ; vocalic r, l ARE ;;; ; atomically -;;; ; encoded. +;;; ; encoded. ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ;;;2320 // $(7#!(B $(7#"(B $(7##(B $(7#$(B $(7#%(B $(7#&(B $(7#'(B $(7#((B $(7#)(B $(7#*(B $(7#+(B $(7#,(B $(7#-(B $(7#.(B $(7#/(B ; Subjoined consonants ;;;2330 $(7#0(B $(7#1(B $(7#2(B $(7#3(B $(7#4(B $(7#5(B $(7#6(B $(7#7(B $(7#8(B $(7#9(B $(7#:(B $(7#;(B $(7#<(B $(7#=(B $(7#>(B $(7#?(B ; @@ -69,7 +69,7 @@ ;;;2430 $(7$0(B $(7$1(B $(7$2(B $(7$3(B $(7$4(B $(7$5(B $(7$6(B $(7$7(B $(7$8(B $(7$9(B $(7$:(B $(7$;(B $(7$<(B $(7$=(B $(7$>(B $(7$?(B ; consonants for ;;;2440 $(7$@(B $(7$A(B $(7$B(B $(7$C(B $(7$D(B $(7$E(B $(7$F(B $(7$G(B $(7$H(B $(7$I(B $(7$J(B $(7$K(B $(7$L(B $(7$M(B $(7$N(B $(7$O(B ; ordinary Tibetan. ;;;2450 $(7$P(B $(7$Q(B $(7$R(B $(7$S(B $(7$T(B $(7$U(B $(7$V(B $(7$W(B $(7$X(B $(7$Y(B $(7$Z(B $(7$[(B $(7$\(B $(7$](B $(7$^(B $(7$_(B ; They are decomposed -;;;2460 $(7$`(B $(7$a(B $(7$b(B $(7$c(B $(7$d(B $(7$e(B $(7$f(B $(7$g(B $(7$h(B $(7$i(B $(7$j(B $(7$k(B $(7$l(B $(7$m(B $(7$n(B $(7$o(B ; into base and +;;;2460 $(7$`(B $(7$a(B $(7$b(B $(7$c(B $(7$d(B $(7$e(B $(7$f(B $(7$g(B $(7$h(B $(7$i(B $(7$j(B $(7$k(B $(7$l(B $(7$m(B $(7$n(B $(7$o(B ; into base and ;;;2470 $(7$p(B $(7$q(B $(7$r(B $(7$s(B $(7$t(B $(7$u(B $(7$v(B $(7$w(B $(7$x(B $(7$y(B $(7$z(B $(7${(B $(7$|(B $(7$}(B $(7$~(B // ; subjoined consonants ;;; ; when written on a ;;; 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F ; file in Tibetan @@ -100,7 +100,7 @@ (input-method . "tibetan-wylie") (features tibet-util) (documentation . t) - (sample-text + (sample-text . (tibetan-compose-string (copy-sequence "Tibetan (4$(7"7r'"]0"7"]14"20"21!;4%P0"G#!"Q14"20"21!;(B) $(7!4!5!5!>4"70"714$P0"!#C"Q1!;4"Er'"S0"E"S14"G0"G1!;4"70"714"2r'"[0"2"[1!;4"Dr'"[0"D"[14"#0"#14"G0"G1!>4"Ir'"]r'"_0"I"]"_1!;4"90"9"Q1!;4"/r'"S0"/"S1!;4"50"5"Q14#2x!#9r'"[0"2#9"[1!;4"Hx!"Rx!"Ur'"c0"H"A"U"c1!>(B"))))) diff --git a/lisp/language/vietnamese.el b/lisp/language/vietnamese.el index aa1c71a8191..b3f09b9d5e9 100644 --- a/lisp/language/vietnamese.el +++ b/lisp/language/vietnamese.el @@ -38,7 +38,7 @@ 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 + 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 ?,2U(B ?,2!(B ?,2"(B ?,2#(B ?,2$(B ?,2%(B ?,2&(B ?,2'(B ?,2((B ?,2)(B ?,2*(B ?,2+(B ?,2,(B ?,2-(B ?,2.(B ?,2/(B ?,20(B ?,21(B ?,22(B ?,25(B ?,2~(B ?,2>(B ?,26(B ?,27(B ?,28(B ?,2v(B ?,2w(B ?,2o(B ?,2|(B ?,2{(B ?,2x(B ?,2O(B ?,2u(B ?,1!(B ?,1"(B ?,1#(B ?,1$(B ?,1%(B ?,1&(B ?,1'(B ?,1((B ?,1)(B ?,1*(B ?,1+(B ?,1,(B ?,1-(B ?,1.(B ?,1/(B @@ -66,7 +66,7 @@ 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 + 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 ?,2`(B ?,2d(B ?,2c(B ?,2a(B ?,2U(B ?,2#(B ?,2'(B ?,2h(B ?,2k(B ?,2((B ?,2i(B ?,2)(B ?,2.(B ?,2l(B ?,2o(B ?,2n(B ?,2m(B ?,28(B ?,2r(B ?,2v(B ?,2u(B ?,2s(B ?,2w(B ?,25(B ?,26(B ?,27(B ?,2^(B ?,2>(B ?,2~(B ?,2y(B ?,2|(B ?,2{(B 160 ?,2e(B ?,2b(B ?,2j(B ?,2t(B ?,2=(B ?,2_(B ?,2p(B ?,1e(B ?,1b(B ?,1j(B ?,1t(B ?,1=(B ?,1y(B ?,1p(B ?,2"(B @@ -92,7 +92,7 @@ 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 - 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 + 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 ?,2`(B ?,2d(B ?,2c(B ?,2a(B ?,2U(B ?,2#(B ?,2'(B ?,2h(B ?,2k(B ?,2((B ?,2i(B ?,2)(B ?,2.(B ?,2l(B ?,2o(B ?,2n(B ?,2m(B ?,28(B ?,2r(B ?,2v(B ?,2u(B ?,2s(B ?,2w(B ?,25(B ?,26(B ?,27(B ?,2^(B ?,2>(B ?,2~(B ?,2y(B ?,2|(B ?,2{(B 160 ?,2e(B ?,2b(B ?,2j(B ?,2t(B ?,2=(B ?,2_(B ?,2p(B ?,1e(B ?,1b(B ?,1j(B ?,1t(B ?,1=(B ?,1_(B ?,1p(B ?,2"(B @@ -127,7 +127,7 @@ ;; ?,1`(B ?,1a(B ?,1b(B ?,1c(B ?,1d(B ?,1U(B ?,1e(B 231 ?,1h(B ?,1i(B ?,1j(B ?,1((B ?,1l(B ?,1m(B 238 ?,1n(B ;; ?,2G(B ?,2p(B ?,1r(B ?,1s(B ?,1t(B ?,1u(B 246 ?,2=(B ?,1x(B ?,1y(B ?,1z(B ?,1|(B 252 ?,2V(B ?,2((B ?,1O(B] ;; "Vietnamese VPS decoding table.") -;; +;; ;; (let ((table (make-translation-table-from-vector viet-vps-decode-table))) ;; (define-translation-table 'viet-vps-nonascii-translation-table table) ;; (define-translation-table 'viet-vps-encode-table @@ -220,7 +220,7 @@ ;; (write-multibyte-character r0 r1) ;; (repeat)))) ;; "CCL program to decode VPS.") -;; +;; ;; (define-ccl-program ccl-encode-vps ;; `(1 ;; ((loop @@ -228,7 +228,7 @@ ;; (translate-character viet-vps-encode-table r0 r1) ;; (write-repeat r1)))) ;; "CCL program to encode VPS.") -;; +;; ;; (define-ccl-program ccl-encode-vps-font ;; `(0 ;; ;; In: R0:vietnamese-viscii-lower/vietnamese-viscii-upper @@ -271,7 +271,7 @@ ;; '(ccl-decode-vps . ccl-encode-vps) ;; '((safe-charsets ascii vietnamese-viscii-lower vietnamese-viscii-upper) ;; (valid-codes (0 . 255)))) -;; +;; ;; (define-coding-system-alias 'vps 'vietnamese-vps) (make-coding-system diff --git a/lisp/mail/footnote.el b/lisp/mail/footnote.el index 8cf12b82262..b4e8d20c4ef 100644 --- a/lisp/mail/footnote.el +++ b/lisp/mail/footnote.el @@ -161,7 +161,7 @@ Wrapping around the alphabet implies successive repetitions of letters." (setq rc (concat rc chr)) (setq rep (1- rep))) rc)) - + ;;; ENGLISH LOWER (defconst footnote-english-lower "abcdefghijklmnopqrstuvwxyz" "Lower case English alphabet.") @@ -482,7 +482,7 @@ styles." (Footnote-goto-char-point-max) (if (re-search-backward (concat "^" footnote-section-tag-regexp) nil t) (save-restriction - (when footnote-narrow-to-footnotes-when-editing + (when footnote-narrow-to-footnotes-when-editing (Footnote-narrow-to-footnotes)) (Footnote-goto-footnote (1- arg)) ; evil, FIXME (less evil now) ;; (message "Inserting footnote %d" arg) @@ -554,9 +554,9 @@ Return nil if the cursor is not over a footnote." (unless rc (setq rc (car alist-ptr))) (save-excursion - (message "Renumbering from %s to %s" + (message "Renumbering from %s to %s" (Footnote-index-to-string (car alist-ptr)) - (Footnote-index-to-string + (Footnote-index-to-string (1+ (car alist-ptr)))) (Footnote-renumber (car alist-ptr) (1+ (car alist-ptr)) diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el index 3814d583641..da27b726efa 100644 --- a/lisp/mail/mail-hist.el +++ b/lisp/mail/mail-hist.el @@ -122,7 +122,7 @@ the message." (defsubst mail-hist-forward-header (count) "Move forward COUNT headers (backward if COUNT is negative). If last/first header is encountered first, stop there and returns -nil. +nil. Places point on the first non-whitespace on the line following the colon after the header name, or on the second space following that if @@ -212,11 +212,11 @@ Optional argument CONTENTS is a string which will be the contents ;;;###autoload (defun mail-hist-put-headers-into-history () - "Put headers and contents of this message into mail header history. + "Put headers and contents of this message into mail header history. Each header has its own independent history, as does the body of the message. -This function normally would be called when the message is sent." +This function normally would be called when the message is sent." (and mail-hist-keep-history (save-excursion @@ -260,7 +260,7 @@ This function normally would be called when the message is sent." ;; bottom is often just the same quoted history for every ;; message in the thread, differing only in indentation ;; level. - (if (string-equal header "body") + (if (string-equal header "body") (goto-char start))) )))) diff --git a/lisp/mail/mail-utils.el b/lisp/mail/mail-utils.el index db31f3d4064..42be6b57040 100644 --- a/lisp/mail/mail-utils.el +++ b/lisp/mail/mail-utils.el @@ -32,7 +32,7 @@ ;;; We require lisp-mode to make sure that lisp-mode-syntax-table has ;;; been initialized. (require 'lisp-mode) - + ;;;###autoload (defcustom mail-use-rfc822 nil "\ *If non-nil, use a full, hairy RFC822 parser on mail addresses. @@ -166,7 +166,7 @@ Return a modified address list." (setq address (buffer-string)) (erase-buffer)) ;; Strip non-nested comments an easier way. - (while (setq pos (string-match + (while (setq pos (string-match ;; This doesn't hack rfc822 nested comments ;; `(xyzzy (foo) whinge)' properly. Big deal. "[ \t]*(\\([^)\\]\\|\\\\.\\|\\\\\n\\)*)" @@ -240,7 +240,7 @@ the comma-separated list. The pruned list is returned." (naked-address (mail-strip-quoted-names address))) (if (string-match rmail-dont-reply-to-names naked-address) (setq destinations (concat (substring destinations 0 start-pos) - (and cur-pos (substring destinations + (and cur-pos (substring destinations (1+ cur-pos)))) cur-pos start-pos) (setq cur-pos (and cur-pos (1+ cur-pos)) diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el index caef6bd670d..0e22538011c 100644 --- a/lisp/mail/mailalias.el +++ b/lisp/mail/mailalias.el @@ -302,7 +302,7 @@ By default, this is the file specified by `mail-personal-alias-file'." This means that sending a message to NAME will actually send to DEFINITION. Normally, the addresses in DEFINITION must be separated by commas. -If FROM-MAILRC-FILE is non-nil, then addresses in DEFINITION +If FROM-MAILRC-FILE is non-nil, then addresses in DEFINITION can be separated by spaces; an address can contain spaces if it is quoted with double-quotes." @@ -352,7 +352,7 @@ if it is quoted with double-quotes." (if convert-backslash (while (string-match "[\\]" temp pos) (setq temp (replace-match "" t t temp)) - (if start + (if start (setq start (1- start))) (setq pos (match-end 0)))) (setq result (cons temp result)))) diff --git a/lisp/mail/metamail.el b/lisp/mail/metamail.el index 9c0b806bfca..7cfc4312a79 100644 --- a/lisp/mail/metamail.el +++ b/lisp/mail/metamail.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1993, 1996 Free Software Foundation, Inc. ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp> -;; Version: $Id: metamail.el,v 1.13 1999/10/15 15:45:02 monnier Exp $ +;; Version: $Id: metamail.el,v 1.14 2000/11/12 00:22:02 fx Exp $ ;; Keywords: mail, news, mime, multimedia ;; This file is part of GNU Emacs. @@ -111,9 +111,9 @@ Its header part is not interpreted at all." ;; Find Content-Type and Content-Transfer-Encoding from the header. (save-restriction (narrow-to-region (point-min) end) - (setq contype + (setq contype (or (mail-fetch-field "Content-Type") "text/plain")) - (setq encoding + (setq encoding (or (mail-fetch-field "Content-Transfer-Encoding") "7bit"))) ;; Interpret the body part only. (let ((metamail-switches ;Process body part only. @@ -153,7 +153,7 @@ redisplayed as output is inserted." (buffer-read-only nil) (metafile (make-temp-file "metamail")) (option-environment - (list (format "EMACS_VIEW_MODE=%d" + (list (format "EMACS_VIEW_MODE=%d" (if (numberp viewmode) viewmode 1))))) (save-excursion ;; Gee! Metamail does not ouput to stdout if input comes from diff --git a/lisp/mail/mspools.el b/lisp/mail/mspools.el index f7527fa186b..1f8651727ec 100644 --- a/lisp/mail/mspools.el +++ b/lisp/mail/mspools.el @@ -196,7 +196,7 @@ your primary spool is. If this fails, set it to something like mspools-vm-system-mail ; your mailbox vm-crash-box ;crash for mailbox )) - + ;; Mailing list inboxes ;; must have VM already loaded to get vm-folder-directory. (mapcar '(lambda (s) @@ -206,8 +206,8 @@ your primary spool is. If this fails, set it to something like (concat mspools-folder-directory s "." mspools-suffix) (concat mspools-folder-directory s ".crash"))) ;; So I create a vm-spool-files entry for each of those mail drops - (mapcar 'file-name-sans-extension - (directory-files mspools-folder-directory nil + (mapcar 'file-name-sans-extension + (directory-files mspools-folder-directory nil (format "^[^.]+\\.%s" mspools-suffix))) )) )) @@ -225,14 +225,14 @@ Buffer is not displayed if SHOW is non-nil." (delete-region (point-min) (point-max))) ;; else buffer doesn't exist so create it (get-buffer-create mspools-buffer)) - + ;; generate the list of spool files (if mspools-using-vm (mspools-set-vm-spool-files)) - + (mspools-get-spool-files) (if (not noshow) (pop-to-buffer mspools-buffer)) - + (setq buffer-read-only t) (mspools-mode) ) @@ -244,9 +244,9 @@ Buffer is not displayed if SHOW is non-nil." (setq spool-name (mspools-get-spool-name)) (if (null spool-name) (message "No spool on current line") - + (setq folder-name (mspools-get-folder-from-spool spool-name)) - + ;; put in a little "*" to indicate spool file has been read. (if (not mspools-update) (save-excursion @@ -266,7 +266,7 @@ Buffer is not displayed if SHOW is non-nil." (next-line (- 1 mspools-files-len)) ;back to top of list ;; else just on to next line (next-line 1)) - + ;; Choose whether to use VM or RMAIL for reading folder. (if mspools-using-vm (vm-visit-folder (concat mspools-folder-directory folder-name)) @@ -275,8 +275,8 @@ Buffer is not displayed if SHOW is non-nil." (setq rmail-inbox-list (list (concat mspools-folder-directory spool-name))) (rmail-get-new-mail)) - - + + (if mspools-update ;; generate new list of spools. (save-excursion @@ -313,7 +313,7 @@ Buffer is not displayed if SHOW is non-nil." (if mspools-mode-map () (setq mspools-mode-map (make-sparse-keymap)) - + (define-key mspools-mode-map "\C-c\C-c" 'mspools-visit-spool) (define-key mspools-mode-map "\C-m" 'mspools-visit-spool) (define-key mspools-mode-map " " 'mspools-visit-spool) @@ -334,7 +334,7 @@ Buffer is not displayed if SHOW is non-nil." nil." (interactive) (mspools-show noshow)) - + (defun mspools-help () "Show help for `mspools-mode'." (interactive) diff --git a/lisp/mail/rfc2368.el b/lisp/mail/rfc2368.el index b0d2a23b90b..25456523657 100644 --- a/lisp/mail/rfc2368.el +++ b/lisp/mail/rfc2368.el @@ -125,7 +125,7 @@ calling this function." (setq prequery (match-string rfc2368-mailto-prequery-index mailto-url)) - + (setq query (match-string rfc2368-mailto-query-index mailto-url)) @@ -154,9 +154,9 @@ calling this function." (setcdr our-cons-cell (concat our-cdr ", " prequery))) (setq headers-alist (cons (cons "To" prequery) headers-alist))))) - + headers-alist) - + (error "Failed to match a mailto: url")) )) diff --git a/lisp/mail/rfc822.el b/lisp/mail/rfc822.el index 633a2e2417e..7c32b251bf9 100644 --- a/lisp/mail/rfc822.el +++ b/lisp/mail/rfc822.el @@ -26,7 +26,7 @@ ;;; Commentary: ;; Support functions for parsing RFC-822 headers, used by mail and news -;; modes. +;; modes. ;;; Code: @@ -269,7 +269,7 @@ (t (rfc822-bad-address "Strange character or missing comma"))))))) - + (defun rfc822-addresses (header-text) (if (string-match "\\`[ \t]*\\([^][\000-\037 ()<>@,;:\\\".]+\\)[ \t]*\\'" header-text) diff --git a/lisp/mail/rmailsort.el b/lisp/mail/rmailsort.el index 8e00f3e4d55..c4e95c80541 100644 --- a/lisp/mail/rmailsort.el +++ b/lisp/mail/rmailsort.el @@ -133,7 +133,7 @@ KEYWORDS is a comma-separated list of labels." (setq labels (concat (substring labels (match-beginning 0)) ",")) (let (labelvec) (while (string-match "[ \t]*,[ \t]*" labels) - (setq labelvec (cons + (setq labelvec (cons (concat ", ?\\(" (substring labels 0 (match-beginning 0)) "\\),") diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 86324242d45..6431180845f 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -119,7 +119,7 @@ Emacs will list the header line in the RMAIL-summary." (defun rmail-summary-by-topic (subject &optional whole-message) "Display a summary of all messages with the given SUBJECT. Normally checks the Subject field of headers; -but if WHOLE-MESSAGE is non-nil (prefix arg given), +but if WHOLE-MESSAGE is non-nil (prefix arg given), look in the whole message. SUBJECT is a string of regexps separated by commas." (interactive "sTopics to summarize by: \nP") @@ -412,8 +412,8 @@ Setting this variable has an effect only before reading a mail." (skip-chars-backward " \t") (point))))) len mch lo) - (if (string-match - (or rmail-user-mail-address-regexp + (if (string-match + (or rmail-user-mail-address-regexp (concat "^\\(" (regexp-quote (user-login-name)) "\\($\\|@\\)\\|" @@ -1499,12 +1499,12 @@ starting with the current one. Deleted messages are skipped and don't count." (list (rmail-output-read-rmail-file-name) (prefix-numeric-value current-prefix-arg)))) (let ((i 0) prev-msg) - (while + (while (and (< i n) (progn (rmail-summary-goto-msg) (not (eq prev-msg (setq prev-msg - (with-current-buffer rmail-buffer + (with-current-buffer rmail-buffer rmail-current-message)))))) (setq i (1+ i)) (with-current-buffer rmail-buffer @@ -1559,13 +1559,13 @@ The variables `rmail-secondary-file-directory' and (if files (progn (define-key rmail-summary-mode-map [menu-bar classify input-menu] - (cons "Input Rmail File" - (rmail-list-to-menu "Input Rmail File" + (cons "Input Rmail File" + (rmail-list-to-menu "Input Rmail File" files 'rmail-summary-input))) (define-key rmail-summary-mode-map [menu-bar classify output-menu] - (cons "Output Rmail File" - (rmail-list-to-menu "Output Rmail File" + (cons "Output Rmail File" + (rmail-list-to-menu "Output Rmail File" files 'rmail-summary-output-to-rmail-file)))) (define-key rmail-summary-mode-map [menu-bar classify input-menu] diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el index a7a65302efd..40ef9e87228 100644 --- a/lisp/mail/sendmail.el +++ b/lisp/mail/sendmail.el @@ -575,7 +575,7 @@ If within the headers, this makes the new lines into continuation lines." (defun mail-mode-fill-paragraph (arg) ;; Do something special only if within the headers. (if (< (point) (mail-header-end)) - (let (beg end fieldname) + (let (beg end fieldname) (when (prog1 (re-search-backward "^[-a-zA-Z]+:" nil 'yes) (setq beg (point))) (setq fieldname @@ -944,7 +944,7 @@ external program defined by `sendmail-program'." ;; ... then undo escaping of matching parentheses, ;; including matching nested parentheses. (goto-char fullname-start) - (while (re-search-forward + (while (re-search-forward "\\(\\=\\|[^\\]\\(\\\\\\\\\\)*\\)\\\\(\\(\\([^\\]\\|\\\\\\\\\\)*\\)\\\\)" fullname-end 1) (replace-match "\\1(\\3)" t) @@ -992,7 +992,7 @@ external program defined by `sendmail-program'." delimline t)) (let* ((default-directory "/") (coding-system-for-write selected-coding) - (args + (args (append (list (point-min) (point-max) program nil errbuf nil "-oi") @@ -1230,7 +1230,7 @@ external program defined by `sendmail-program'." (mail-position-on-field "to")) (insert "\nFCC: " folder)) -(defun mail-reply-to () +(defun mail-reply-to () "Move point to end of Reply-To-field. Create a Reply-To field if none." (interactive) (expand-abbrev) diff --git a/lisp/mail/smtpmail.el b/lisp/mail/smtpmail.el index 17b02e3d6f9..17f1f6d43c1 100644 --- a/lisp/mail/smtpmail.el +++ b/lisp/mail/smtpmail.el @@ -696,7 +696,7 @@ This is relative to `smtpmail-queue-dir'.") envelope-from size-part body-part)) - + (if (or (null (car (setq response-code (smtpmail-read-response process)))) (not (integerp (car response-code))) (>= (car response-code) 400)) diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index eadfa1430c3..df4bb4e3ff6 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -250,7 +250,7 @@ nil -- do not cite the region at all the number of lines in the region is greater than this value, a warning message will be printed and the region will not be cited. Lines in region are counted with - `count-lines'. + `count-lines'. The gathering of attribution information is not affected by the value of this variable. The number of lines in the region is calculated @@ -595,7 +595,7 @@ If this is nil, Supercite keymap is not installed.") (define-key sc-mode-map "\C-b" 'sc-submit-bug-report) (define-key sc-mode-map "?" 'sc-describe) ) - + (defvar sc-electric-mode-map () "Keymap for `sc-electric-mode' electric references mode.") (if sc-electric-mode-map @@ -1152,7 +1152,7 @@ supplied, is used instead of the line point is on in the current buffer." This populates the `sc-attributions' with the list of possible attributions." (if (and (stringp from) (< 0 (length from))) - (let* ((sc-mumble "") + (let* ((sc-mumble "") (namestring (sc-attribs-extract-namestring from)) (namelist (sc-attribs-filter-namelist (sc-attribs-chop-namestring namestring))) @@ -1164,7 +1164,7 @@ This populates the `sc-attributions' with the list of possible attributions." (emailname (sc-attribs-emailname from)) (n 1) author middlenames) - + ;; put basic information (setq ;; put middle names and build sc-author entry @@ -1342,7 +1342,7 @@ to the auto-selected attribution string." (setq citation choice attribution (or (sc-guess-attribution citation) citation)) - + (setq citation (sc-make-citation choice) attribution choice)) )) @@ -1543,7 +1543,7 @@ First runs `sc-pre-uncite-hook'." sc-default-uncite-frame))) (run-hooks 'sc-pre-uncite-hook) (regi-interpret frame start end))) - + (defun sc-recite-region (start end) "Recite a region delineated by START and END. First runs `sc-pre-recite-hook'." @@ -1702,7 +1702,7 @@ error occurs." (progn (eval ref) (let ((lines (count-lines (point-min) (point-max)))) - (or nomsg (message "Ref header %d [%d line%s]: %s" + (or nomsg (message "Ref header %d [%d line%s]: %s" sc-eref-style lines (if (= lines 1) "" "s") ref)))) @@ -2020,7 +2020,7 @@ before, and `sc-post-hook' is run after the guts of this function." (mark-active t) ; for Emacs (point (point-marker)) (mark (copy-marker (mark-marker)))) - + ;; make sure point comes before mark, not all functions are ;; interactive "r" (if (< mark point) diff --git a/lisp/mail/uce.el b/lisp/mail/uce.el index 722ef28aa0c..93b3e430e7a 100644 --- a/lisp/mail/uce.el +++ b/lisp/mail/uce.el @@ -117,7 +117,7 @@ (require 'sendmail) ;; Those sections of code which are dependent upon ;; RMAIL are only evaluated if we have received a message with RMAIL... -;;(require 'rmail) +;;(require 'rmail) (defgroup uce nil "Facilitate reply to unsolicited commercial email." @@ -137,7 +137,7 @@ This hook is run after `mail-setup-hook', which is run as well." :type 'hook :group 'uce) -(defcustom uce-message-text +(defcustom uce-message-text "Recently, I have received an Unsolicited Commercial E-mail from you. I do not like UCE's and I would like to inform you that sending unsolicited messages to someone while he or she may have to pay for @@ -148,8 +148,8 @@ If you think that this is a good way to advertise your products or services you are mistaken. Spamming will only make people hate you, not buy from you. -If you have any list of people you send unsolicited commercial emails to, -REMOVE me from such list immediately. I suggest that you make this list +If you have any list of people you send unsolicited commercial emails to, +REMOVE me from such list immediately. I suggest that you make this list just empty. ---------------------------------------------------- @@ -192,7 +192,7 @@ Value nil means use no separator." :group 'uce) (defcustom uce-signature mail-signature -"Text to put as your signature after the note to UCE sender. +"Text to put as your signature after the note to UCE sender. Value nil means none, t means insert `~/.signature' file (if it happens to exist), if this variable is a string this string will be inserted as your signature." @@ -221,7 +221,7 @@ address, and postmaster of the mail relay used." (let ((message-buffer (cond ((eq uce-mail-reader 'gnus) gnus-original-article-buffer) ((eq uce-mail-reader 'rmail) "RMAIL") - (t (error + (t (error "Variable uce-mail-reader set to unrecognized value")))) (full-header-p (and (eq uce-mail-reader 'rmail) (not (rmail-msg-is-pruned))))) @@ -246,7 +246,7 @@ address, and postmaster of the mail relay used." end-of-hostname (string-match "[ ,>]" to first-at-sign) sender-host (substring to first-at-sign end-of-hostname)) (if (string-match "\\." sender-host) - (setq to (format "%s, postmaster%s, abuse%s" + (setq to (format "%s, postmaster%s, abuse%s" to sender-host sender-host)))) (setq mail-send-actions nil) (setq mail-reply-buffer nil) @@ -258,7 +258,7 @@ address, and postmaster of the mail relay used." (rmail-toggle-header 1) (widen) (rmail-maybe-set-message-counters) - (copy-region-as-kill (rmail-msgbeg rmail-current-message) + (copy-region-as-kill (rmail-msgbeg rmail-current-message) (rmail-msgend rmail-current-message)))))) ;; Restore the pruned header state we found. (if full-header-p @@ -286,7 +286,7 @@ address, and postmaster of the mail relay used." (beginning-of-buffer) (search-forward "*** EOOH ***\n") (beginning-of-line) - (forward-line -1))) + (forward-line -1))) (re-search-backward "^Received:") (beginning-of-line) ;; Is this always good? It's the only thing I saw when I checked @@ -304,7 +304,7 @@ address, and postmaster of the mail relay used." (forward-char -1) ;; And add its postmaster to the list of addresses. (if (string-match "\\." (buffer-substring temp (point))) - (setq to (format "%s, postmaster@%s" + (setq to (format "%s, postmaster@%s" to (buffer-substring temp (point))))) ;; Also look at the message-id, it helps *very* often. (if (and (search-forward "\nMessage-Id: " nil t) @@ -320,7 +320,7 @@ address, and postmaster of the mail relay used." (search-forward ">") (forward-char -1) (if (string-match "\\." (buffer-substring temp (point))) - (setq to (format "%s, postmaster@%s" + (setq to (format "%s, postmaster@%s" to (buffer-substring temp (point))))))) (cond ((eq uce-mail-reader 'gnus) ;; Does Gnus always have Lines: in the end? @@ -384,7 +384,7 @@ address, and postmaster of the mail relay used." ;; might be to set up special key bindings, replace standart ;; functions in mail-mode, etc. (run-hooks 'mail-setup-hook 'uce-setup-hook)))) - + (defun uce-insert-ranting (&optional ignored) "Insert text of the usual reply to UCE into current buffer." (interactive "P") diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 6e937b7f51f..79d82a4d531 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -37,7 +37,7 @@ * mh-loaddefs.el: Regenerated (lm-verify fixes). - * mh-index.el (mh-mairix-next-result): Checkdoc fixes. + * mh-index.el (mh-mairix-next-result): Checkdoc fixes. * mh-alias.el: lm-verify fix. @@ -404,7 +404,7 @@ called on a folder holding index search results. Also the now removed mh-folder-list-change-hook is called no more. - * mh-customize.el (mh-auto-folder-collect-flag) + * mh-customize.el (mh-auto-folder-collect-flag) (mh-folder-list-change-hook): Removed. * mh-loaddefs.el: Regenerated. @@ -485,7 +485,7 @@ that keeps track of the default searching function to be used. (mh-pick-mode): Make mh-searching-function buffer local. (mh-search-folder): Set mh-searching-function to use pick. - (mh-search-folder, mh-pick-menu, mh-pick-mode-help-messages) + (mh-search-folder, mh-pick-menu, mh-pick-mode-help-messages) (mh-pick-mode, mh-do-pick-search, mh-pick-do-search): Rename mh-do-pick-search to mh-pick-do-search. But keep mh-do-pick-search as a deprecated function. @@ -511,7 +511,7 @@ * mh-e.el (mh-folder-from-address): New function that proposes the name of a folder with an alias for the address in the current message. (mh-prompt-for-refile-folder): Use it (closes SF #657096). - + * mh-customize.el (mh-default-folder-prefix): New variable used by mh-folder-from-address. (mh-invisible-header-fields): Edited docstring. @@ -538,7 +538,7 @@ * mh-comp.el (mh-insert-x-mailer): Renamed mh-temp-info-buffer to mh-info-buffer. - + 2003-01-09 Satyaki Das <satyaki@theforce.stanford.edu> * mh-e.el (mh-folder-size): If the user doesn't have a @@ -577,7 +577,7 @@ * mh-speed.el (mh-speed-folders, mh-speed-folders-cache) (mh-speed-folders-actual): Moved to mh-utils.el as mh-sub-folders, mh-sub-folders-cache and mh-sub-folders-actual respectively. - (mh-speed-invalidate-map, mh-speed-invalidate-map) + (mh-speed-invalidate-map, mh-speed-invalidate-map) (mh-speed-add-folder): Use the new names. * mh-funcs.el (mh-kill-folder): Remove code that used to update @@ -628,7 +628,7 @@ (mh-index-do-search): New interactive function that takes the contents of the search buffer, generates an appropriate query and produces the search results buffer by calling mh-index-search. - (mh-replace-string, mh-index-parse-search-regexp) + (mh-replace-string, mh-index-parse-search-regexp) (mh-index-add-implicit-ops, mh-index-evaluate): New functions which parses the infix search expression that the user enters. A parse tree from which queries for different search programs can @@ -644,7 +644,7 @@ * Makefile (emacs-logs): New target for viewing CVS Emacs logs. Useful to see if an Emacs developer has changed MH-E. - * MH-E-NEWS: Fixed case of MH-E in the "Changes" title. + * MH-E-NEWS: Fixed case of MH-E in the "Changes" title. * mh-utils.el (mh-temp-info-buffer): New variable to hold name of buffer that contains version info. @@ -687,7 +687,7 @@ (font-lock): The library is loaded to avoid compilation warning in CVS Emacs. - * mh-speed.el (mh-speed-goto-folder, mh-speed-add-folder) + * mh-speed.el (mh-speed-goto-folder, mh-speed-add-folder) (mh-speed-extract-folder-name, mh-speed-invalidate-map): Use mh-search-from-end instead of search. @@ -755,8 +755,8 @@ 2002-12-24 Satyaki Das <satyaki@theforce.stanford.edu> - * mh-customize.el (mh-clean-message-header-flag) - (mh-visible-headers, mh-invisible-headers) + * mh-customize.el (mh-clean-message-header-flag) + (mh-visible-headers, mh-invisible-headers) (mh-invisible-header-fields-set): Reworded to satisfy checkdoc. * mh-loaddefs.el: Regenerated. @@ -764,8 +764,8 @@ * mh-e.el (mh-inc-folder, mh-visit-folder, mh-read-msg-range): Handle nil value of mh-large-folder properly. - * mh-customize.el (mh-tool-bar-show-set, mh-tool-bar-letter-set) - (mh-tool-bar-folder-set, mh-tool-bar-folder-buttons) + * mh-customize.el (mh-tool-bar-show-set, mh-tool-bar-letter-set) + (mh-tool-bar-folder-set, mh-tool-bar-folder-buttons) (mh-invisible-headers, mh-invisible-header-fields-set): Checkdoc fixes. (mh-large-folder): Updated to allow for infinity. If @@ -888,7 +888,7 @@ * mh-index.el (mh-index-new-folder): Add new folder to mh-folder-list to enable name completion. - (mh-glimpse-execute-search, mh-swish-execute-search) + (mh-glimpse-execute-search, mh-swish-execute-search) (mh-swish++-execute-search): Fix documentation. * mh-seq.el (mh-thread-generate): Fixed a stupid bug where the wrong @@ -896,7 +896,7 @@ * mh-index.el (mh-index-search): If optional prefix arg is given then the search in the current index buffer is redone. - (mh-glimpse-execute-search, mh-swish-execute-search) + (mh-glimpse-execute-search, mh-swish-execute-search) (mh-namazu-execute-search): Documentation fixes. * mh-e.el (mh-index-previous-search): New buffer local variable @@ -909,7 +909,7 @@ 2002-12-19 Peter S Galbraith <psg@debian.org> - * mh-alias.el (mh-alias-add-alias): Bug fix. + * mh-alias.el (mh-alias-add-alias): Bug fix. 2002-12-19 Peter S Galbraith <psg@debian.org> @@ -967,10 +967,10 @@ * mh-comp.el (mh-letter-tool-bar-map): Moved to mh-customize.el * mh-e.el (mh-folder-tool-bar-map): Moved to mh-customize.el - + * mh-utils.el (mh-get-msg-num): autoloaded. (mh-show-tool-bar-map): Moved to mh-customize.el - + * mh-customize.el (mh-tool-bar-item-*): 33 new defconsts for tool-bar setup and customization. (mh-tool-bar-folder-buttons-set): New function to setup the @@ -1084,11 +1084,11 @@ (mh-show-mode-map): Key binding for "v". * mh-speed.el: Fix credits. - (mh-index-folder-speedbar-buttons) - (mh-index-show-speedbar-buttons) - (mh-index-folder-speedbar-key-map) - (mh-index-show-speedbar-key-map) - (mh-index-folder-speedbar-menu-items) + (mh-index-folder-speedbar-buttons) + (mh-index-show-speedbar-buttons) + (mh-index-folder-speedbar-key-map) + (mh-index-show-speedbar-key-map) + (mh-index-folder-speedbar-menu-items) (mh-index-show-speedbar-menu-items): Removed since the modes mh-index-folder-mode and mh-index-show-mode no longer exist. (mh-speed-extract-folder-name): Remove the bits about @@ -1208,7 +1208,7 @@ immediate ancestor or to root message of current thread depending on optional argument. - * mh-utils.el (mh-show-thread-ancestor) + * mh-utils.el (mh-show-thread-ancestor) (mh-show-thread-next-sibling, mh-show-thread-previous-sibling): Interactive functions callable from the show buffer. (mh-show-thread-map): Bindings for Tu, Tp and Tn. @@ -1342,7 +1342,7 @@ * mh-alias.el (mh-alias-filenames): s/mh-mhparam-component/mh-profile-component/ (mh-profile-component): Move to mh-utils.el and make interactive. - (mh-read-address): Make it autoloaded. + (mh-read-address): Make it autoloaded. * mh-loaddefs.el: Regenerated. @@ -1369,7 +1369,7 @@ (dist, install-emacs): Use MH-E-LOADDEFS. * mh-comp.el (mh-customize): Moved to mh-customize.el. - + * mh-customize.el (mh-customize): Moved here from mh-comp. Makes more sense, doesn't it? @@ -1428,7 +1428,7 @@ 2002-12-03 Bill Wohler <wohler@newt.com> - * Makefile (MH-E-SRC, emacs): + * Makefile (MH-E-SRC, emacs): 2002-12-03 Satyaki Das <satyaki@theforce.stanford.edu> @@ -1441,7 +1441,7 @@ * mh-make.el: New script that compiles MH-E. (mh-loaddefs-beginning, mh-loaddefs-end): Don't save the autoloads file in between. Only save at the end. - (mh-emacs-generate-autoloads, mh-xemacs-generate-autoloads) + (mh-emacs-generate-autoloads, mh-xemacs-generate-autoloads) (mh-generate-autoloads): Replace the separate functions in Emacs and XEmacs with one that works in both variants. This simplifies the script a lot. @@ -1471,7 +1471,7 @@ * mh-e.el (mh-get-new-mail): Simplify no-new-mail test. (mh-add-cur-notation): Remove unnecessary function. - + 2002-12-03 Peter S Galbraith <psg@debian.org> * mh-identity.el (mh-identity-make-menu): Check if @@ -1497,7 +1497,7 @@ current message with the mh-note-cur character. (mh-get-new-mail): Use mh-add-cur-notation to undo the work of mh-remove-cur-notation if there was no new mail (closes SF #647681). - + * mh-e.el (mh-set-cmd-note): Do not update the default mh-cmd-note value (closes SF #643701). @@ -1553,7 +1553,7 @@ * mh-funcs.el (mh-pack-folder, mh-sort-folder): Fix the functions so that threading is preserved (needed for SF #646794). - * mh-identity.el (mh-identity-signature-start) + * mh-identity.el (mh-identity-signature-start) (mh-identity-signature-end): Checkdoc fixes. * mh-e.el (mh-previous-unread-msg, mh-next-unread-msg): Checkdoc @@ -1566,11 +1566,11 @@ * mh-e.el (mh-previous-unread-msg, mh-next-unread-msg): New interactive functions that go to next and previous unread - messages (closes SF #630328). + messages (closes SF #630328). (mh-folder-mode-map): Add key bindings for M-n and M-p to mh-folder-mode-map. - * mh-utils.el (mh-show-next-unread-msg) + * mh-utils.el (mh-show-next-unread-msg) (mh-show-previous-unread-msg): New interactive functions that go to the next and previous unread messages respectively. These are callable from the show buffer. @@ -1581,7 +1581,7 @@ * mh-mime.el (mh-defun-compat): Make it indent like a defun. - * mh-index.el (mh-defun-index): Make it indent like a defun. + * mh-index.el (mh-defun-index): Make it indent like a defun. * mh-customize.el: New file (closes SF #643722). @@ -1665,7 +1665,7 @@ mh-loaddefs.el (closes half of SF #643722).. * mh-comp.el, mh-speed.el (mh-utils): Removed require. mh-utils is - provided via mh-e.el. + provided via mh-e.el. Removed MH-E autoloads. These are now provided by mh-loaddefs.el. Added ;;;###mh-autoload tag to selected functions so that autoloads for those functions can be automatically created in @@ -1726,7 +1726,7 @@ completing-read-multiple to prompt for multiple entries. (mh-alias-PC-complete-address): Deleted. (mh-alias-learn-aliases): Use mh-exec-cmd-quiet instead of old kludge. - (mh-alias-letter-mode-expand-alias-hook): Simplify. + (mh-alias-letter-mode-expand-alias-hook): Simplify. (mh-alias-hostname): Deleted. (mh-alias-substitute-aliases-flag): Change default to nil. (mh-alias-display-blind-name-on-completion-flag) Change default to @@ -1755,11 +1755,11 @@ mh-mime.el, mh-pick.el, mh-seq.el, mh-speed.el, mh-utils.el: Ran indent-region, reformatted long lines, ran untabify. (indent-tabs-mode): Set file local variable to nil. - + 2002-11-29 Bill Wohler <wohler@newt.com> * Released MH-E version 7.0. - + * mh-e.el (Version, mh-version): Updated for release 7.0. * mh-comp.el (subseq, search): Require cl instead of autoloading @@ -1784,7 +1784,7 @@ 2002-11-21 Bill Wohler <wohler@newt.com> * Released MH-E version 6.1.91. - + * mh-e.el (Version, mh-version): Updated for release 6.1.91. * MH-E-NEWS: Inline HTML parts supported with Gnus 5.10, not 5.9. @@ -1808,7 +1808,7 @@ 2002-11-15 Bill Wohler <wohler@newt.com> * Released MH-E version 6.1.90. - + * README (Compile): New section. Users must now compile MH-E due to the vagaries of the various versions of gnus. @@ -1870,7 +1870,7 @@ * mh-utils.el (mh-show-limit-map): Same. * mh-seq.el (mh-delete-subject): Renamed from - mh-delete-subject-sequence. + mh-delete-subject-sequence. (mh-narrow-to-subject): Renamed from mh-narrow-to-subject-sequence. (mh-next-unseen-subject-sequence): Removed. :-( * mh-e.el: Use 'em @@ -1890,7 +1890,7 @@ 2002-11-13 Peter S Galbraith <psg@debian.org> * mh-e.el (mh-folder-message-menu): Make key binding "o" appear in - menu for mh-refile-msg. + menu for mh-refile-msg. 2002-11-13 Satyaki Das <satyaki@theforce.stanford.edu> @@ -1947,21 +1947,21 @@ these variables since they were only used for glimpse and grep. Now the functionality of all the indexing programs will be uniform. - (mh-index-search, mh-index-insert-scan, mh-defun-index) + (mh-index-search, mh-index-insert-scan, mh-defun-index) (mh-index-show): Simplify functions since matches are no longer shown. (mh-index-parse-match): Remove function. - * mh-e.el (mh-scan-cmd-note-width, mh-scan-destination-width) - (mh-scan-date-width, mh-scan-date-flag-width) + * mh-e.el (mh-scan-cmd-note-width, mh-scan-destination-width) + (mh-scan-date-width, mh-scan-date-flag-width) (mh-scan-from-mbox-width, mh-scan-from-mbox-sep-width): New variables to keep track of the widths of the different fields in the scan lines. - (mh-scan-field-from-start-offset, mh-scan-field-from-end-offset) + (mh-scan-field-from-start-offset, mh-scan-field-from-end-offset) (mh-scan-field-subject-start-offset): Offsets that are computed from the scan line widths. - * mh-seq.el (mh-copy-seq-to-eob, mh-thread-inc) + * mh-seq.el (mh-copy-seq-to-eob, mh-thread-inc) (mh-thread-parse-scan-line): Use new variables that remember the various offsets in place of integer constants. (mh-thread-generate-scan-lines): Space shouldn't be added here! @@ -2010,7 +2010,7 @@ * mh-index.el (mh-index-search): Made default prompt more intuitive (I hope!). - + 2002-11-11 Peter S Galbraith <psg@debian.org> * mh-identity.el (mh-header-field-delete): Remove save-excursion. @@ -2046,7 +2046,7 @@ mh-print-background. * mh-funcs.el (mh-print-msg): Use it. This addresses part of SF #627015. - + * mh-comp.el (mh-delete-yanked-msg-window-flag): Renamed from mh-delete-yanked-msg-window. (mh-yank-from-start-of-msg, mh-yank-cur-msg): Use it. @@ -2076,9 +2076,9 @@ * mh-utils.el (mh-decode-mime-flag): Renamed from mh-decode-mime. - * mh-utils.el (mh-show-mode, mh-show-xface) + * mh-utils.el (mh-show-mode, mh-show-xface) (mh-decode-quoted-printable, mh-display-msg, mh-display-msg): Use it. - * mh-mime.el (mh-graphical-smileys-flag) + * mh-mime.el (mh-graphical-smileys-flag) (mh-graphical-emphasis-flag): Ditto. * mh-index.el (mh-index-search, mh-index-show): Ditto. * mh-e.el (mh-header-display): Ditto. @@ -2177,9 +2177,9 @@ * mh-utils.el (mh-tool-bar-search-command): New defcustom to set what search function to use in tool-bar. - (mh-show-tool-bar-map): Use it. - - * mh-e.el (mh-folder-tool-bar-map): Use it. + (mh-show-tool-bar-map): Use it. + + * mh-e.el (mh-folder-tool-bar-map): Use it. 2002-11-05 Bill Wohler <wohler@newt.com> @@ -2340,7 +2340,7 @@ * mh-index.el (mh-index-show-hook): Moved defvar to defcustom. (mh-index-show): Made verbiage about hook consistent throughout. - + * mh-mime.el (mh-edit-mhn-hook): Moved defvar to defcustom. (mh-edit-mhn): Added missing documentation about hook. @@ -2450,7 +2450,7 @@ (all): Use these targets instead of calling specific targets. (.PHONY): Added emacs, xemacs, autoloads, custom-loads. Broke up target and moved pieces into their own sections. - + 2002-10-30 Peter S Galbraith <psg@debian.org> @@ -2460,7 +2460,7 @@ 2002-10-29 Jeffrey C Honig <jch@honig.net> - * mh-comp.el (mh-letter-insert-signature-hook) + * mh-comp.el (mh-letter-insert-signature-hook) (mh-insert-signature): Add a hook to be called before inserting the signature. Do not attempt to insert the signature if mh-insert-signature-file-name is nil. @@ -2486,11 +2486,11 @@ 2002-10-29 Peter S Galbraith <psg@debian.org> - * mh-e.el (mh-folder-refiled-face, mh-folder-cur-msg-number-face) + * mh-e.el (mh-folder-refiled-face, mh-folder-cur-msg-number-face) (mh-folder-to-face, mh-folder-body-face): Define faces instead of copying them from font-lock faces. This mh-e will look the same in XEmacs as it does in Emacs. - * mh-utils.el (mh-show-cc-face, mh-show-date-face) + * mh-utils.el (mh-show-cc-face, mh-show-date-face) (mh-show-header-face): Ditto. 2002-10-29 Jeffrey C Honig <jch@honig.net> @@ -2532,7 +2532,7 @@ * mh-utils.el (mh-show-update-sequences): Added to mh-defun-show-buffer builds; needed for menu. - (mh-show-sequence-menu, mh-show-message-menu) + (mh-show-sequence-menu, mh-show-message-menu) (mh-show-folder-menu): 3 new menus in mh-show-mode-map that mirror the menus used in mh-folder-mode. (mh-show-mode): easy-menu-add the 3 menus. @@ -2619,7 +2619,7 @@ * mh-utils.el: Byte-compiler warning suppression. (mh-gnus-article-highlight-citation): Rather than redefining - 'gnus-cite-face-list', just re-order it. + 'gnus-cite-face-list', just re-order it. (mh-show-mode): Force turning on font-lock in XEmacs. * mh-seq.el: Byte-compiler warning suppression. @@ -2629,7 +2629,7 @@ * mh-comp.el: Byte-compiler warning suppression. * mh-xemacs-compat.el: Add defaliases for 'timerp' & - 'cancel-timer' to the equivalent 'itimer' functions. + 'cancel-timer' to the equivalent 'itimer' functions. (rfc822): Require it for 'rfc822-goto-eoh'. Byte-compiler warning suppression. @@ -2644,7 +2644,7 @@ * Makefile: Reorganize to allow for building also compiling for XEmacs too. Sanitize so that it will work using least-common - denominator versions of 'make'. Tested using GNU make, Solaris make, + denominator versions of 'make'. Tested using GNU make, Solaris make, and Berkely make. (all): Use recursive invokation based on the emacs or xemacs executable passed on the 'make EMACS=xemacs' command line. @@ -2654,7 +2654,7 @@ (clean): Ditto. (autoloads): Ditto. (custom-loads): Ditto. - + 2002-10-26 Satyaki Das <satyaki@theforce.stanford.edu> * mh-e.el (mh-last-msg): Add call to mh-recenter. @@ -2740,7 +2740,7 @@ * mh-utils.el (mh-show-maximum-size): New variable to control the display of large messages. (mh-display-msg): Use it (Closes SF #488696). - + * mh-seq.el (mh-toggle-threads): Checkdoc fix. * mh-e.el (mh-reset-threads-and-narrowing): Checkdoc fix. @@ -2752,12 +2752,12 @@ mh-reply-show-message-p. Update docstring. (mh-reply): Use it. This addresses part of SF #627015. - + * mh-e.el (mh-recenter-summary-flag): Renamed from mh-recenter-summary-p. Update docstring. (mh-set-scan-mode): Use it. This addresses part of SF #627015. - + 2002-10-25 Satyaki Das <satyaki@theforce.stanford.edu> * mh-e.el (mh-reset-threads-and-narrowing): New function which @@ -2777,7 +2777,7 @@ 2002-10-24 Bill Wohler <wohler@newt.com> * mh-e is completely checkdoc clean now. - + * mh-utils.el (mh-clean-message-header-flag): Renamed from mh-clean-message-header. (mh-bury-show-buffer-flag): Renamed from mh-bury-show-buffer. @@ -2799,7 +2799,7 @@ (mh-clean-message-header-flag): Renamed from mh-clean-message-header. This addresses part of SF #627015. - + * mh-comp.el: checkdoc fixes. 2002-10-24 Satyaki Das <satyaki@theforce.stanford.edu> @@ -2822,9 +2822,9 @@ (mh-narrow-to-seq, mh-widen): Remember the scan-line map when narrowing and restore it when widening. - * mh-e.el (mh-folder-threaded-view-flag, mh-folder-folder-menu) - (mh-regenerate-headers, mh-get-new-mail) - (mh-make-folder-mode-line, mh-process-commands) + * mh-e.el (mh-folder-threaded-view-flag, mh-folder-folder-menu) + (mh-regenerate-headers, mh-get-new-mail) + (mh-make-folder-mode-line, mh-process-commands) (mh-delete-scan-msgs): Remove mh-folder-threaded-view-flag. Instead (memq 'unthread mh-view-ops) is used to test if the folder is threaded. @@ -2852,7 +2852,7 @@ breakage from partial switch to mh-container-real-child-flag and to dupl-flag. - * mh-comp.el (mh-yank-cur-msg): Bug fix: specify + * mh-comp.el (mh-yank-cur-msg): Bug fix: specify (eq t mh-yank-from-start-of-msg) when that's what we want. 2002-10-24 Mark D. Baushke <mdb@gnu.org> @@ -2913,7 +2913,7 @@ (mh-mml-secure-message-sign-pgpmime): Use mh-gnus-pgp-support-flag. This addresses part of SF #627015. - + * mh-utils.el (mh-page-to-next-msg-flag): Renamed from mh-page-to-next-msg-p. (mh-show-msg): Use mh-page-to-next-msg-flag. @@ -2964,7 +2964,7 @@ * mh-comp.el (mh-yank-from-start-of-msg, mh-reply): Use -noformat flag to reply when 'autosupercite or 'autoattrib are specified to prevent duplicate cites of the body of a message. - + 2002-10-23 Satyaki Das <satyaki@theforce.stanford.edu> * mh-utils.el (font-lock-default-fontify-region): Add autoload to @@ -3003,7 +3003,7 @@ 2002-10-23 Mark D. Baushke <mdb@gnu.org> - * MH-E-NEWS: + * MH-E-NEWS: s/mh-adaptive-cmd-note/mh-adaptive-cmd-note-flag/ s/mh-show-use-xface/mh-show-use-xface-flag/ s/mh-tool-bar-reply-3-buttons/mh-tool-bar-reply-3-buttons-flag/ @@ -3018,7 +3018,7 @@ mh-mml-compose-insert-p. (mh-send-letter): Use mh-mml-compose-insert-flag. This addresses part of SF #627015. - + * mh-e.el: s/mh-folder-threaded-view-p/mh-folder-threaded-view-flag/ s/mh-adaptive-cmd-note/mh-adaptive-cmd-note-flag/ @@ -3033,12 +3033,12 @@ mh-make-folder-mode-line, mh-process-commands, mh-delete-scan-msgs): Use mh-folder-threaded-view-flag. This addresses part of SF #627015. - + * mh-index.el: s/mh-adaptive-cmd-note/mh-adaptive-cmd-note-flag/ (mh-index-search): Use mh-adaptive-cmd-note-flag. This addresses part of SF #627015. - + * mh-mime.el: s/mh-mml-compose-insert-p/mh-mml-compose-insert-flag/ s/mh-xemacs-p/mh-xemacs-flag/ @@ -3048,13 +3048,13 @@ mh-mml-secure-message-encrypt-pgpmime): Use it. (gnus-local-map-property): Use mh-xemacs-flag. This addresses part of SF #627015. - + * mh-seq.el: s/mh-folder-threaded-view-p/mh-folder-threaded-view-flag/ (mh-thread-generate, mh-thread-folder, mh-toggle-threads): Use mh-folder-threaded-view-flag. This addresses part of SF #627015. - + * mh-speed.el: s/mh-speed-run-flists-p/mh-speed-run-flists-flag/ s/mh-speed-refresh-p/mh-speed-refresh-flag/ @@ -3064,7 +3064,7 @@ (mh-speed-update-current-folder, mh-speed-invalidate-map, mh-speed-add-folder): Use it. This addresses part of SF #627015. - + * mh-utils.el: s/mh-xemacs-p/mh-xemacs-flag/ s/mh-tool-bar-reply-3-buttons/mh-tool-bar-reply-3-buttons-flag/ @@ -3080,7 +3080,7 @@ mh-xemacs-flag. (mh-show-xface): Use mh-show-use-xface-flag. This addresses part of SF #627015. - + 2002-10-23 Bill Wohler <wohler@newt.com> * Makefile (all): Rather than have to run "make clean all" all the @@ -3253,8 +3253,8 @@ 2002-10-20 Satyaki Das <satyaki@theforce.stanford.edu> - * mh-utils.el (mh-show-mode-map, mh-show-folder-map) - (mh-show-sequence-map, mh-show-thread-map, mh-show-extract-map) + * mh-utils.el (mh-show-mode-map, mh-show-folder-map) + (mh-show-sequence-map, mh-show-thread-map, mh-show-extract-map) (mh-show-digest-map, mh-show-mime-map): Interactive functions callable in show buffer are now prefixed with mh-show. @@ -3287,7 +3287,7 @@ 2002-10-20 Peter S Galbraith <psg@debian.org> * mh-seq.el (mh-narrow-to-subject-sequence): Renamed from - mh-narrow-to-subject-thread. + mh-narrow-to-subject-thread. (mh-subject-to-sequence): Renamed from mh-subject-thread-to-sequence. (mh-delete-subject-sequence): Renamed from mh-delete-subject-thread. (mh-next-unseen-subject-sequence): Renamed from @@ -3299,7 +3299,7 @@ * mh-utils.el: s/subject-thread/subject-sequence/ (mh-show-thread-map): Bind mh-widen to "w". - + 2002-10-20 Satyaki Das <satyaki@theforce.stanford.edu> * mh-seq.el (mh-thread-folder): This function is no longer @@ -3593,7 +3593,7 @@ cheat sheets in the minibuffer (closes SF #493740). It would be nice to refactor these two into a single function if possible. - * mh-e.el (mh-folder-mode-map, mh-folder-map, mh-sequence-map) + * mh-e.el (mh-folder-mode-map, mh-folder-map, mh-sequence-map) (mh-thread-map, mh-extract-map): Added ? keybinding for `mh-help' and `mh-prefix-help' (closes SF #493740). (mh-help-messages): New variable to hold various help messages. @@ -3699,7 +3699,7 @@ * Makefile (EMACS_OPTIONS): New macro for command-line compile options. (EMACS): Allow the user to specify which emacs command to use for - the compile. + the compile. (COMPILE_COMMAND): Combine the compile command with its options. (.el.elc): Use the new $(COMPILE_COMMAND). @@ -3732,7 +3732,7 @@ 2002-10-09 Peter S Galbraith <psg@debian.org> - * mh-utils.el (mh-exchange-point-and-mark-preserving-active-mark): + * mh-utils.el (mh-exchange-point-and-mark-preserving-active-mark): Simplify code for all emacsen to avoid byte-compilation warnings. 2002-10-09 Satyaki Das <satyaki@theforce.stanford.edu> @@ -3757,7 +3757,7 @@ line-beginning-position and line-end-position instead of point-at-bol and point-at-eol XEmacs functions. * mh-xemacs-compat.el: Added line-end-position and - line-beginning-position compatibility aliases. + line-beginning-position compatibility aliases. 2002-10-08 Mark D. Baushke <mdb@gnu.org> @@ -3771,7 +3771,7 @@ beginning of the `mh-scan-format-nmh' or `mh-scan-format-mh' format strings. The `mh-update-scan-format' allows for using zero-filled message numbers. - + 2002-10-08 Peter S Galbraith <psg@debian.org> * mh-e.el (mh-folder-folder-menu): Add entry for "Thread Folder". @@ -3794,7 +3794,7 @@ defsubst using 'buffer-substring-no-properties' so we don't grab any extents. (rfc822-goto-eoh): Removed. This exists in the XEmacs mail-lib - package. + package. (mail-header-end): Ditto. (mail-mode-fill-paragraph): Ditto. @@ -3831,7 +3831,7 @@ (mh-folder-tool-bar-map): Use mh-tool-bar-reply-3-buttons to decide how many buttons to use for replying. - * mh-mime.el (mh-file-mime-type-substitutions) + * mh-mime.el (mh-file-mime-type-substitutions) (mh-file-mime-type-substitute): Fix typos and doc strings. 2002-09-30 Peter S Galbraith <psg@debian.org> @@ -3981,7 +3981,7 @@ so X-Mailer header is more exact about what we are using. * mh-mime.el (mh-mhn-compose-insertion, mh-mhn-compose-anon-ftp, - mh-mml-attach-file): + mh-mml-attach-file): "Jeffrey P. Morgenthaler" <jpmorgen@congee.gsfc.nasa.go> reported that "require" in emacs 20.3 doesn't handle 3 arguments. We use "load" at the top of file elsewhere anyway to handle such a @@ -4056,12 +4056,12 @@ 2002-07-15 Mark D. Baushke <mdb@gnu.org> * mh-utils.el (mm-decode): Use load for the Non-fatal depencency - on the mm-decode library. + on the mm-decode library. * mh-mime.el (mm-decode, mm-uu, mm-view): Use load for the Non-fatal depencencies on the mm-decode, mm-uu and mm-view libraries. -2002-07-15 Satyaki Das <satyaki@theforce.stanford.edu> +2002-07-15 Satyaki Das <satyaki@theforce.stanford.edu> * mh-utils.el (mh-require, mh-autoload): Remove these macros. (mh-decode-mime): Initialized to t iff the mm-decode library is @@ -4157,7 +4157,7 @@ with mh-cmd-note via mh-set-cmd-note. The mh-scan-format function is now where the updated mh-cmd-note value is put into the scan format. - + * mh-e.el (mh-generate-new-cmd-note): Add documentation string. (mh-scan-format): Use mh-update-scan-format to get updated copies of mh-scan-format-nmh and mh-scan-format-mh to avoid format skew. @@ -4208,7 +4208,7 @@ (mh-set-default-cmd-note): Replaced by mh-set-cmd-note. (mh-set-cmd-note): New function to replace update mh-cmd-note value. - + * mh-e.el (mh-regenerate-headers): If mh-adaptive-cmd-note is non-nil, use mh-set-cmd-note on empty folder buffers. (mh-make-folder): Ditto. @@ -4391,7 +4391,7 @@ (mh-invisible-headers-show-xface): variable now defaults to value of mh-show-use-xface. (mh-show-mode): When mh-show-use-xface is t, invoke - external package x-face to display the x-face. + external package x-face to display the x-face. 2002-06-15 Satyaki Das <satyaki@theforce.stanford.edu> @@ -4674,7 +4674,7 @@ (mh-filter-out-non-text): New function to filter out attachments from message being yanked. -2002-05-20 Bill Wohler <Bill.Wohler@openwave.com> +2002-05-20 Bill Wohler <Bill.Wohler@openwave.com> * mh-utils.el (mh-invisible-headers-show-xface): First sentence of docstring was not entirely on first line so was truncated in @@ -4730,7 +4730,7 @@ mh-e does its own X-Face decoding (or this variable will be replaced by one telling mh-e to decode the X-Face). We may not ship the next release with this variable. - + 2002-05-07 Peter S Galbraith <psg@debian.org> * mh-comp.el (mh-x-face-file): New defcustom variable. File name @@ -4761,7 +4761,7 @@ 2002-04-10 Peter S Galbraith <psg@debian.org> * mh-e.el (mh-delete-msg, mh-refile-msg, mh-undo): XEmacs fix; Add - check to see if mark-active is bound, because Mandrake Linux include + check to see if mark-active is bound, because Mandrake Linux include XEmacs initialization code that binds transient-mark-mode. This fix gets around a problem in Mandrake only. It wasn't a problem on XEmacs generally. Fixes SF #541915. @@ -4808,7 +4808,7 @@ (mh-folder-unseen-seq-name): Refactored to make default sequence name more explicit and to handle undefined Unseen-Sequence MH profile entry better. - + 2002-04-02 Peter S Galbraith <psg@debian.org> * mh-e.el: 'defvar mh-folder-unseen-seq-name' called a function to @@ -4841,11 +4841,11 @@ 2002-01-15 Peter S Galbraith <psg@debian.org> - * mh-comp.el (mh-insert-prefix-string): Wrap a + * mh-comp.el (mh-insert-prefix-string): Wrap a "(let ((zmacs-regions nil))" around (mark) so it works in XEmacs. Bug reported and fix suggested by Will Partain <partain@dcs.gla.ac.uk> Indeed, this is how it appears in XEmacs-21's mh-comp.el. - + 2001-12-16 Jeffrey C Honig <jch@honig.net> * mh-comp.el (mh-forward): Move the assignment to `fwd-msg-file' @@ -4855,7 +4855,7 @@ * mh-utils.el: Add defcustoms for `mh-temp-folders-buffer' and `mh-temp-sequences-buffer'. - + * mh-e.el (mh-quit): If they exist, kill 'mh-temp-buffer, 'mh-temp-folders-buffer and 'mh-temp-sequences-buffer when quitting. @@ -4864,7 +4864,7 @@ (a defcustom initialized to "*Folders*") for folder listing. Put into view mode and set it up to kill the buffer when exiting view mode. - + * mh-seq.el (mh-list-sequences): Use `mh-temp-sequences-buffer' (a defcustom initialized to "*Sequences") for sequences listing. Put into view mode and set it up to kill the buffer when exiting @@ -4903,7 +4903,7 @@ (MH-E-IMG2): New variable to hold images in mail sub-directory. (dist): Updated target to make mail sub-directory and copy MH-E-IMG2 images there. - + * mh-xemacs-compat.el: Modified docs per GNU coding conventions. * mh-e.el: Reorganized variables having to do with the scan line. @@ -4945,8 +4945,8 @@ bound in XEmacs. * mh-xemacs-compat.el: GNU Emacs Functions needed by XEmacs. - New file. - * mh-e.el: (require 'mh-xemacs-compat) when running XEmacs. + New file. + * mh-e.el: (require 'mh-xemacs-compat) when running XEmacs. 2001-12-12 Peter S Galbraith <psg@debian.org> @@ -4960,10 +4960,10 @@ transient-mark-mode not bound in XEmacs. The feature of operations made on all messages in the selected range when transient-mark-mode is on doesn't work in XEmacs. - + * mh-e.el, mh-utils: Conditionalize calls to 'add-to-list 'facemenu-unlisted-faces for XEmacs. - + 2001-12-11 Jeffrey C Honig <jch@honig.net> * mh-e.el (mh-scan-format): Add `mh-scan-format-file' variable to @@ -4980,14 +4980,14 @@ (mh-scan.font-lock-regexp): Adapted to new format. (mh-folder-font-lock-keywords): Use new format. - * mh-e.el (page-down.xpm): Icon renamed from nextpage. + * mh-e.el (page-down.xpm): Icon renamed from nextpage. * mh-utils.el (mh-decode-quoted-printable): Bug fix. Better check on what actually is a quoted-printable attachment. 2001-12-06 Eric Ding <ericding@alum.mit.edu> - * mh-mime.el (mh-mhn-compose-insertion, mh-mhn-compose-anon-ftp): + * mh-mime.el (mh-mhn-compose-insertion, mh-mhn-compose-anon-ftp): require mailcap.el here rather than using autoload at top of mh-mime. (mh-file-mime-type): get rid of unused variables (why were they @@ -5031,9 +5031,9 @@ * mh-e.el (mh-cur-scan-msg-regexp): Match 0 is the whole line. (mh-folder-current-msg-face): New face with only a background settings, used in font-lock for the current message. - (mh-folder-font-lock-keywords): Use mh-folder-current-msg-face for + (mh-folder-font-lock-keywords): Use mh-folder-current-msg-face for mh-cur-scan-msg-regexp. - + * mh-utils.el (mh-show-from-face): Use red3 instead of red for light backgrounds. It's not as bright on the eyes. (mh-show-subject-face): copy from mh-folder-subject-face instead. @@ -5081,7 +5081,7 @@ 2001-12-04 Bill Wohler <wohler@newt.com> * Released mh-e version 5.0.92. - + * mh-utils.el (gnus-cite-face-list) (mh-gnus-article-highlight-citation): Don't autoload. Revert to requiring in `mh-gnus-article-highlight-citation' as before. With @@ -5091,7 +5091,7 @@ 2001-12-03 Bill Wohler <wohler@newt.com> * Released mh-e version 5.0.91. - + * MH-E-NEWS: Removed info about bumping up `max-specpdl-size' now that workaround has been implemented. @@ -5100,16 +5100,16 @@ (clean): New target that blows away MH-E-OBJ. (dist): Added $(MH-E-OBJ) to tarball. - + Attempt to quiet compilation errors to a dull roar. - + * mh-e.el: Require easymenu, added autoload of info. (mh-smail, mh-smail-other-window): Comment says these were needed - by Emacs 18. Out! + by Emacs 18. Out! * mh-utils.el: Don't require sendmail, but require mh-e. Moved autoloads to top of file, and autoload gnus-cite and - sendmail too. + sendmail too. * mh-pick.el: Require easymenu. Remove cond on `easy-menu-define'--it exists. @@ -5119,7 +5119,7 @@ * mh-comp.el: Require mh-e and easymenu, moved autoloads to top of file. - + * Makefile: (EMACS): New constant to hold emacs calling sequence. (install): Renamed to install-emacs. (compile): New target to compile all files. @@ -5133,7 +5133,7 @@ 2001-12-03 Peter S Galbraith <psg@debian.org> * mh-e.el (mh-folder-tool-bar-map): Change tooltip for exec icon. - + * mh-e.el (mh-folder-subject-face): Change to IndianRed1. (mh-folder-followup-face): Change to IndianRed. (mh-folder-deleted-face): Use sedate face instead of bright one. @@ -5190,14 +5190,14 @@ Keymap changes and rationale. The sub-keymaps allowed some consistency (e.g., esp. with l(ist) and k(ill). - + e Deleted. Already have x. Now used by mh-edit-again. a Deleted. Already have r. Now used by mh-extract-rej.. j Deleted. Already have g. - + M-a -> e Better mnemonic. Matches rmail. Frees movement cmd. M-e -> a Try `a'gain! - + M-f -> Fv Frees movement command M-f -> Ff Alias (keep?) M-f -> Fo Alias (keep?) @@ -5207,7 +5207,7 @@ M-r -> Fr Frees movement command M-s -> Fs No reason but to keep with folder commands M-u -> Fu No reason but to keep with folder commands - + M-% -> Sd Better mnemonic M-# -> Sk Better mnemonic M-q -> Sl Better mnemonic @@ -5232,7 +5232,7 @@ (mh-folder-mode-map): Defined by gnus-define-keys. Otherwise than the new threading functions, no changes to the UI were made at this point--saving that for the next check-in. - + * mh-pick.el (mh-pick-mode-map): Use gnus-define-keys. Now requires gnus-util. @@ -5311,7 +5311,7 @@ mh-delete-line. Using invisible text property is nicer in some ways, but winds up with somewhat mysterious behavior should user kill/yank stuff from the header (i.e., text gets yanked invisibly - and won't be seen by user until file is reloaded). + and won't be seen by user until file is reloaded). 2001-11-29 Bill Wohler <wohler@newt.com> @@ -5331,11 +5331,11 @@ mh-scan-subject-regexp instead. (mh-folder-font-lock-keywords): Use mh-folder-font-lock-subject instead of obsolete mh-scan-followup-regexp variable. - (mh-folder-date-face, mh-folder-msg-number-face): - (mh-folder-subject-face, mh-folder-followup-face): + (mh-folder-date-face, mh-folder-msg-number-face): + (mh-folder-subject-face, mh-folder-followup-face): Now defined as proper faces instead of copied from font-lock faces. - + * mh-mime.el (mh-media-type-regexp): New variable. Regexp matching valid media types used in MIME attachment compositions. (mh-file-mime-type): Use mh-media-type-regexp instead of @@ -5370,7 +5370,7 @@ second paren expression is the user match. (mh-folder-font-lock-keywords): Change from 1st to 2nd parenthesized expression to match user name, after Jeffrey's change to the regexps. - + 2001-11-29 Bill Wohler <Bill.Wohler@openwave.com> * mh-utils.el (mh-clean-message-header): Default is now t. @@ -5447,13 +5447,13 @@ * mh-utils.el (mh-show-font-lock-keywords): and various faces... scoped within eval-after-load "font-lock" to avoid requiring font-lock to use its faces. - * mh-e.el (mh-folder-font-lock-keywords): Same. + * mh-e.el (mh-folder-font-lock-keywords): Same. 2001-11-27 Jeffrey C Honig <jch@honig.net> * mh-mime.el (mh-file-mime-type): Use mh-temp-buffer instead of " *mh-temp". - + * mh-comp.el (mh-insert-x-mailer): Kill mh-temp-buffer after use. 2001-11-26 Eric Ding <ericding@alum.mit.edu> @@ -5514,7 +5514,7 @@ (mh-decode-quoted-printable-region): Move (require 'hexl) outside while loop. (mh-decode-quoted-printable): give user a choice between using - internal code or external program to decode quoted-printable + internal code or external program to decode quoted-printable content. Resurrect code that calls external mimedecode program. 2001-11-25 Peter S Galbraith <psg@debian.org> @@ -5577,7 +5577,7 @@ * mh-utils.el (mh-show-mouse): New function to click on a message in folder-mode and show that message. * mh-e.el (mh-folder-mode-map): Bind mh-show-mouse to mouse-2. - + * mh-e.el (mh-page-msg): Show buffer first if not displayed, instead of simply complaining there's no other window. @@ -5586,13 +5586,13 @@ * mh-mime.el (mh-have-file-command): try to non-fatally load executable.el because emacs20 doesn't autoload it. - * mh-utils.el (load "executable" t t): Idem. + * mh-utils.el (load "executable" t t): Idem. * mh-utils.el (mh-clean-msg-header): Bug fix. locally bind after-change-functions to nil, working around a strange font-lock - bug in emacs20 when (add-hook 'mh-show-mode-hook 'turn-on-font-lock) + bug in emacs20 when (add-hook 'mh-show-mode-hook 'turn-on-font-lock) was used. - + * mh-comp.el (require 'sendmail): Moved from mh-comp.el to mh-utils.el because it is needed in reading mail too. (mh-header-field-end, mh-in-header-p): Moved to mh-utils.el @@ -5640,7 +5640,7 @@ to customizing mh-compose group. * mh-utils.el (mh-show-mode): font-lock bug fix. Locally set - font-lock-support-mode to nil. + font-lock-support-mode to nil. (mh-letter-header-font-lock, mh-header-field-font-lock): font-lock bug fix. Don't return match beyond font-lock search limit. @@ -5650,7 +5650,7 @@ 2001-11-19 Peter S Galbraith <psg@debian.org> * mh-comp.el (mh-letter-tool-bar-map): tool-bar help button goes - to 'Draft Editing' info node. + to 'Draft Editing' info node. * mh-utils.el (mh-show-from-face, mh-show-to-face): New faces used for font-lock. @@ -5677,8 +5677,8 @@ * mh-comp.el (mh-letter-tool-bar-map): made both references to mh-letter-tool-bar-map conditional on tool-bar-mode, instead of - just one. - + just one. + 2001-11-19 Bill Wohler <wohler@newt.com> * mh-comp.el (mh-position-on-field): Move to the end of the header @@ -5750,7 +5750,7 @@ version correctly. Cleaned up output and display mh-progs, etc. (Closes SF #405620.) -2001-11-15 Peter S Galbraith <psg@debian.org> +2001-11-15 Peter S Galbraith <psg@debian.org> * mh-comp.el (mh-letter-tool-bar-map): New tool-bar support for mh-letter-mode in emacs21. Uses icons from gnus/message.el. @@ -5764,7 +5764,7 @@ * mh-utils.el (mh-decode-quoted-printable-have-mimedecode): same as above. * mh-mime.el (mh-file-mime-type): Bug Fix. Some versions of - 'file' output a string like "file: Using regular magic file..." + 'file' output a string like "file: Using regular magic file..." to stderr, so discard stderr when using call-process with 'file'. 2001-11-14 Peter S Galbraith <psg@debian.org> @@ -5802,7 +5802,7 @@ * mh-utils.el (mh-find-progs): Bug fix. Add "mh/etc" to the subdirectories to search for "components". On BSD/OS, nmh is in - "/usr/contrib/mh/*". + "/usr/contrib/mh/*". 2001-11-13 Peter S Galbraith <psg@debian.org> @@ -5847,19 +5847,19 @@ 2001-11-08 Peter S Galbraith <psg@debian.org> - * mh-utils.el (mh-update-sequences-after-mh-show): + * mh-utils.el (mh-update-sequences-after-mh-show): New customizable variable telling whether to run mh-update-sequences in mh-show-mode. Default is t. - * mh-utils.el (mh-show-msg): Run mh-update-sequences when + * mh-utils.el (mh-show-msg): Run mh-update-sequences when mh-update-sequences-after-mh-show is set. 2001-11-08 Peter S Galbraith <psg@debian.org> - * mh-utils.el (mh-decode-quoted-printable-have-mimedecode): + * mh-utils.el (mh-decode-quoted-printable-have-mimedecode): New variable telling whether command 'mimedecode' is on system. (http://www.freesoft.org/CIE/FAQ/mimedeco.c) - * mh-utils.el (mh-decode-quoted-printable): - New customizable variable telling whether to run mimedecode on + * mh-utils.el (mh-decode-quoted-printable): + New customizable variable telling whether to run mimedecode on MIME message containing quoted-printable parts. mimedecode will only alter quoted-printable parts , leaving others intact, and the resulting message is still fully MIME. @@ -5869,7 +5869,7 @@ mh-decode-quoted-printable function if mh-decode-quoted-printable variable is set, to view messages containing quoted-printable characters into 8-bit. - + 2001-11-08 Peter S Galbraith <psg@debian.org> * mh-comp.el (mh-letter-mode): Set mh-mhn-compose-insert-p if @@ -5919,7 +5919,7 @@ * mh-mime.el (mh-mhn-compose-insert-p): New buffer-local variable to tell when a MIME insertion was done in a letter. * mh-mime.el (mh-mhn-compose-type): Set mh-mhn-compose-insert-p. - * mh-mime.el (mh-mhn-compose-external-type): + * mh-mime.el (mh-mhn-compose-external-type): Set mh-mhn-compose-insert-p. * mh-mime.el (mh-mhn-compose-forw): Set mh-mhn-compose-insert-p. * mh-mime.el (mh-edit-mhn): Clear mh-mhn-compose-insert-p. @@ -5944,8 +5944,8 @@ 2001-10-25 Peter S Galbraith <psg@debian.org> - * mh-utils.el (mh-recenter): Clarify docs and change '(t) to - (list 4) to match elisp doc on what C-u prefix argument actually is. + * mh-utils.el (mh-recenter): Clarify docs and change '(t) to + (list 4) to match elisp doc on what C-u prefix argument actually is. 2001-10-23 Peter S Galbraith <psg@debian.org> @@ -5991,7 +5991,7 @@ * mh-e.el: Change font-lock patterns for folders. Fontify scan.font-lock patterns (which will be documented) and fontify subject lines prefixed with "Re:" differently. - * mh-comp.el (mh-letter-mode): Add font-lock support as in + * mh-comp.el (mh-letter-mode): Add font-lock support as in mh-show-mode. 2001-04-14 chad brown <y@mit.edu> @@ -6003,7 +6003,7 @@ * preliminary (somewhat boring) font-lock support for mh-e. More interesting font-lock support probably wants to have better support for multiple format files - + 2001-02-24 chad brown <y@mit.edu> * add default nmh paths to mh-find-prog in mh-utils.el. diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index 0e45edf288a..5c56ab8b2af 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el @@ -1,7 +1,7 @@ ;;; mh-alias.el --- MH-E mail alias completion and expansion ;; ;; Copyright (C) 1994, 1995, 1996, 1997, 2001, 2002 Free Software Foundation, Inc. - + ;; Author: Peter S. Galbraith <psg@debian.org> ;; Maintainer: Bill Wohler <wohler@newt.com> ;; Keywords: mail @@ -93,7 +93,7 @@ ;;; Change Log: -;; $Id: mh-alias.el,v 1.25 2003/01/27 04:16:47 wohler Exp $ +;; $Id: mh-alias.el,v 1.2 2003/02/03 20:55:30 wohler Exp $ ;;; Code: diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 20e7ecf4ee9..d6b4f9754b6 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -30,7 +30,7 @@ ;;; Change Log: -;; $Id: mh-comp.el,v 1.173 2003/01/26 19:37:22 jchonig Exp $ +;; $Id: mh-comp.el,v 1.2 2003/02/03 20:55:30 wohler Exp $ ;;; Code: @@ -552,7 +552,7 @@ for the reply. See also documentation for `\\[mh-send]' function." t))) (delete-other-windows) (save-buffer) - + (let ((to (mh-get-header-field "To:")) (subject (mh-get-header-field "Subject:")) (cc (mh-get-header-field "Cc:"))) @@ -1151,7 +1151,7 @@ CONFIG is the window configuration to restore after sending the letter." (pop-to-buffer draft) (if mh-insert-mail-followup-to-flag (mh-insert-mail-followup-to)) (mh-letter-mode) - + ;; mh-identity support (if (and (boundp 'mh-identity-default) mh-identity-default) @@ -1160,7 +1160,7 @@ CONFIG is the window configuration to restore after sending the letter." mh-identity-list) (mh-identity-make-menu) (easy-menu-add mh-identity-menu)) - + (setq mh-sent-from-folder sent-from-folder) (setq mh-sent-from-msg sent-from-msg) (setq mh-send-args send-args) @@ -1389,7 +1389,7 @@ yanked message will be deleted." ;; Insert the string to filter (insert string) (goto-char (point-min)) - + ;; Remove the MIME buttons (let ((can-move-forward t) (in-button nil)) @@ -1486,7 +1486,7 @@ passing the prefix ARG if any." (looking-at "^.*\\(to\\|cc\\|from\\):"))) (mh-alias-letter-expand-alias) (funcall mh-letter-complete-function arg)))) - + ;;; Build the letter-mode keymap: ;;; If this changes, modify mh-letter-mode-help-messages accordingly, above. (gnus-define-keys mh-letter-mode-map diff --git a/lisp/mh-e/mh-customize.el b/lisp/mh-e/mh-customize.el index 9bc67afcfa3..566fbf60a7c 100644 --- a/lisp/mh-e/mh-customize.el +++ b/lisp/mh-e/mh-customize.el @@ -55,7 +55,7 @@ ;;; Change Log: -;; $Id: mh-customize.el,v 1.30 2003/02/02 17:28:50 wohler Exp $ +;; $Id: mh-customize.el,v 1.2 2003/02/03 20:55:30 wohler Exp $ ;;; Code: (provide 'mh-customize) @@ -504,7 +504,7 @@ See `mh-search-folder' and `mh-index-search' for details." 'mh-foldertoolbar-help :help mh-tool-bar-item-help)) tool-bar-map)) - + (setq mh-folder-seq-tool-bar-map (let ((tool-bar-map (copy-keymap mh-folder-tool-bar-map))) (if (member mh-tool-bar-item-widen mh-tool-bar-folder-buttons) @@ -1589,7 +1589,7 @@ will be removed from the unseen sequence." (t (:italic t))) "Face for highlighting body text in MH-Folder buffers." :group 'mh-folder-faces) - + (defvar mh-folder-cur-msg-face 'mh-folder-cur-msg-face "Face for the current message line in MH-Folder buffers.") (defface mh-folder-cur-msg-face diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el index 1707793e114..fe4afd8955b 100644 --- a/lisp/mh-e/mh-funcs.el +++ b/lisp/mh-e/mh-funcs.el @@ -32,7 +32,7 @@ ;;; Change Log: -;; $Id: mh-funcs.el,v 1.43 2003/01/26 00:57:35 jchonig Exp $ +;; $Id: mh-funcs.el,v 1.2 2003/02/03 20:55:30 wohler Exp $ ;;; Code: @@ -427,7 +427,7 @@ Default directory is the last directory used, or initially the value of (mh-ephem-message (substitute-command-keys (mapconcat 'identity (cdr (assoc nil mh-help-messages)) "")))) - + ;;;###mh-autoload (defun mh-prefix-help () "Display cheat sheet for the commands of the current prefix in minibuffer." diff --git a/lisp/mh-e/mh-identity.el b/lisp/mh-e/mh-identity.el index 1347225a2ed..43abedab5ce 100644 --- a/lisp/mh-e/mh-identity.el +++ b/lisp/mh-e/mh-identity.el @@ -37,7 +37,7 @@ ;;; Change Log: -;; $Id: mh-identity.el,v 1.17 2002/12/03 15:54:27 psg Exp $ +;; $Id: mh-identity.el,v 1.2 2003/02/03 20:55:30 wohler Exp $ ;;; Code: @@ -79,7 +79,7 @@ (customize-save-variable 'mh-identity-default mh-identity-local) t] ))))) - + ;;;###mh-autoload (defun mh-identity-list-set (symbol value) "Update the `mh-identity-list' variable, and rebuild the menu. diff --git a/lisp/mh-e/mh-index.el b/lisp/mh-e/mh-index.el index 2a6cceb1389..a9da26953de 100644 --- a/lisp/mh-e/mh-index.el +++ b/lisp/mh-e/mh-index.el @@ -32,7 +32,7 @@ ;;; namazu ;;; glimpse ;;; grep -;;; +;;; ;;; (2) To use this package, you first have to build an index. Please read ;;; the documentation for `mh-index-search' to get started. That ;;; documentation will direct you to the specific instructions for your @@ -40,7 +40,7 @@ ;;; Change Log: -;; $Id: mh-index.el,v 1.83 2003/01/27 04:16:47 wohler Exp $ +;; $Id: mh-index.el,v 1.2 2003/02/03 20:55:30 wohler Exp $ ;;; Code: @@ -883,11 +883,11 @@ First create the directory /home/user/Mail/.mairix. Then create the file # This should contain the same thing as your `mh-user-path' base=/home/user/Mail - + # List of folders that should be indexed. 3 dots at the end means there are # subfolders within the folder mh_folders=archive...:inbox:drafts:news:sent:trash - + vfolder_format=raw database=/home/user/Mail/mairix/database diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index 34332dc202a..9b148264003 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el @@ -30,7 +30,7 @@ ;;; Change Log: -;; $Id: mh-utils.el,v 1.214 2003/01/27 04:42:23 wohler Exp $ +;; $Id: mh-utils.el,v 1.2 2003/02/03 20:55:30 wohler Exp $ ;;; Code: @@ -518,7 +518,7 @@ message about the fontification operation." ;; Full path of directory for this folder. (defvar mh-folder-filename nil) - + ;;Number of msgs in buffer. (defvar mh-msg-count nil) @@ -658,7 +658,7 @@ Stronger than `save-excursion', weaker than `save-window-excursion'." (clear-visited-file-modtime) (unlock-buffer) (setq buffer-file-name nil)) - + ;;;###mh-autoload (defun mh-get-msg-num (error-if-no-message) "Return the message number of the displayed message. @@ -1532,7 +1532,7 @@ The message number width portion of the format is discovered using (format mh-scan-msg-format-string width) (substring fmt end)))) fmt)) - + (defun mh-message-number-width (folder) "Return the widest message number in this FOLDER." (or mh-progs (mh-find-path)) diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 13c23245439..1ac2311e266 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -428,7 +428,7 @@ ;; ange-ftp-bs2000-special-prefix because names starting with # or @ ;; are reserved for temporary files. ;; This is especially important for auto-save files. -;; Valid file generations are ending with ([+|-|*]0-9...) . +;; Valid file generations are ending with ([+|-|*]0-9...) . ;; File generations are not supported yet! ;; A filename must at least contain one character (A-Z) and cannot be longer ;; than 41 characters. diff --git a/lisp/net/eudcb-bbdb.el b/lisp/net/eudcb-bbdb.el index a434e96ffb0..1c20c7cc185 100644 --- a/lisp/net/eudcb-bbdb.el +++ b/lisp/net/eudcb-bbdb.el @@ -50,7 +50,7 @@ (eudc-protocol-set 'eudc-query-function 'eudc-bbdb-query-internal 'bbdb) (eudc-protocol-set 'eudc-list-attributes-function nil 'bbdb) -(eudc-protocol-set 'eudc-protocol-attributes-translation-alist +(eudc-protocol-set 'eudc-protocol-attributes-translation-alist 'eudc-bbdb-attributes-translation-alist 'bbdb) (eudc-protocol-set 'eudc-bbdb-conversion-alist nil 'bbdb) (eudc-protocol-set 'eudc-protocol-has-default-query-attributes nil 'bbdb) @@ -68,23 +68,23 @@ (notes (cdr (assq 'notes query))) (phone (cdr (assq 'phone query)))) (list name company net notes phone))) - + (defun eudc-bbdb-filter-non-matching-record (record) "Return RECORD if it matches `eudc-bbdb-current-query', nil otherwise." (catch 'unmatch (progn - (mapcar - (function + (mapcar + (function (lambda (condition) (let ((attr (car condition)) (val (cdr condition)) (case-fold-search t) bbdb-val) (or (and (memq attr '(firstname lastname aka company phones addresses net)) - (progn - (setq bbdb-val - (eval (list (intern (concat "bbdb-record-" + (progn + (setq bbdb-val + (eval (list (intern (concat "bbdb-record-" (symbol-name attr))) 'record))) (if (listp bbdb-val) @@ -108,7 +108,7 @@ (if eudc-bbdb-use-locations-as-attribute-names (cons (intern (bbdb-phone-location phone)) (bbdb-phone-string phone)) - (cons 'phones (format "%s: %s" + (cons 'phones (format "%s: %s" (bbdb-phone-location phone) (bbdb-phone-string phone)))))) (bbdb-record-phones record))) @@ -123,7 +123,7 @@ (concat s "\n")) (unless (= 0 (length (setq s (bbdb-address-street3 address)))) (concat s "\n")) - (progn + (progn (setq c (bbdb-address-city address)) (setq s (bbdb-address-state address)) (if (and (> (length c) 0) (> (length s) 0)) @@ -143,7 +143,7 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'" attr eudc-rec val) - (while (prog1 + (while (prog1 (setq attr (car attrs)) (setq attrs (cdr attrs))) (cond @@ -152,15 +152,15 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'" ((eq attr 'addresses) (setq val (eudc-bbdb-extract-addresses record))) ((memq attr '(firstname lastname aka company net notes)) - (setq val (eval - (list (intern - (concat "bbdb-record-" + (setq val (eval + (list (intern + (concat "bbdb-record-" (symbol-name attr))) 'record)))) (t (setq val "Unknown BBDB attribute"))) (if val - (cond + (cond ((memq attr '(phones addresses)) (setq eudc-rec (append val eudc-rec))) ((and (listp val) @@ -171,14 +171,14 @@ The record is filtered according to `eudc-bbdb-current-return-attributes'" (t (error "Unexpected attribute value"))))) (nreverse eudc-rec))) - + (defun eudc-bbdb-query-internal (query &optional return-attrs) "Query BBDB with QUERY. -QUERY is a list of cons cells (ATTR . VALUE) where ATTRs should be valid -BBDB attribute names. -RETURN-ATTRS is a list of attributes to return, defaulting to +QUERY is a list of cons cells (ATTR . VALUE) where ATTRs should be valid +BBDB attribute names. +RETURN-ATTRS is a list of attributes to return, defaulting to `eudc-default-return-attributes'." (let ((eudc-bbdb-current-query query) @@ -202,15 +202,15 @@ RETURN-ATTRS is a list of attributes to return, defaulting to ;; If there were duplicate attributes reverse the order of the ;; record so the unique attributes appear first (if (> (length filtered) 1) - (setq filtered (mapcar (function + (setq filtered (mapcar (function (lambda (rec) (reverse rec))) filtered))) (setq result (append result filtered)))) (delq nil - (mapcar 'eudc-bbdb-format-record-as-result - (delq nil - (mapcar 'eudc-bbdb-filter-non-matching-record + (mapcar 'eudc-bbdb-format-record-as-result + (delq nil + (mapcar 'eudc-bbdb-filter-non-matching-record records))))) result)) diff --git a/lisp/net/goto-addr.el b/lisp/net/goto-addr.el index 47b49725563..42c4bca8bf8 100644 --- a/lisp/net/goto-addr.el +++ b/lisp/net/goto-addr.el @@ -208,7 +208,7 @@ there, then load the URL at or before point." (interactive) (save-excursion (let ((address (save-excursion (goto-address-find-address-at-point)))) - (if (and address + (if (and address (save-excursion (goto-char (previous-single-char-property-change (point) 'goto-address nil diff --git a/lisp/net/quickurl.el b/lisp/net/quickurl.el index 0751aec4286..22794a41078 100644 --- a/lisp/net/quickurl.el +++ b/lisp/net/quickurl.el @@ -264,7 +264,7 @@ It also restores point after the `read'." (save-excursion (setf (point) (point-min)) (setq quickurl-urls (funcall quickurl-sort-function (read buffer))))) - + (defun quickurl-load-urls () "Load the contents of `quickurl-url-file' into `quickurl-urls'." (when (file-exists-p quickurl-url-file) @@ -280,7 +280,7 @@ It also restores point after the `read'." (pp quickurl-urls) (princ quickurl-postfix) (write-region (point-min) (point-max) quickurl-url-file nil 0)))) - + (defun quickurl-find-url (lookup) "Return URL associated with key LOOKUP. @@ -327,7 +327,7 @@ buffer, this default action can be modifed via (let ((url (quickurl-find-url lookup))) (when url (quickurl-insert url)))) - + (defun quickurl-grab-url () "Attempt to grab a word/url pair from point in the current buffer. @@ -370,7 +370,7 @@ is decided." (read-string "URL: " (quickurl-url-url word-url)) (read-string "Comment: " (quickurl-url-comment word-url))))) (if (zerop (length word)) - (error "You must specify a WORD for lookup") + (error "You must specify a WORD for lookup") (quickurl-load-urls) (let* ((current-url (quickurl-find-url word)) (add-it (if current-url @@ -546,7 +546,7 @@ TYPE dictates what will be inserted, options are: (quickurl-list-make-inserter with-lookup) (quickurl-list-make-inserter with-desc) (quickurl-list-make-inserter lookup) - + (provide 'quickurl) ;;; quickurl.el ends here diff --git a/lisp/net/rcompile.el b/lisp/net/rcompile.el index b9ee7658d52..8105593c758 100644 --- a/lisp/net/rcompile.el +++ b/lisp/net/rcompile.el @@ -58,7 +58,7 @@ ;; ;; Will allow anyone access to your account without a password. I suggest you ;; read the rhosts(5) manual page before you edit this file (if you are not -;; familiar with it already) +;; familiar with it already) ;;; Code: diff --git a/lisp/net/telnet.el b/lisp/net/telnet.el index abfd5b582ac..b75ff47220d 100644 --- a/lisp/net/telnet.el +++ b/lisp/net/telnet.el @@ -30,7 +30,7 @@ ;; sessions are supported. ;; ;; Normally, input is sent to the remote telnet/rsh line-by-line, as you -;; type RET or LFD. C-c C-c sends a C-c to the remote immediately; +;; type RET or LFD. C-c C-c sends a C-c to the remote immediately; ;; C-c C-z sends C-z immediately. C-c C-q followed by any character ;; sends that character immediately. ;; @@ -112,7 +112,7 @@ rejecting one login and prompting again for a username and password.") (define-key telnet-mode-map "\C-m" 'telnet-send-input) ; (define-key telnet-mode-map "\C-j" 'telnet-send-input) (define-key telnet-mode-map "\C-c\C-q" 'send-process-next-char) - (define-key telnet-mode-map "\C-c\C-c" 'telnet-interrupt-subjob) + (define-key telnet-mode-map "\C-c\C-c" 'telnet-interrupt-subjob) (define-key telnet-mode-map "\C-c\C-z" 'telnet-c-z)) ;;maybe should have a flag for when have found type @@ -214,7 +214,7 @@ Normally input is edited in Emacs and sent a line at a time." process) (if (and buffer (get-buffer-process buffer)) (pop-to-buffer (concat "*" name "*")) - (pop-to-buffer + (pop-to-buffer (apply 'make-comint name telnet-program nil telnet-options)) (setq process (get-buffer-process (current-buffer))) (set-process-filter process 'telnet-initial-filter) diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index b24b53d421a..eebd84a2673 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -328,7 +328,7 @@ KEEP-DATE is not handled in case NEWNAME resides on an SMB server." (cons x (file-attributes (if full x (concat (file-name-as-directory directory) x))))) (directory-files directory full match nosort))) - + (defun tramp-smb-handle-file-attributes (filename &optional nonnumeric) "Like `file-attributes' for tramp files. Optional argument NONNUMERIC means return user and group name @@ -477,7 +477,7 @@ WILDCARD and FULL-DIRECTORY-P are not handled." (entries (tramp-smb-get-file-entries user host share file))) ;; Delete dummy "" entry, useless entries - (setq entries + (setq entries (if (file-directory-p filename) (delq (assoc "" entries) entries) ;; We just need the only and only entry FILENAME. diff --git a/lisp/net/tramp-vc.el b/lisp/net/tramp-vc.el index d59269680e5..4e96303a0fe 100644 --- a/lisp/net/tramp-vc.el +++ b/lisp/net/tramp-vc.el @@ -43,7 +43,7 @@ ;; This used to blow away the file-name-handler-alist and reinstall ;; TRAMP into it. This was intended to let VC work remotely. It didn't, ;; at least not in my XEmacs 21.2 install. -;; +;; ;; In any case, tramp-run-real-handler now deals correctly with disabling ;; the things that should be, making this a no-op. ;; @@ -88,7 +88,7 @@ See `vc-do-command' for more information." (set (make-local-variable 'vc-parent-buffer-name) (concat " from " (buffer-name camefrom))) (setq default-directory olddir) - + (erase-buffer) (mapcar @@ -216,7 +216,7 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." (if (or (and (stringp file) (tramp-tramp-file-p file)) (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name)))) (setq ad-return-value - (apply 'tramp-vc-do-command-new buffer okstatus command + (apply 'tramp-vc-do-command-new buffer okstatus command file ;(or file (buffer-file-name)) flags)) ad-do-it))) @@ -229,7 +229,7 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." (if (or (and (stringp file) (tramp-tramp-file-p file)) (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name)))) (setq ad-return-value - (apply 'tramp-vc-do-command buffer okstatus command + (apply 'tramp-vc-do-command buffer okstatus command (or file (buffer-file-name)) last flags)) ad-do-it)))) ;;-) @@ -283,7 +283,7 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." (tramp-wait-for-output) (setq exec-status (read (current-buffer))) (message "Command %s returned status %d." command exec-status))) - + ;; Maybe okstatus can be `async' here. But then, maybe the ;; async thing is new in Emacs 21, but this function is only ;; used in Emacs 20. @@ -304,7 +304,7 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." (if (or (and (stringp file) (tramp-tramp-file-p file)) (and (buffer-file-name) (tramp-tramp-file-p (buffer-file-name)))) (setq ad-return-value - (apply 'tramp-vc-simple-command okstatus command + (apply 'tramp-vc-simple-command okstatus command (or file (buffer-file-name)) args)) ad-do-it))) @@ -362,17 +362,17 @@ Since TRAMP doesn't do async commands yet, this function doesn't, either." ;; Do we need to advise the vc-user-login-name function anyway? -;; This will return the correct login name for the owner of a +;; This will return the correct login name for the owner of a ;; file. It does not deal with the default remote user name... ;; -;; That is, when vc calls (vc-user-login-name), we return the +;; That is, when vc calls (vc-user-login-name), we return the ;; local login name, something that may be different to the remote -;; default. +;; default. ;; ;; The remote VC operations will occur as the user that we logged ;; in with however - not always the same as the local user. ;; -;; In the end, I did advise the function. This is because, well, +;; In the end, I did advise the function. This is because, well, ;; the thing didn't work right otherwise ;) ;; ;; Daniel Pittman <daniel@danann.net> @@ -417,11 +417,11 @@ filename we are thinking about..." (tramp-handle-vc-user-login-name uid)))) ; get the owner name ad-do-it))) ; else call the original - + ;; Determine the name of the user owning a file. (defun tramp-file-owner (filename) "Return who owns FILE (user name, as a string)." - (let ((v (tramp-dissect-file-name + (let ((v (tramp-dissect-file-name (tramp-handle-expand-file-name filename)))) (if (not (tramp-handle-file-exists-p filename)) nil ; file cannot be opened diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 864fe35efe9..1efc50f0d6b 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. -;; Author: Kai.Grossjohann@CS.Uni-Dortmund.DE +;; Author: Kai.Grossjohann@CS.Uni-Dortmund.DE ;; Keywords: comm, processes ;; This file is part of GNU Emacs. @@ -34,7 +34,7 @@ ;; ;; Notes: ;; ----- -;; +;; ;; This package only works for Emacs 20 and higher, and for XEmacs 21 ;; and higher. (XEmacs 20 is missing the `with-timeout' macro. Emacs ;; 19 is reported to have other problems. For XEmacs 21, you need the @@ -95,7 +95,7 @@ (unless (fboundp 'uudecode-decode-region) (autoload 'uudecode-decode-region "uudecode")) -;; ;; It does not work to load EFS after loading TRAMP. +;; ;; It does not work to load EFS after loading TRAMP. ;; (when (fboundp 'efs-file-handler-function) ;; (require 'efs)) @@ -483,7 +483,7 @@ This variable defaults to the value of `tramp-encoding-shell'." (tramp-su-args nil) (tramp-telnet-program nil) (tramp-telnet-args nil)) - ("fcp" + ("fcp" (tramp-connection-function tramp-open-connection-rsh) (tramp-rsh-program "fsh") (tramp-rcp-program "fcp") @@ -1782,7 +1782,7 @@ target of the symlink differ." (setq filename (tramp-file-name-path (tramp-dissect-file-name (expand-file-name filename))))) - + ;; Right, they are on the same host, regardless of user, method, etc. ;; We now make the link on the remote machine. This will occur as the user ;; that FILENAME belongs to. @@ -1791,7 +1791,7 @@ target of the symlink differ." l-multi-method l-method l-user l-host (format "cd %s && %s -sf %s %s" cwd ln - filename + filename l-path) t))))) @@ -2063,7 +2063,7 @@ is initially created and is kept cached by the remote shell." multi-method method user host path)) (tramp-send-command multi-method method user host - (format "tramp_file_attributes %s" + (format "tramp_file_attributes %s" (tramp-shell-quote-argument path))) (tramp-wait-for-output) (let ((result (read (current-buffer)))) @@ -2403,7 +2403,7 @@ if the remote host can't provide the modtime." (push (buffer-substring (point) (tramp-line-end-position)) result)) - + (tramp-send-command multi-method method user host "cd") (tramp-wait-for-output) @@ -2647,7 +2647,7 @@ This is like `dired-recursive-delete-directory' for tramp files." 'file-error (list "Removing old file name" "no such directory" filename))) ;; Which is better, -r or -R? (-r works for me <daniel@danann.net>) - (tramp-send-command multi-method method user host + (tramp-send-command multi-method method user host (format "rm -r %s" (tramp-shell-quote-argument path))) ;; Wait for the remote system to return to us... ;; This might take a while, allow it plenty of time. @@ -2655,7 +2655,7 @@ This is like `dired-recursive-delete-directory' for tramp files." ;; Make sure that it worked... (and (tramp-handle-file-exists-p filename) (error "Failed to recusively delete %s" filename)))) - + (defun tramp-handle-dired-call-process (program discard &rest arguments) "Like `dired-call-process' for tramp files." @@ -3505,7 +3505,7 @@ necessary anymore." ;; `tramp-completion-file-name-regexp-unified' aren't different. ;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to ;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'. -;; Using `last-input-event' is a little bit risky, because completing a file +;; Using `last-input-event' is a little bit risky, because completing a file ;; might require loading other files, like "~/.netrc", and for them it ;; shouldn't be decided based on that variable. On the other hand, those files ;; shouldn't have partial tramp file name syntax. Maybe another variable should @@ -3594,7 +3594,7 @@ necessary anymore." (funcall (nth 0 x) (nth 1 x))))) (tramp-get-completion-function m)) - (setq result (append result + (setq result (append result (mapcar (lambda (x) (tramp-get-completion-user-host @@ -3635,7 +3635,7 @@ necessary anymore." ;; [nil nil "x" nil nil] ;; [nil "x" nil nil nil] -;; "/x:" "/x:y" "/x:y:" +;; "/x:" "/x:y" "/x:y:" ;; [nil nil nil "x" ""] [nil nil nil "x" "y"] [nil "x" nil "y" ""] ;; "/[x/" "/[x/y" ;; [nil "x" nil "" nil] [nil "x" nil "y" nil] @@ -4154,7 +4154,7 @@ file exists and nonzero exit status otherwise." (tramp-handle-file-exists-p existing) (not (tramp-handle-file-exists-p nonexisting)))) (error "Couldn't find command to check if file exists.")))) - + ;; CCC test ksh or bash found for tilde expansion? (defun tramp-find-shell (multi-method method user host) @@ -4253,9 +4253,9 @@ Returns nil if none was found, else the command is returned." (tramp-check-ls-commands multi-method method user host "gnuls" tramp-remote-path) (tramp-check-ls-commands multi-method method user host "gls" tramp-remote-path))) -;; ------------------------------------------------------------ -;; -- Functions for establishing connection -- -;; ------------------------------------------------------------ +;; ------------------------------------------------------------ +;; -- Functions for establishing connection -- +;; ------------------------------------------------------------ ;; The following functions are actions to be taken when seeing certain ;; prompts from the remote host. See the variable @@ -4454,7 +4454,7 @@ Maybe the different regular expressions need to be tuned. (when multi-method (error "Cannot multi-connect using telnet connection method")) (tramp-pre-connection multi-method method user host) - (tramp-message 7 "Opening connection for %s@%s using %s..." + (tramp-message 7 "Opening connection for %s@%s using %s..." (or user (user-login-name)) host method) (let ((process-environment (copy-sequence process-environment))) (setenv "TERM" tramp-terminal-type) @@ -4488,7 +4488,7 @@ Maybe the different regular expressions need to be tuned. p multi-method method user host) (tramp-post-connection multi-method method user host))))) - + (defun tramp-open-connection-rsh (multi-method method user host) "Open a connection using an rsh METHOD. This starts the command `rsh HOST -l USER'[*], then waits for a remote @@ -4519,7 +4519,7 @@ arguments, and xx will be used as the host name to connect to. (error "Cannot multi-connect using rsh connection method")) (tramp-pre-connection multi-method method user host) (if (and user (not (string= user ""))) - (tramp-message 7 "Opening connection for %s@%s using %s..." + (tramp-message 7 "Opening connection for %s@%s using %s..." user host method) (tramp-message 7 "Opening connection at %s using %s..." host method)) (let ((process-environment (copy-sequence process-environment)) @@ -4547,9 +4547,9 @@ arguments, and xx will be used as the host name to connect to. (> emacs-major-version 20)) tramp-dos-coding-system)) (p (if (and user (not (string= user ""))) - (apply #'start-process bufnam buf rsh-program + (apply #'start-process bufnam buf rsh-program host "-l" user rsh-args) - (apply #'start-process bufnam buf rsh-program + (apply #'start-process bufnam buf rsh-program host rsh-args))) (found nil)) (process-kill-without-query p) @@ -4619,10 +4619,10 @@ prompt than you do, so it is not at all unlikely that the variable tramp-actions-before-shell) (tramp-open-connection-setup-interactive-shell p multi-method method user host) - (tramp-post-connection multi-method method + (tramp-post-connection multi-method method user host))))) -;; HHH: Not Changed. Multi method. It is not clear to me how this can +;; HHH: Not Changed. Multi method. It is not clear to me how this can ;; handle not giving a user name in the "file name". ;; ;; This is more difficult than for the single-hop method. In the @@ -4692,7 +4692,7 @@ log in as u2 to h2." (tramp-post-connection multi-method method user host))))) ;; HHH: Changed. Multi method. Don't know how to handle this in the case -;; of no user name provided. Hack to make it work as it did before: +;; of no user name provided. Hack to make it work as it did before: ;; changed `user' to `(or user (user-login-name))' in the places where ;; the value is actually used. (defun tramp-multi-connect-telnet (p method user host command) @@ -4714,8 +4714,8 @@ If USER is nil, uses the return value of (user-login-name) instead." (tramp-process-multi-actions p method user host tramp-multi-actions))) -;; HHH: Changed. Multi method. Don't know how to handle this in the case -;; of no user name provided. Hack to make it work as it did before: +;; HHH: Changed. Multi method. Don't know how to handle this in the case +;; of no user name provided. Hack to make it work as it did before: ;; changed `user' to `(or user (user-login-name))' in the places where ;; the value is actually used. (defun tramp-multi-connect-rlogin (p method user host command) @@ -4740,8 +4740,8 @@ If USER is nil, uses the return value of (user-login-name) instead." (tramp-process-multi-actions p method user host tramp-multi-actions))) -;; HHH: Changed. Multi method. Don't know how to handle this in the case -;; of no user name provided. Hack to make it work as it did before: +;; HHH: Changed. Multi method. Don't know how to handle this in the case +;; of no user name provided. Hack to make it work as it did before: ;; changed `user' to `(or user (user-login-name))' in the places where ;; the value is actually used. (defun tramp-multi-connect-su (p method user host command) @@ -5700,9 +5700,9 @@ Not actually used. Use `(format \"%o\" i)' instead?" "")) -;; ------------------------------------------------------------ -;; -- TRAMP file names -- -;; ------------------------------------------------------------ +;; ------------------------------------------------------------ +;; -- TRAMP file names -- +;; ------------------------------------------------------------ ;; Conversion functions between external representation and ;; internal data structure. Convenience functions for internal ;; data structure. @@ -5713,7 +5713,7 @@ Not actually used. Use `(format \"%o\" i)' instead?" "Return t iff NAME is a tramp file." (save-match-data (string-match tramp-file-name-regexp name))) - + ;; HHH: Changed. Used to assign the return value of (user-login-name) ;; to the `user' part of the structure if a user name was not ;; provided, now it assigns nil. @@ -5766,7 +5766,7 @@ This is MULTI-METHOD, if non-nil. Otherwise, it is METHOD, if non-nil. If both MULTI-METHOD and METHOD are nil, do a lookup in `tramp-default-method-alist'." (or multi-method method (tramp-find-default-method user host))) - + ;; HHH: Not Changed. Multi method. Will probably not handle the case where ;; a user name is not provided in the "file name" very well. (defun tramp-dissect-multi-file-name (name) @@ -6137,9 +6137,9 @@ If you want to use it for something else, you'll have to check whether it does the right thing." (delete "" (split-string string pattern))) -;; ------------------------------------------------------------ -;; -- Kludges section -- -;; ------------------------------------------------------------ +;; ------------------------------------------------------------ +;; -- Kludges section -- +;; ------------------------------------------------------------ ;; Currently (as of Emacs 20.5), the function `shell-quote-argument' ;; does not deal well with newline characters. Newline is replaced by @@ -6394,7 +6394,7 @@ report. ;; strange when doing zerop, we should kill the process and start ;; again. (Greg Stark) ;; * Add caching for filename completion. (Greg Stark) -;; Of course, this has issues with usability (stale cache bites) +;; Of course, this has issues with usability (stale cache bites) ;; -- <daniel@danann.net> ;; * Provide a local cache of old versions of remote files for the rsync ;; transfer method to use. (Greg Stark) diff --git a/lisp/net/webjump.el b/lisp/net/webjump.el index 3c2ae4c7d52..4c701b48ac5 100644 --- a/lisp/net/webjump.el +++ b/lisp/net/webjump.el @@ -1,5 +1,5 @@ ;;; webjump.el --- programmable Web hotlist - + ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. ;; Author: Neil W. Van Dyke <nwv@acm.org> @@ -109,7 +109,7 @@ "ftp://ftp.luth.se/pub/unix/gnu" "ftp://ftp.sunet.se/pub/gnu" "ftp://archive.eu.net" - ;; SOUTH AMERICA: + ;; SOUTH AMERICA: "ftp://ftp.inf.utfsm.cl/pub/gnu" "ftp://ftp.unicamp.br/pub/gnu" ;; WESTERN CANADA: @@ -133,7 +133,7 @@ "ftp://ftp.emacs.org/pub/") ;; Internet search engines. - ("AltaVista" . + ("AltaVista" . [simple-query "www.altavista.digital.com" "www.altavista.digital.com/cgi-bin/query?pg=aq&what=web&fmt=.&q=" @@ -144,12 +144,12 @@ ("Lycos" . [simple-query "www.lycos.com" "www.lycos.com/cgi-bin/pursuit?cat=lycos&query=" ""]) - ("Yahoo" . + ("Yahoo" . [simple-query "www.yahoo.com" "search.yahoo.com/bin/search?p=" ""]) ;; Misc. general interest. ("Interactive Weather Information Network" . webjump-to-iwin) - ("Usenet FAQs" . + ("Usenet FAQs" . [simple-query "www.cis.ohio-state.edu/hypertext/faq/usenet/FAQ-List.html" "www.cis.ohio-state.edu/htbin/search-usenet-faqs/form?find=" ""]) @@ -287,7 +287,7 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke ((symbolp expr) (if (fboundp expr) (funcall expr name) - (error "WebJump URL function \"%s\" undefined" + (error "WebJump URL function \"%s\" undefined" expr))) (t (error "WebJump URL expression for \"%s\" invalid" name))))))) @@ -343,11 +343,11 @@ Please submit bug reports and other feedback to the author, Neil W. Van Dyke ;; Note: I should make this more robust someday. (let ((input (webjump-read-string prompt))) (if input (string-to-number input)))) - + (defun webjump-read-string (prompt) (let ((input (read-string (concat prompt ": ")))) (if (webjump-null-or-blank-string-p input) nil input))) - + (defun webjump-read-url-choice (what urls &optional default) ;; Note: Convert this to use `webjump-read-choice' someday. (let* ((completions (mapcar (function (lambda (n) (cons n n))) diff --git a/lisp/net/zone-mode.el b/lisp/net/zone-mode.el index bb8bacacc61..a58bc2dd54a 100644 --- a/lisp/net/zone-mode.el +++ b/lisp/net/zone-mode.el @@ -62,7 +62,7 @@ (if (string-lessp new-serial old-serial) (error (format "Serial numbers want to move backwards from %s to %s" old-serial new-serial)) (replace-match (concat cur-date new-seq old-flag) t t)))))) - + ;;;###autoload (defun zone-mode-update-serial-hook () "Update the serial number in a zone if the file was modified." diff --git a/lisp/obsolete/auto-show.el b/lisp/obsolete/auto-show.el index 9a813374551..342a3499409 100644 --- a/lisp/obsolete/auto-show.el +++ b/lisp/obsolete/auto-show.el @@ -27,7 +27,7 @@ to auto-show from your init file and code." :type 'boolean :group 'auto-show) -(defcustom auto-show-shift-amount 8 +(defcustom auto-show-shift-amount 8 "*Obsolete." :type 'integer :group 'auto-show) @@ -41,7 +41,7 @@ to auto-show from your init file and code." (defun auto-show-mode (arg) "This command is obsolete." (interactive "P")) - + (defun auto-show-make-point-visible (&optional ignore-arg) "This command is obsolete." (interactive)) diff --git a/lisp/obsolete/hilit19.el b/lisp/obsolete/hilit19.el index bc06583c694..d81955ff8cb 100644 --- a/lisp/obsolete/hilit19.el +++ b/lisp/obsolete/hilit19.el @@ -30,7 +30,7 @@ ;; not only source code highlighting, but also Info, RMAIL, VM, gnus... ;; Hilit19 knows (or thinks it knows) how to highlight emacs buffers in ;; about 25 different modes. -;; +;; ;; WHERE TO GET THE LATEST VERSIONS OF HILIT19.EL (beta and release): ;; ;; http://hackvan.com/pub/stig/src/elisp/ @@ -55,7 +55,7 @@ ;; GENERAL OVERVIEW ;; ;; This package installs numerous hooks to colorfully highlight your -;; source code buffers as well as mail and news buffers. Most +;; source code buffers as well as mail and news buffers. Most ;; programming languages have predefined highlighting patterns. ;; Just load hilit19 and files will be automatically highlighted as ;; they're loaded. @@ -69,27 +69,27 @@ ;; ;; Hilit19 can build faces by examining the names that you give to them ;; For example, green/black-bold-italic-underline would be created as -;; a face with a green foreground, and a black background, using a +;; a face with a green foreground, and a black background, using a ;; bold-italic font...with underlining for good measure. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; SETUP -- In your .emacs: ;; -;; +;; ;; (cond (window-system ;; (setq hilit-mode-enable-list '(not text-mode) ;; hilit-background-mode 'light ;; hilit-inhibit-hooks nil ;; hilit-inhibit-rebinding nil) -;; +;; ;; (require 'hilit19) ;; )) -;; +;; ;; If you like font-lock-mode and want to use both packages, then you can ;; disable hilit for the modes in which you want to use font-lock by listing ;; said modes in hilit-mode-enable-list. -;; +;; ;; (hilit-translate type 'RoyalBlue ; enable highlighting in C/C++ ;; string nil) ; disable string highlighting ;; @@ -293,7 +293,7 @@ ;; ;;;;;; AND THIS CAN BE APPLIED TO VM 5.33L_19 -;; +;; ;; *** ../site/vm5.33L_19/vm-summary.el Fri Jun 4 22:17:11 1993 ;; --- ./vm-summary.el Tue Jun 22 16:39:30 1993 ;; *************** @@ -303,7 +303,7 @@ ;; (forward-char -2) ;; ! (and w vm-auto-center-summary (vm-auto-center-summary)))) ;; (and old-window (select-window old-window))))))) -;; +;; ;; (defun vm-mark-for-display-update (message) ;; --- 152,159 ---- ;; (insert "->") @@ -312,9 +312,9 @@ ;; ! (and w vm-auto-center-summary (vm-auto-center-summary)) ;; ! (run-hooks 'vm-summary-pointer-hook))) ;; (and old-window (select-window old-window))))))) -;; +;; ;; (defun vm-mark-for-display-update (message) -;; +;; ;;;;;; ;;; Code: @@ -468,16 +468,16 @@ your init file.") (keyword RoyalBlue cyan bold-italic) (label red-underline orange-underlined underline) (string grey40 orange underline) - + ;; some further faces for Ada (struct black-bold white-bold bold) (glob-struct magenta Plum1 default-bold-underline) (named-param DarkGoldenrod Goldenrod underline) - + ;; and another one for LaTeX (crossref DarkGoldenrod Goldenrod underline) (formula Goldenrod DarkGoldenrod underline) - + ;; compilation buffers (active-error default/pink-bold default/DeepPink-bold default-underline) (error red-bold yellow bold) @@ -485,7 +485,7 @@ your init file.") ;; Makefiles (some faces borrowed from C/C++ too) (rule blue-bold-underline cyan-underline default-bold-underline) - + ;; VM, GNUS and Text mode (msg-subject blue-bold yellow bold) (msg-from purple-bold green bold) @@ -512,7 +512,7 @@ your init file.") (dired-ignored ForestGreen moccasin nil) (dired-deleted red-bold-italic orange bold-italic) (dired-marked purple Plum1 nil) - + ;; Info-mode, and jargon-mode.el and prep.ai.mit.edu:/pub/gnu/jargon* (jargon-entry blue-bold cyan bold) (jargon-xref purple-bold Plum1 italic) @@ -557,9 +557,9 @@ See the documentation for hilit-lookup-face-create for names of valid faces." cmdl))) (cons 'progn cmdl))) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This function actually translates and then creates the faces... -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun hilit-lookup-face-create (face &optional force) "Get a FACE, or create it if it doesn't exist. In order for it to @@ -589,7 +589,7 @@ See the documentation for hilit-translate and hilit-face-translation-table." (basefont (cdr (assq 'font (frame-parameters frame)))) error fgcolor bgcolor) (cond - ((or (null face) + ((or (null face) (memq face hilit-predefined-face-list)) ;; do nothing if the face is nil or if it's predefined. ) @@ -616,10 +616,10 @@ See the documentation for hilit-translate and hilit-face-translation-table." (and (match-beginning 1) "#") (substring fn (match-beginning 2) (match-end 2))) fn (substring fn (match-end 0)))) - + (and (string= "default" fgcolor) (setq fgcolor nil)) (and (string= "default" bgcolor) (setq bgcolor nil)) - + ;; catch errors if we can't allocate the color(s) (condition-case nil (progn (and fgcolor (set-face-foreground 'scratch-face fgcolor)) @@ -705,7 +705,7 @@ non-nil." (cond ((null patterns) (setq patterns (cdr (assq major-mode hilit-patterns-alist)))) ((symbolp patterns) - (setq patterns (cdr (assq patterns hilit-patterns-alist))))) + (setq patterns (cdr (assq patterns hilit-patterns-alist))))) ;; txt prop: (setq patterns (reverse patterns)) (let ((case-fold-search (car patterns)) (prio (1- (length patterns))) @@ -725,11 +725,11 @@ non-nil." (if (not face) ; skipped if nil nil (or quietly hilit-quietly - (message "highlighting %d: %s%s" prio pstart + (message "highlighting %d: %s%s" prio pstart (if (stringp pend) (concat " ... " pend) ""))) (goto-char (point-min)) (condition-case msg - (cond + (cond ((symbolp pstart) ;; inner loop -- special function to find pattern (let (region) @@ -799,7 +799,7 @@ non-nil." ;; Well, I want to remove this function...there's one sure way to find out if ;; anyone uses it or not...and that's to comment it out. -;; +;; ;; (defun hilit-toggle-highlight (arg) ;; "Locally toggle highlighting. With arg, forces highlighting off." ;; (interactive "P") @@ -835,7 +835,7 @@ prefix argument if that is specified. \t^U \\[hilit-repaint-command]\trepaint entire buffer \t^U - \\[hilit-repaint-command]\trepaint visible portion of buffer \t^U n \\[hilit-repaint-command]\trepaint n lines to either side of point" - (interactive "P") + (interactive "P") (let (st en quietly) (or arg (setq arg hilit-auto-rehighlight)) (cond ((or (eq arg 'visible) (eq arg '-)) @@ -878,7 +878,7 @@ the entire buffer is forced." ;;; this line highlighting stuff is untested. play with it only if you feel ;;; adventurous...don't ask me to fix it...though you're welcome to. -- Stig -;; +;; ;; (defun hilit-rehighlight-line-quietly (&rest args) ;; "Quietly rehighlight just this line. ;; Useful as an after change hook in VM/gnus summary buffers and dired buffers. @@ -887,7 +887,7 @@ the entire buffer is forced." ;; (push-mark nil t) ;; (hilit-rehighlight-yank-region) ;; (and orig-achange-function (apply orig-achange-function args)))) -;; +;; ;; (defun hilit-install-line-hooks () ;; (make-variable-buffer-local 'after-change-function) ;; (make-local-variable 'orig-achange-function) @@ -897,11 +897,11 @@ the entire buffer is forced." ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Wysiwyg Stuff... take it away and build a whole package around it! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; +;; ;; ; For the Jargon-impaired, WYSIWYG === What You See Is What You Get ;; ; Sure, it sucks to type. Oh, well. ;; (defun hilit-wysiwyg-replace () -;; "Replace overstruck text with normal text that's been overlaid with the +;; "Replace overstruck text with normal text that's been overlaid with the ;; appropriate text attribute. Suitable for a find-file hook." ;; (save-excursion ;; (goto-char (point-min)) @@ -918,7 +918,7 @@ the entire buffer is forced." ;; (replace-match "") (forward-char)) ;; )) ;; (set-buffer-modified-p bmod)))) -;; +;; ;; ; is this more appropriate as a write-file-hook or a write-contents-hook? ;; (defun hilit-wysiwyg-write-repair () ;; "Replace wysiwyg overlays with overstrike text." @@ -942,11 +942,11 @@ the entire buffer is forced." ;; nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Initialization. +;; Initialization. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (and (not hilit-inhibit-rebinding) - (progn + (progn (substitute-key-definition 'yank 'hilit-yank (current-global-map)) (substitute-key-definition 'yank-pop 'hilit-yank-pop @@ -977,7 +977,7 @@ the entire buffer is forced." vm-show-message-hook rmail-show-message-hook - mail-setup-hook + mail-setup-hook mh-show-mode-hook dired-after-readin-hook @@ -994,7 +994,7 @@ the entire buffer is forced." ;;; inappropriate, but I don't know why I wanted hilit-patterns-alist to be ;;; reset on every reload... -(setq hilit-patterns-alist nil) +(setq hilit-patterns-alist nil) (defun hilit-associate (alist key val) "creates, or destructively replaces, the pair (key . val) in alist" @@ -1002,7 +1002,7 @@ the entire buffer is forced." (if oldentry (setcdr oldentry val) (set alist (cons (cons key val) (eval alist)))))) - + (defun hilit-set-mode-patterns (modelist patterns &optional parse-fn case-fold) "Sets the default highlighting patterns for MODE to PATTERNS. @@ -1016,7 +1016,7 @@ Takes optional arguments PARSE-FN and CASE-FOLD." (setcar (cdr p) 0)))) patterns) (setq patterns (cons case-fold patterns)) - + (or (consp modelist) (setq modelist (list modelist))) (let (ok (flip (eq (car hilit-mode-enable-list) 'not))) (mapcar (function @@ -1046,7 +1046,7 @@ Optionally, place the new pattern first in the pattern list" (hilit-set-mode-patterns mode (list new-pat))) (first (setcdr old-patterns (cons new-pat (cdr old-patterns)))) - (t + (t (nconc old-patterns (list new-pat))))) (and (interactive-p) (hilit-rehighlight-buffer))) @@ -1066,17 +1066,17 @@ number of backslashes." (skip-chars-backward "\\\\") (forward-char 1) (not (zerop (% (- en (point)) 2)))))) - (and en (cons st en)))) + (and en (cons st en)))) ;; return types on same line... ;; ("^[a-zA-z].*\\(\\w\\|[$_]\\)+\\s *\\(\\(\\w\\|[$_]\\)+\\s *((\\|(\\)[^)]*)+" nil defun) ;; On another note, a working pattern for grabbing function definitions for C is -;; +;; ;; ("^[a-zA-Z_]+.*[;{]$" nil ForestGreen) ; global defns ( start at col 1 ) ;; ("^[a-zA-Z_]+.*(" ")" defun) ;; ; defuns assumed to start at col 1, not with # or { -;; +;; ;; this will make external declarations/definitions green, and function ;; definitions the defun face. Hmmm - seems to work for me anyway. @@ -1179,7 +1179,7 @@ number of backslashes." ("\\(^[ \t]*[0-9]+\\|[ \t]continue[ \t\n]\\|format\\)" nil define) ("[ \t]\\(do\\|do[ \t]*[0-9]+\\|go[ \t]*to[ \t]*[0-9]+\\|end[ \t]*do\\|if\\|else[ \t]*if\\|then\\|else\\|end[ \t]*if\\)[ \t\n(]" nil define) ("[ \t]\\(call\\|program\\|subroutine\\|function\\|stop\\|return\\|end\\|include\\)[ \t\n]" nil include) - ("[ \t]\\(parameter[\t\n ]*([^)]*)\\|data\\|save\\|common[ \t\n]*/[^/]*/\\)" + ("[ \t]\\(parameter[\t\n ]*([^)]*)\\|data\\|save\\|common[ \t\n]*/[^/]*/\\)" nil decl) ("^ ." nil type) ("implicit[ \t]*none" nil decl) @@ -1249,7 +1249,7 @@ number of backslashes." ("[^\\]\\\\(" "\\\\)" formula) ; \( \) ("[^\\]\\\\\\[" "\\\\\\]" formula) ; \[ \] ("[^\\$]\\(\\$\\(\\$[^$]*\\$\\|[^$]*\\)\\$\\)" 1 formula) ; '$...$' or '$$...$$' - + ;; things that bring in external files ("\\\\\\(include\\|input\\|bibliography\\){" "}" include) @@ -1334,7 +1334,7 @@ number of backslashes." '( (";.*" nil comment) -;;; This almost works...but I think I'll stick with the parser function +;;; This almost works...but I think I'll stick with the parser function ;;;("[^?]\\(\"\\(\"\\||\\([^\"]+\\|[\\]\\([\\][\\]\\)*\"\\)*\"\\)\\)" 1 string) (hilit-string-find ?\\ string) @@ -1352,7 +1352,7 @@ number of backslashes." '( (";.*" nil comment) ("#|" "|#" comment) -;;; This almost works...but I think I'll stick with the parser function +;;; This almost works...but I think I'll stick with the parser function ;;;("[^?]\\(\"\\(\"\\||\\([^\"]+\\|[\\]\\([\\][\\]\\)*\"\\)*\"\\)\\)" 1 string) (hilit-string-find ?\\ string) @@ -1490,7 +1490,7 @@ number of backslashes." ;; Pascal, strings are delimited with ' and an embedded quote is doubled, ;; thus string syntax would be extremely simple. However, if a string ;; occurs within a comment, the following text is considered a string. -;; +;; ;; In Icon, strings are similar to C ones, but there are also charsets, ;; delimited with simple quotes. I could not manage to use both regexps at ;; the same time. diff --git a/lisp/obsolete/hscroll.el b/lisp/obsolete/hscroll.el index 996cd07c5e4..07a5f525720 100644 --- a/lisp/obsolete/hscroll.el +++ b/lisp/obsolete/hscroll.el @@ -28,9 +28,9 @@ ;;; Code: -;;; +;;; ;;; PUBLIC VARIABLES -;;; +;;; (defvar hscroll-version "0.0") @@ -48,7 +48,7 @@ to hscroll from your init file and code." :require 'hscroll :version "20.3") -(defcustom hscroll-margin 5 +(defcustom hscroll-margin 5 "*Obsolete." :group 'hscroll :type 'integer) @@ -68,9 +68,9 @@ to hscroll from your init file and code." :group 'hscroll :type 'string) -;;; +;;; ;;; PUBLIC COMMANDS -;;; +;;; ;;;###autoload (defun turn-on-hscroll () diff --git a/lisp/obsolete/ooutline.el b/lisp/obsolete/ooutline.el index ea7ac542031..55d6dafbdbe 100644 --- a/lisp/obsolete/ooutline.el +++ b/lisp/obsolete/ooutline.el @@ -50,7 +50,7 @@ in the file it applies to. See also outline-heading-end-regexp." ;; already assigned a local value to it. (or (default-value 'outline-regexp) (setq-default outline-regexp "[*\^L]+")) - + (defcustom outline-heading-end-regexp "[\n\^M]" "*Regular expression to match the end of a heading line. You can assume that point is at the beginning of a heading when this @@ -166,10 +166,10 @@ in the file it applies to." (defun outline-mode () "Set major mode for editing outlines with selective display. Headings are lines which start with asterisks: one for major headings, -two for subheadings, etc. Lines not starting with asterisks are body lines. +two for subheadings, etc. Lines not starting with asterisks are body lines. Body text or subheadings under a heading can be made temporarily -invisible, or visible again. Invisible lines are attached to the end +invisible, or visible again. Invisible lines are attached to the end of the heading, so they move with it, if the line is killed and yanked back. A heading with text hidden under it is marked with an ellipsis (...). @@ -533,7 +533,7 @@ Stop at the first and last subheadings of a superior heading." (outline-back-to-heading) (while (> arg 0) (let ((point-to-move-to (save-excursion - (outline-get-next-sibling)))) + (outline-get-next-sibling)))) (if point-to-move-to (progn (goto-char point-to-move-to) @@ -552,7 +552,7 @@ Stop at the first and last subheadings of a superior heading." (if (< (funcall outline-level) level) nil (point)))) - + (defun outline-backward-same-level (arg) "Move backward to the ARG'th subheading at same level as this one. Stop at the first and last subheadings of a superior heading." diff --git a/lisp/obsolete/rnews.el b/lisp/obsolete/rnews.el index 03f99ff9098..46b3f8c730f 100644 --- a/lisp/obsolete/rnews.el +++ b/lisp/obsolete/rnews.el @@ -105,7 +105,7 @@ if its GROUP-REGEXP matches the current newsgroup name.") (defvar news-mode-map nil) (defvar news-read-first-time-p t) -;; Contains the (dotified) news groups of which you are a member. +;; Contains the (dotified) news groups of which you are a member. (defvar news-user-group-list nil) (defvar news-current-news-group nil) @@ -133,7 +133,7 @@ Not currently used.") ;; association list in which we store lists of the form ;; (pointified-group-name (first last old-last)) (defvar news-group-article-assoc nil) - + (defvar news-current-message-number 0 "Displayed Article Number") (defvar news-total-current-group 0 "Total no of messages in group") @@ -337,7 +337,7 @@ C-c C-r caesar rotate all letters by 13 places in the article's body (rot13). g get new USENET news. f post a reply article to USENET. a post an original news article. -A add a newsgroup. +A add a newsgroup. o save the current article in the named file (append if file exists). C-o output this message to a Unix-format mail file (append it). c \"copy\" (actually link) current or prefix-arg msg to file. @@ -435,14 +435,14 @@ to a list (a . b)" (buffer-substring end endofline)))) (if (assoc tem news-group-article-assoc) (message "You are subscribed twice to %s; I ignore second" - tem) + tem) (setq temp-user-groups (cons tem temp-user-groups) news-group-article-assoc (cons (list tem (list (car range) (cdr range) (cdr range))) news-group-article-assoc))))) - (kill-buffer newsrcbuf))) + (kill-buffer newsrcbuf))) (setq temp-user-groups (nreverse temp-user-groups)) (message "Prefrobnicating...") (switch-to-buffer news-buffer) @@ -528,7 +528,7 @@ to a list (a . b)" (let ((file (concat news-path (string-subst-char ?/ ?. news-current-news-group) "/" arg))) - (if (= arg + (if (= arg (or (news-cadr (memq (news-cdar news-point-pdl) news-list-of-files)) 0)) (setcdr (car news-point-pdl) arg)) @@ -552,7 +552,7 @@ Negative ARG moves backward. If ARG is 1 or -1, moves to next or previous newsgroup if at end." (interactive "p") (let ((no (+ arg news-current-message-number))) - (if (or (< no news-current-group-begin) + (if (or (< no news-current-group-begin) (> no news-current-group-end)) (cond ((= arg 1) (news-set-current-group-certification) diff --git a/lisp/obsolete/rnewspost.el b/lisp/obsolete/rnewspost.el index 546195e37bd..9907f6df052 100644 --- a/lisp/obsolete/rnewspost.el +++ b/lisp/obsolete/rnewspost.el @@ -221,7 +221,7 @@ summary (abstract) of the message." ;; Avoid inserting a signature. (mail-signature)) (if (null to) - ;; this hack is needed so that inews wont be confused by + ;; this hack is needed so that inews wont be confused by ;; the fcc: and bcc: fields (let ((mail-self-blind nil) (mail-archive-file-name nil)) @@ -250,7 +250,7 @@ summary (abstract) of the message." (setq paragraph-separate (concat "^" actual-header-separator "$\\|" paragraph-separate))) (run-hooks 'news-setup-hook))) - + (defun news-inews () "Send a news message using inews." (interactive) @@ -271,8 +271,8 @@ summary (abstract) of the message." (insert ?\n)) (message "Posting to USENET...") (unwind-protect - (if (not (eq 0 - (call-process-region (point-min) (point-max) + (if (not (eq 0 + (call-process-region (point-min) (point-max) news-inews-program nil 0 nil "-h"))) ; take all header lines! ;@@ setting of subject and newsgroups still needed? diff --git a/lisp/obsolete/sun-curs.el b/lisp/obsolete/sun-curs.el index 3eedae9a8b8..2e9a4b220b0 100644 --- a/lisp/obsolete/sun-curs.el +++ b/lisp/obsolete/sun-curs.el @@ -39,7 +39,7 @@ (defvar sc::cursors nil "List of known cursors")) (defmacro defcursor (name x y string) - (if (not (memq name sc::cursors)) + (if (not (memq name sc::cursors)) (setq sc::cursors (cons name sc::cursors))) (list 'defconst name (list 'vector x y string))) @@ -108,20 +108,20 @@ Otherwise, ICON should be a vector or the name of a vector of [x y 32-chars]" (delete-char -1) (insert char) (sc::goto-hotspot)) - + (defun sc::menu-function (window x y) (sun-menu-evaluate window (1+ x) y sc::menu)) (defmenu sc::menu ("Cursor Menu") ("Pack & Use" sc::pack-buffer-to-cursor) - ("Pack to Icon" sc::pack-buffer-to-icon + ("Pack to Icon" sc::pack-buffer-to-icon (sc::menu-choose-cursor *menu-window* *menu-x* *menu-y*)) ("New Icon" call-interactively 'sc::make-cursor) - ("Edit Icon" sc:edit-cursor + ("Edit Icon" sc:edit-cursor (sc::menu-choose-cursor *menu-window* *menu-x* *menu-y*)) ("Set Cursor" sc:set-cursor - (sc::menu-choose-cursor *menu-window* *menu-x* *menu-y*)) + (sc::menu-choose-cursor *menu-window* *menu-x* *menu-y*)) ("Reset Cursor" sc:set-cursor nil) ("Help" sc::edit-icon-help-menu) ("Quit" sc::quit-edit) @@ -153,7 +153,7 @@ Otherwise, ICON should be a vector or the name of a vector of [x y 32-chars]" (defun sc::menu-choose-cursor (window x y) "Presents a menu of cursor names, and returns one or nil" - (let ((curs sc::cursors) + (let ((curs sc::cursors) (items)) (while curs (push (sc::menu-item-for-cursor (car curs)) items) @@ -200,7 +200,7 @@ Otherwise, ICON should be a vector or the name of a vector of [x y 32-chars]" (aset icon 2 (mapconcat 'sc::pack-one-line "1234567890123456" "")) (sc::goto-hotspot) ) - + (defun sc::pack-one-line (dummy) (let* (char chr1 chr2) (setq char 0 chr1 (mapconcat 'sc::pack-one-char "12345678" "") chr1 char) @@ -212,7 +212,7 @@ Otherwise, ICON should be a vector or the name of a vector of [x y 32-chars]" (defun sc::pack-one-char (dummy) "pack following char into char, unless eolp" (if (or (eolp) (char-equal (following-char) 32)) - (setq char (lsh char 1)) + (setq char (lsh char 1)) (setq char (1+ (lsh char 1)))) (if (not (eolp))(forward-char))) diff --git a/lisp/obsolete/sun-fns.el b/lisp/obsolete/sun-fns.el index 21b5146da55..df596563446 100644 --- a/lisp/obsolete/sun-fns.el +++ b/lisp/obsolete/sun-fns.el @@ -47,7 +47,7 @@ ;; These functions follow the sun-mouse-handler convention of being called ;; with three arguments: (window x-pos y-pos) ;; This makes it easy for a mouse executed command to know where the mouse is. -;; Use the macro "eval-in-window" to execute a function +;; Use the macro "eval-in-window" to execute a function ;; in a temporarily selected window. ;; ;; If you have a function that must be called with other arguments @@ -157,8 +157,8 @@ and put the region in the stuff buffer." (defun mouse-mark-thing (window x y) "Set point and mark to text object using syntax table. The resulting region is put in the sun-window stuff buffer. -Left or right Paren syntax marks an s-expression. -Clicking at the end of a line marks the line including a trailing newline. +Left or right Paren syntax marks an s-expression. +Clicking at the end of a line marks the line including a trailing newline. If it doesn't recognize one of these it marks the character at point." (mouse-move-point window x y) (if (eobp) (open-line 1)) @@ -197,7 +197,7 @@ If it doesn't recognize one of these it marks the character at point." (defun mouse-kill-thing-there (window x y) "Kill thing at mouse, leave point where it was. See mouse-mark-thing for a description of the objects recognized." - (eval-in-window window + (eval-in-window window (save-excursion (mouse-mark-thing window x y) (kill-region (region-beginning) (region-end)))) @@ -319,7 +319,7 @@ this command is insensitive to mouse location." (defun mouse-scroll-proportional (window x y) "Scrolls the window proportionally corresponding to window relative X divided by window width." - (eval-in-window window + (eval-in-window window (if (>= x (1- (window-width))) ;; When x is maximum (equal to or 1 less than window width), ;; goto end of buffer. We check for this special case @@ -382,7 +382,7 @@ relative X divided by window width." ("Minibuffer" mouse-help-region *menu-window* *menu-x* *menu-y* 'minibuffer) ) - + (defmenu emacs-quit-menu ("Suspend" suspend-emacstool) ("Quit" save-buffers-kill-emacs)) @@ -419,7 +419,7 @@ relative X divided by window width." ;;; ;;; minibuffer menu ;;; -(defmenu minibuffer-menu +(defmenu minibuffer-menu ("Minibuffer" message "Just some miscellaneous minibuffer commands") ("Stuff" sun-yank-selection) ("Do-It" exit-minibuffer) @@ -439,13 +439,13 @@ relative X divided by window width." (mouse-set-mark-and-stuff window (- x 6) 0)) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Buffer-mode Mouse commands -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defun Buffer-at-mouse (w x y) "Calls Buffer-menu-buffer from mouse click." - (save-window-excursion + (save-window-excursion (mouse-move-point w x y) (beginning-of-line) (Buffer-menu-buffer t))) @@ -474,7 +474,7 @@ relative X divided by window width." (mouse-move-point w x y) (Buffer-menu-execute) )) - + (defun enable-mouse-in-buffer-list () "Call this to enable mouse selections in *Buffer List* LEFT puts the indicated buffer in the selected window. @@ -486,7 +486,7 @@ To unmark a buffer marked for deletion, select it with LEFT." (list-buffers) ; Initialize *Buffer List* (set-buffer "*Buffer List*") (local-set-mouse '(text middle) 'mouse-buffer-bury) - (local-set-mouse '(text left) 'mouse-buffer-select) + (local-set-mouse '(text left) 'mouse-buffer-select) (local-set-mouse '(text right) 'mouse-buffer-delete) (local-set-mouse '(text middle right) 'mouse-buffer-execute) ) diff --git a/lisp/play/5x5.el b/lisp/play/5x5.el index abc247b34b4..bcac5fa2577 100644 --- a/lisp/play/5x5.el +++ b/lisp/play/5x5.el @@ -146,7 +146,7 @@ (define-key map [(control c) (control r)] #'5x5-crack-randomly) (define-key map [(control c) (control c)] #'5x5-crack-mutating-current) (define-key map [(control c) (control b)] #'5x5-crack-mutating-best) - (define-key map [(control c) (control x)] #'5x5-crack-xor-mutate) + (define-key map [(control c) (control x)] #'5x5-crack-xor-mutate) (define-key map "n" #'5x5-new-game) (define-key map "q" #'5x5-quit-game) (setq 5x5-mode-map map))) @@ -178,7 +178,7 @@ The key bindings for 5x5-mode are: (use-local-map 5x5-mode-map) (setq major-mode '5x5-mode mode-name "5x5") - (run-hooks '5x5-mode-hook) + (run-hooks '5x5-mode-hook) (setq buffer-read-only t truncate-lines t) (buffer-disable-undo (current-buffer))) @@ -192,11 +192,11 @@ squares you must fill the grid. 5x5 keyboard bindings are: \\<5x5-mode-map> -Flip \\[5x5-flip-current] -Move up \\[5x5-up] -Move down \\[5x5-down] -Move left \\[5x5-left] -Move right \\[5x5-right] +Flip \\[5x5-flip-current] +Move up \\[5x5-up] +Move down \\[5x5-down] +Move left \\[5x5-left] +Move right \\[5x5-right] Start new game \\[5x5-new-game] New game with random grid \\[5x5-randomize] Random cracker \\[5x5-crack-randomly] @@ -426,7 +426,7 @@ progress because it is an animated attempt." (5x5-position-cursor) (sit-for 5x5-animate-delay)))) 5x5-grid) - + ;; Keyboard response functions. (defun 5x5-flip-current () @@ -512,7 +512,7 @@ progress because it is an animated attempt." (defun 5x5-xor (x y) "Boolean exclusive-or of X and Y." (and (or x y) (not (and x y)))) - + (defun 5x5-y-or-n-p (prompt) "5x5 wrapper for y-or-n-p which respects the 5x5-hassle-me setting." (if 5x5-hassle-me diff --git a/lisp/play/animate.el b/lisp/play/animate.el index 4e74491ad33..3e72247320f 100644 --- a/lisp/play/animate.el +++ b/lisp/play/animate.el @@ -149,7 +149,7 @@ Strings will be separated from each other by SPACE lines." (animate-string (car list-of-strings) vpos) (setq vpos (+ vpos space 1)) (setq list-of-strings (cdr list-of-strings))))) - + ;;;###autoload (defun animate-birthday-present () "Display Sarah's birthday present in a new buffer." diff --git a/lisp/play/blackbox.el b/lisp/play/blackbox.el index bb5aa0b3c1f..9e6fd59e985 100644 --- a/lisp/play/blackbox.el +++ b/lisp/play/blackbox.el @@ -34,21 +34,21 @@ ;; pass thru the box undisturbed, 2) it will hit a ball and be absorbed, ;; 3) it will be deflected and exit the box, or 4) be deflected immediately, ;; not even being allowed entry into the box. -;; +;; ;; The strange part is the method of deflection. It seems that rays will ;; not pass next to a ball, and change direction at right angles to avoid it. -;; -;; R 3 -;; 1 - - - - - - - - 1 -;; - - - - - - - - -;; - O - - - - - - 3 -;; 2 - - - - O - O - -;; 4 - - - - - - - - -;; 5 - - - - - - - - 5 -;; - - - - - - - - R -;; H - - - - - - - O -;; 2 H 4 H -;; +;; +;; R 3 +;; 1 - - - - - - - - 1 +;; - - - - - - - - +;; - O - - - - - - 3 +;; 2 - - - - O - O - +;; 4 - - - - - - - - +;; 5 - - - - - - - - 5 +;; - - - - - - - - R +;; H - - - - - - - O +;; 2 H 4 H +;; ;; Rays which enter and exit are numbered. You can see that rays 1 & 5 pass ;; thru the box undisturbed. Ray 2 is deflected by the northwesternmost ;; ball. Likewise rays 3 and 4. Rays which hit balls and are absorbed are @@ -194,21 +194,21 @@ ray. Note carefully the relative positions of the ball and the ninety degree deflection it causes. - 1 - - * - - - - - - - - - - - - - - - - - - - - - - - - * - - - - - - - - - - - - - - - - - - - - - - -1 * * - - - - - - - - - - - - - - - O - - - - O - + 1 + - * - - - - - - - - - - - - - - - - - - - - - - + - * - - - - - - - - - - - - - - - - - - - - - - +1 * * - - - - - - - - - - - - - - - O - - - - O - - - O - - - - - - - O - - - - - - - * * * * - - - - - - - - - - - - - * * * * * 2 3 * * * - - * - - - - - - - - - - - - - - * - - - - - - - O - * - - - - - - - - - - - - - - * - - - - - - - - * * - - - - - - - - - - - - - - * - - - - - - - - * - O - + - - - - - - - - - - - * - - - - - - - O - * - - + - - - - - - - - - - - * - - - - - - - - * * - - + - - - - - - - - - - - * - - - - - - - - * - O - 2 3 As mentioned above, a reflection occurs when a ray emerges from the same point it was sent in. This can happen in several ways: - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - O - - - - - O - O - - - - - - - - - - - R * * * * - - - - - - - * - - - - O - - - - - - - @@ -426,7 +426,7 @@ a reflection." (delete-char (length c)) (insert c) (backward-char 1))) - + (provide 'blackbox) ;;; blackbox.el ends here diff --git a/lisp/play/doctor.el b/lisp/play/doctor.el index 2f00b9dfb3a..478c2af8eca 100644 --- a/lisp/play/doctor.el +++ b/lisp/play/doctor.el @@ -168,7 +168,7 @@ reads the sentence before point, and prints the Doctor's answer." (setq drnk '((do you drink a lot of (doc// found) \?) (do you get drunk often \?) - ((doc$ describe) your drinking habits \.) )) + ((doc$ describe) your drinking habits \.) )) (make-local-variable 'drugs) (setq drugs '( (do you use (doc// found) often \?)((doc$ areyou) addicted to (doc// found) \?)(do you realize that drugs can @@ -256,7 +256,7 @@ reads the sentence before point, and prints the Doctor's answer." (i understand \.) (oh \.) )) (make-local-variable 'please) - (setq please + (setq please '((please\,) (i would appreciate it if you would) (perhaps you could) @@ -279,7 +279,7 @@ reads the sentence before point, and prints the Doctor's answer." (more) (how you feel))) (make-local-variable 'things) - (setq things + (setq things '(;(your interests in computers) ;; let's make this less computer oriented ;(the machines you use) (your plans) @@ -306,7 +306,7 @@ reads the sentence before point, and prints the Doctor's answer." (tell me more about) (elaborate on))) (make-local-variable 'ibelieve) - (setq ibelieve + (setq ibelieve '((i believe) (i think) (i have a feeling) (it seems to me that) (it looks like))) (make-local-variable 'problems) @@ -324,7 +324,7 @@ reads the sentence before point, and prints the Doctor's answer." (are you sorry) (are you satisfied with the fact that))) (make-local-variable 'machlst) - (setq machlst + (setq machlst '((you have your mind on (doc// found) \, it seems \.) (you think too much about (doc// found) \.) (you should try taking your mind off of (doc// found)\.) @@ -351,7 +351,7 @@ reads the sentence before point, and prints the Doctor's answer." (did you watch a lot of crime and violence on television as a child \?)) ) (make-local-variable 'sexlst) - (setq sexlst + (setq sexlst '(((doc$ areyou) (doc$ afraidof) sex \?) ((doc$ describe)(doc$ something) about your sexual history \.) ((doc$ please)(doc$ describe) your sex life \.\.\.) @@ -406,7 +406,7 @@ reads the sentence before point, and prints the Doctor's answer." (how often (doc$ areyou)(doc// found) \?) (when were you last (doc// found) \?))) (make-local-variable 'replist) - (setq replist + (setq replist '((i . (you)) (my . (your)) (me . (you)) @@ -884,7 +884,7 @@ Otherwise call the Doctor to parse preceding sentence." ((or (member sent '((good bye) (see you later) (i quit) (so long) (go away) (get lost))) (memq (car sent) - '(bye halt break quit done exit goodbye + '(bye halt break quit done exit goodbye bye\, stop pause goodbye\, stop pause))) (doctor-type (doc$ bye))) ((and (eq (car sent) 'you) @@ -990,7 +990,7 @@ Otherwise call the Doctor to parse preceding sentence." (defun doctor-def (x) (progn - (doctor-type (list 'the 'word x 'means (doctor-meaning x) 'to 'me)) + (doctor-type (list 'the 'word x 'means (doctor-meaning x) 'to 'me)) nil)) (defun doctor-forget () @@ -1093,9 +1093,9 @@ the subject noun, and return the portion of the sentence following it." luse lusing lust lusts made make makes making may mean means meant might move moved moves moving must - need needed needs + need needed needs order ordered orders ought - paid pay pays pick picked picking picks + paid pay pays pick picked picking picks placed placing prefer prefers put puts ran rape raped rapes read reading reads recall receive received receives @@ -1200,7 +1200,7 @@ the subject noun, and return the portion of the sentence following it." half quarter first second third fourth fifth sixth seventh eighth ninth tenth))) - + (defun doctor-colorp (x) (memq x '(beige black blue brown crimson gray grey green @@ -1485,7 +1485,7 @@ Hack on previous word, setting global variable OWNER to correct result." ((equal sent (doctor-assm '(no))) (doctor-type (doc$ neglst))) (t (doctor-type (doc$ shortlst))))))) - + (defun doctor-alcohol () (doctor-type (doc$ drnk))) (defun doctor-desire () @@ -1619,7 +1619,7 @@ Hack on previous word, setting global variable OWNER to correct result." (t (setq eliza-flag t) (doctor-type '((doc// found) \? hah ! (doc$ please) (doc$ continue) \.))))) - + (defun doctor-sports () (doctor-type (doc$ sportslst))) (defun doctor-math () (doctor-type (doc$ mathlst))) diff --git a/lisp/play/dunnet.el b/lisp/play/dunnet.el index 669805fa121..402a3d96769 100644 --- a/lisp/play/dunnet.el +++ b/lisp/play/dunnet.el @@ -29,7 +29,7 @@ ;; This game can be run in batch mode. To do this, use: ;; emacs -batch -l dunnet -;;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +;;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ;;; The log file should be set for your system, and it must ;;; be writable by all. @@ -79,7 +79,7 @@ (goto-char (point-max)) (dun-mprinc "\n")) (dun-messages)) - + (defun dun-messages () (if dun-dead (text-mode) @@ -111,11 +111,11 @@ ;;; short. Also give long if we were called with negative room number. (defun dun-describe-room (room) - (if (and (not (member (abs room) dun-light-rooms)) + (if (and (not (member (abs room) dun-light-rooms)) (not (member obj-lamp dun-inventory))) (dun-mprincl "It is pitch dark. You are likely to be eaten by a grue.") (dun-mprincl (cadr (nth (abs room) dun-rooms))) - (if (and (and (or (member room dun-visited) + (if (and (and (or (member room dun-visited) (string= dun-mode "dun-superb")) (> room 0)) (not (string= dun-mode "long"))) nil @@ -147,17 +147,17 @@ (defun dun-special-object () (if (= dun-current-room computer-room) (if dun-computer - (dun-mprincl + (dun-mprincl "The panel lights are flashing in a seemingly organized pattern.") (dun-mprincl "The panel lights are steady and motionless."))) - (if (and (= dun-current-room red-room) + (if (and (= dun-current-room red-room) (not (member obj-towel (nth red-room dun-room-objects)))) (dun-mprincl "There is a hole in the floor here.")) (if (and (= dun-current-room marine-life-area) dun-black) - (dun-mprincl -"The room is lit by a black light, causing the fish, and some of + (dun-mprincl +"The room is lit by a black light, causing the fish, and some of your objects, to give off an eerie glow.")) (if (and (= dun-current-room fourth-vermont-intersection) dun-hole) (progn @@ -167,7 +167,7 @@ your objects, to give off an eerie glow.")) (setq dun-current-room vermont-station) (dun-describe-room vermont-station)) (progn - (dun-mprincl + (dun-mprincl "The bus falls down a hole in the ground and explodes.") (dun-die "burning"))))) @@ -186,18 +186,18 @@ your objects, to give off an eerie glow.")) "It is comfortably hot in here." "It is refreshingly hot in here." "You are dead now."))) - (if (= dun-sauna-level 3) + (if (= dun-sauna-level 3) (progn (if (or (member obj-rms dun-inventory) (member obj-rms (nth dun-current-room dun-room-objects))) (progn - (dun-mprincl + (dun-mprincl "You notice the wax on your statuette beginning to melt, until it completely melts off. You are left with a beautiful diamond!") (if (member obj-rms dun-inventory) (progn (dun-remove-obj-from-inven obj-rms) - (setq dun-inventory (append dun-inventory + (setq dun-inventory (append dun-inventory (list obj-diamond)))) (dun-remove-obj-from-room dun-current-room obj-rms) (dun-replace dun-room-objects dun-current-room @@ -207,7 +207,7 @@ melts off. You are left with a beautiful diamond!") (member obj-floppy (nth dun-current-room dun-room-objects))) (progn (dun-mprincl -"You notice your floppy disk beginning to melt. As you grab for it, the +"You notice your floppy disk beginning to melt. As you grab for it, the disk bursts into flames, and disintegrates.") (dun-remove-obj-from-inven obj-floppy) (dun-remove-obj-from-room dun-current-room obj-floppy)))))))) @@ -303,10 +303,10 @@ on your head.") (append (nth dun-current-room dun-room-objects) (list obj-key))))) - (if (and (= objnum obj-jar) (member obj-nitric dun-jar) + (if (and (= objnum obj-jar) (member obj-nitric dun-jar) (member obj-glycerine dun-jar)) (progn - (dun-mprincl + (dun-mprincl "As the jar impacts the ground it explodes into many pieces.") (setq dun-jar nil) (dun-remove-obj-from-room dun-current-room obj-jar) @@ -314,7 +314,7 @@ on your head.") (progn (setq dun-hole t) (setq dun-current-room vermont-station) - (dun-mprincl + (dun-mprincl "The explosion causes a hole to open up in the ground, which you fall through."))))) @@ -322,7 +322,7 @@ through."))))) (dun-mprincl "A passageway opens."))) ;;; Give long description of current room, or an object. - + (defun dun-examine (obj) (let (objnum) (setq objnum (dun-objnum-from-args obj)) @@ -333,18 +333,18 @@ through."))))) (dun-examine '("pc")) (if (eq objnum nil) (dun-mprincl "I don't know what that is.") - (if (and (not (member objnum + (if (and (not (member objnum (nth dun-current-room dun-room-objects))) (not (and (member obj-jar dun-inventory) (member objnum dun-jar))) - (not (member objnum + (not (member objnum (nth dun-current-room dun-room-silents))) (not (member objnum dun-inventory))) (dun-mprincl "I don't see that here.") (if (>= objnum 0) - (if (and (= objnum obj-bone) + (if (and (= objnum obj-bone) (= dun-current-room marine-life-area) dun-black) - (dun-mprincl + (dun-mprincl "In this light you can see some writing on the bone. It says: For an explosive time, go to Fourth St. and Vermont.") (if (nth objnum dun-physobj-desc) @@ -400,14 +400,14 @@ For an explosive time, go to Fourth St. and Vermont.") (dun-try-take objnum)) (if (>= objnum 0) (progn - (if (and (car dun-inventory) + (if (and (car dun-inventory) (> (+ (dun-inven-weight) (nth objnum dun-object-lbs)) 11)) (dun-mprinc "Your load would be too heavy.") (setq dun-inventory (append dun-inventory (list objnum))) (dun-remove-obj-from-room dun-current-room objnum) (dun-mprinc "Taken. ") (if (and (= objnum obj-towel) (= dun-current-room red-room)) - (dun-mprinc + (dun-mprinc "Taking the towel reveals a hole in the floor.")))) (dun-try-take objnum))) (dun-mprinc "\n"))) @@ -494,9 +494,9 @@ notice that the tree is very unsteady."))))) (setq objnum2 obj-pc)) (if (not objnum2) (dun-mprincl "I don't know what that indirect object is.") - (if (and (not (member objnum2 + (if (and (not (member objnum2 (nth dun-current-room dun-room-objects))) - (not (member objnum2 + (not (member objnum2 (nth dun-current-room dun-room-silents))) (not (member objnum2 dun-inventory))) (dun-mprincl "That indirect object is not here.") @@ -528,7 +528,7 @@ The lights start flashing, and the fans seem to startup.")) (if (= obj2 obj-chute) ;; Put something in chute (progn (dun-remove-obj-from-inven obj1) - (dun-mprincl + (dun-mprincl "You hear it slide down the chute and off into the distance.") (dun-put-objs-in-treas (list obj1))) (if (= obj2 obj-box) ;; Put key in key box @@ -555,7 +555,7 @@ with a bang. The key seems to have vanished!") (if (= obj2 obj-urinal) ;; Put object in urinal (progn (dun-remove-obj-from-inven obj1) - (dun-replace dun-room-objects urinal (append + (dun-replace dun-room-objects urinal (append (nth urinal dun-room-objects) (list obj1))) (dun-mprincl @@ -563,7 +563,7 @@ with a bang. The key seems to have vanished!") (if (= obj2 obj-mail) (dun-mprincl "The mail chute is locked.") (if (member obj1 dun-inventory) - (dun-mprincl + (dun-mprincl "I don't know how to combine those objects. Perhaps you should just try dropping it.") (dun-mprincl"You can't put that there."))))))))))) @@ -572,7 +572,7 @@ just try dropping it.") (if (not (= dun-current-room computer-room)) (dun-mprincl "There is nothing here on which you could type.") (if (not dun-computer) - (dun-mprincl + (dun-mprincl "You type on the keyboard, but your characters do not even echo.") (dun-unix-interface)))) @@ -615,8 +615,8 @@ just try dropping it.") (dun-move out)) (defun dun-go (args) - (if (or (not (car args)) - (eq (dun-doverb dun-ignore dun-verblist (car args) + (if (or (not (car args)) + (eq (dun-doverb dun-ignore dun-verblist (car args) (cdr (cdr args))) -1)) (dun-mprinc "I don't understand where you want me to go.\n"))) @@ -626,10 +626,10 @@ just try dropping it.") ;;; certain conditions are met. (defun dun-move (dir) - (if (and (not (member dun-current-room dun-light-rooms)) + (if (and (not (member dun-current-room dun-light-rooms)) (not (member obj-lamp dun-inventory))) (progn - (dun-mprinc + (dun-mprinc "You trip over a grue and fall into a pit and break every bone in your body.") (dun-die "a grue")) @@ -645,7 +645,7 @@ body.") (progn (if (or (< newroom 58) (> newroom 83)) (dun-mprincl "The bus cannot go this way.") - (dun-mprincl + (dun-mprincl "The bus lurches ahead and comes to a screeching halt.") (dun-remove-obj-from-room dun-current-room obj-bus) (setq dun-current-room newroom) @@ -671,7 +671,7 @@ body.") (setq dun-current-room old-building-hallway)) (if (= dun-current-room north-end-of-cave-passage) (let (combo) - (dun-mprincl + (dun-mprincl "You must type a 3 digit combination code to enter this room.") (dun-mprinc "Enter it here: ") (setq combo (dun-read-line)) @@ -684,7 +684,7 @@ body.") (if (= dun-current-room bear-hangout) (if (member obj-bear (nth bear-hangout dun-room-objects)) (progn - (dun-mprinc + (dun-mprinc "The bear is very annoyed that you would be so presumptuous as to try and walk right by it. He tells you so by tearing your head off. ") @@ -721,7 +721,7 @@ force throws you out. The train speeds away.\n") (if (= dun-current-room classroom) (dun-mprincl "The door is locked.")) - (if (or (= dun-current-room lakefront-north) + (if (or (= dun-current-room lakefront-north) (= dun-current-room lakefront-south)) (dun-swim nil)) @@ -739,7 +739,7 @@ engulf you, and you burn to death.") (setq dun-current-room long-n-s-hallway) (dun-mprincl "You can't go that way."))) - (if (and (> dir down) (> dun-current-room gamma-computing-center) + (if (and (> dir down) (> dun-current-room gamma-computing-center) (< dun-current-room museum-lobby)) (if (not (member obj-bus (nth dun-current-room dun-room-objects))) (dun-mprincl "You can't go that way.") @@ -749,7 +749,7 @@ engulf you, and you burn to death.") "You are already in the bus!") (if (member obj-license dun-inventory) (progn - (dun-mprincl + (dun-mprincl "You board the bus and get in the driver's seat.") (setq dun-nomail t) (setq dun-inbus t)) @@ -773,7 +773,7 @@ engulf you, and you burn to death.") (dun-mprincl "As the bus approaches, the gate opens and you drive through.") (dun-remove-obj-from-room main-maple-intersection obj-bus) - (dun-replace dun-room-objects museum-entrance + (dun-replace dun-room-objects museum-entrance (append (nth museum-entrance dun-room-objects) (list obj-bus))) (setq dun-current-room museum-entrance))))) @@ -796,24 +796,24 @@ huge rocks sliding down from the ceiling, and blocking your way out.\n") (if (not (= objnum obj-dial)) (dun-mprincl "You can't turn that.") (setq direction (dun-firstword (cdr obj))) - (if (or (not direction) + (if (or (not direction) (not (or (string= direction "clockwise") (string= direction "counterclockwise")))) (dun-mprincl "You must indicate clockwise or counterclockwise.") (if (string= direction "clockwise") (setq dun-sauna-level (+ dun-sauna-level 1)) (setq dun-sauna-level (- dun-sauna-level 1))) - + (if (< dun-sauna-level 0) (progn - (dun-mprincl + (dun-mprincl "The dial will not turn further in that direction.") (setq dun-sauna-level 0)) (dun-sauna-heat)))))))) (defun dun-sauna-heat () (if (= dun-sauna-level 0) - (dun-mprincl + (dun-mprincl "The temperature has returned to normal room temperature.")) (if (= dun-sauna-level 1) (dun-mprincl "It is now luke warm in here. You are perspiring.")) @@ -821,18 +821,18 @@ huge rocks sliding down from the ceiling, and blocking your way out.\n") (dun-mprincl "It is pretty hot in here. It is still very comfortable.")) (if (= dun-sauna-level 3) (progn - (dun-mprincl + (dun-mprincl "It is now very hot. There is something very refreshing about this.") - (if (or (member obj-rms dun-inventory) + (if (or (member obj-rms dun-inventory) (member obj-rms (nth dun-current-room dun-room-objects))) (progn - (dun-mprincl + (dun-mprincl "You notice the wax on your statuette beginning to melt, until it completely melts off. You are left with a beautiful diamond!") (if (member obj-rms dun-inventory) (progn (dun-remove-obj-from-inven obj-rms) - (setq dun-inventory (append dun-inventory + (setq dun-inventory (append dun-inventory (list obj-diamond)))) (dun-remove-obj-from-room dun-current-room obj-rms) (dun-replace dun-room-objects dun-current-room @@ -842,7 +842,7 @@ melts off. You are left with a beautiful diamond!") (member obj-floppy (nth dun-current-room dun-room-objects))) (progn (dun-mprincl -"You notice your floppy disk beginning to melt. As you grab for it, the +"You notice your floppy disk beginning to melt. As you grab for it, the disk bursts into flames, and disintegrates.") (if (member obj-floppy dun-inventory) (dun-remove-obj-from-inven obj-floppy) @@ -850,7 +850,7 @@ disk bursts into flames, and disintegrates.") (if (= dun-sauna-level 4) (progn - (dun-mprincl + (dun-mprincl "As the dial clicks into place, you immediately burst into flames.") (dun-die "burning")))) @@ -882,7 +882,7 @@ as you release it, the passageway closes.")) (dun-mprincl "I see no water!") (if (not (member obj-life dun-inventory)) (progn - (dun-mprincl + (dun-mprincl "You dive in the water, and at first notice it is quite cold. You then start to get used to it as you realize that you never really learned how to swim.") @@ -903,7 +903,7 @@ to swim.") (dun-mprinc (dun-endgame-score)) (dun-mprincl " endgame points out of a possible 110.") (if (= (dun-endgame-score) 110) - (dun-mprincl + (dun-mprincl "\n\nCongratulations. You have won. The wizard password is 'moby'")))) (defun dun-help (args) @@ -961,7 +961,7 @@ My home page is http://www.driver-aces.com/ronnie.html (dun-mprincl "I'm afraid you don't have to go now.") (dun-mprincl "That was refreshing.") (setq dun-gottago nil) - (dun-replace dun-room-objects urinal (append + (dun-replace dun-room-objects urinal (append (nth urinal dun-room-objects) (list obj-URINE)))))) @@ -992,23 +992,23 @@ with dirt again. After this, you immediately wake up."))) the object and slice off your hand. You bleed to death.") (dun-die "an axe")) (if (not (or (member objnum (nth dun-current-room dun-room-objects)) - (member objnum + (member objnum (nth dun-current-room dun-room-silents)))) (dun-mprincl "I don't see that here.") (if (= objnum obj-cable) (progn - (dun-mprincl + (dun-mprincl "As you break the ethernet cable, everything starts to blur. You collapse for a moment, then straighten yourself up. ") (dun-replace dun-room-objects gamma-computing-center - (append + (append (nth gamma-computing-center dun-room-objects) dun-inventory)) (if (member obj-key dun-inventory) (progn (setq dun-inventory (list obj-key)) - (dun-remove-obj-from-room + (dun-remove-obj-from-room gamma-computing-center obj-key)) (setq dun-inventory nil)) (setq dun-current-room computer-room) @@ -1070,8 +1070,8 @@ for a moment, then straighten yourself up. (setq newques nil) (setq which (random (length dun-endgame-questions))) (dun-mprincl "Your question is:") - (dun-mprincl (setq dun-endgame-question (car - (nth which + (dun-mprincl (setq dun-endgame-question (car + (nth which dun-endgame-questions)))) (setq dun-correct-answer (cdr (nth which dun-endgame-questions))) (while (< i which) @@ -1093,7 +1093,7 @@ for a moment, then straighten yourself up. (defun dun-feed (args) (let (objnum) (when (setq objnum (dun-objnum-from-args-std args)) - (if (and (= objnum obj-bear) + (if (and (= objnum obj-bear) (member obj-bear (nth dun-current-room dun-room-objects))) (progn (if (not (member obj-food dun-inventory)) @@ -1135,7 +1135,7 @@ for a moment, then straighten yourself up. (while (setq end-pos (string-match "[ ,:;]" (substring strin pos))) (setq end-pos (+ end-pos pos)) (if (not (= end-pos pos)) - (setq ret-list (append ret-list (list + (setq ret-list (append ret-list (list (downcase (substring strin pos end-pos)))))) (setq pos (+ end-pos 1))) ret-list)) @@ -1147,7 +1147,7 @@ for a moment, then straighten yourself up. (while (setq end-pos (string-match " " (substring strin pos))) (setq end-pos (+ end-pos pos)) (if (not (= end-pos pos)) - (setq ret-list (append ret-list (list + (setq ret-list (append ret-list (list (downcase (substring strin pos end-pos)))))) (setq pos (+ end-pos 1))) ret-list)) @@ -1344,7 +1344,7 @@ for a moment, then straighten yourself up. (aset dun-translate-table (+ ?a i) (aref lower (+ i 13))) (aset dun-translate-table (+ ?A i) (aref upper (+ i 13))) (setq i (1+ i)))) - + (defun dun-rot13 () (let (str len (i 0)) (setq str (buffer-substring (point-min) (point-max))) @@ -1396,7 +1396,7 @@ for a moment, then straighten yourself up. (setq dun-endgame-question nil) (setq dun-logged-in nil) (setq dungeon-mode 'dungeon) -(setq dun-unix-verbs '((ls . dun-ls) (ftp . dun-ftp) (echo . dun-echo) +(setq dun-unix-verbs '((ls . dun-ls) (ftp . dun-ftp) (echo . dun-echo) (exit . dun-uexit) (cd . dun-cd) (pwd . dun-pwd) (rlogin . dun-rlogin) (uncompress . dun-uncompress) (cat . dun-cat) (zippy . dun-zippy))) @@ -1413,8 +1413,8 @@ for a moment, then straighten yourself up. (setq dun-cdroom -10) (setq dun-uncompressed nil) (setq dun-ethernet t) -(setq dun-restricted - '(dun-room-objects dungeon-map dun-rooms +(setq dun-restricted + '(dun-room-objects dungeon-map dun-rooms dun-room-silents dun-combination)) (setq dun-ftptype 'ascii) (setq dun-endgame nil) @@ -1825,12 +1825,12 @@ the building to the north, and a road leads to the southeast." ( "You are in the main lobby for the Museum of Natural History. In the center of the room is the huge skeleton of a dinosaur. Doors lead out to the -south and east." +south and east." "Museum lobby" ;84 ) ( "You are in the geological display. All of the objects that used to -be on display are missing. There are rooms to the east, west, and +be on display are missing. There are rooms to the east, west, and north." "Geological display" ;85 ) @@ -1924,35 +1924,35 @@ a hallway leads to the south." ( "You have reached a dead end. There is a PC on the floor here. Above it is a sign that reads: - Type the 'reset' command to type on the PC. + Type the 'reset' command to type on the PC. A hole leads north." "PC area" ;104 - ) + ) )) (setq dun-light-rooms '(0 1 2 3 4 5 6 7 8 9 10 11 12 13 24 25 26 27 28 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83)) -(setq dun-verblist '((die . dun-die) (ne . dun-ne) (north . dun-n) +(setq dun-verblist '((die . dun-die) (ne . dun-ne) (north . dun-n) (south . dun-s) (east . dun-e) (west . dun-w) (u . dun-up) (d . dun-down) (i . dun-inven) (inventory . dun-inven) (look . dun-examine) (n . dun-n) (s . dun-s) (e . dun-e) (w . dun-w) (se . dun-se) - (nw . dun-nw) (sw . dun-sw) (up . dun-up) + (nw . dun-nw) (sw . dun-sw) (up . dun-up) (down . dun-down) (in . dun-in) (out . dun-out) (go . dun-go) (drop . dun-drop) (southeast . dun-se) (southwest . dun-sw) (northeast . dun-ne) (northwest . dun-nw) (save . dun-save-game) (restore . dun-restore) (long . dun-long) (dig . dun-dig) (shake . dun-shake) (wave . dun-shake) - (examine . dun-examine) (describe . dun-examine) + (examine . dun-examine) (describe . dun-examine) (climb . dun-climb) (eat . dun-eat) (put . dun-put) (type . dun-type) (insert . dun-put) - (score . dun-score) (help . dun-help) (quit . dun-quit) - (read . dun-examine) (verbose . dun-long) + (score . dun-score) (help . dun-help) (quit . dun-quit) + (read . dun-examine) (verbose . dun-long) (urinate . dun-piss) (piss . dun-piss) - (flush . dun-flush) (sleep . dun-sleep) (lie . dun-sleep) + (flush . dun-flush) (sleep . dun-sleep) (lie . dun-sleep) (x . dun-examine) (break . dun-break) (drive . dun-drive) (board . dun-in) (enter . dun-in) (turn . dun-turn) (press . dun-press) (push . dun-press) (swim . dun-swim) @@ -2096,17 +2096,17 @@ A hole leads north." ;;; How the user references *all* objects, permanent and regular. (setq dun-objnames '( - (shovel . 0) + (shovel . 0) (lamp . 1) (cpu . 2) (board . 2) (card . 2) (chip . 2) - (food . 3) - (key . 4) + (food . 3) + (key . 4) (paper . 5) (slip . 5) (rms . 6) (statue . 6) (statuette . 6) (stallman . 6) (diamond . 7) (weight . 8) (life . 9) (preserver . 9) - (bracelet . 10) (emerald . 10) + (bracelet . 10) (emerald . 10) (gold . 11) (platinum . 12) (towel . 13) (beach . 13) @@ -2120,31 +2120,31 @@ A hole leads north." (acid . 21) (nitric . 21) (glycerine . 22) (ruby . 23) - (amethyst . 24) + (amethyst . 24) (mona . 25) - (bill . 26) + (bill . 26) (floppy . 27) (disk . 27) - + (boulder . -1) - (tree . -2) (trees . -2) (palm . -2) + (tree . -2) (trees . -2) (palm . -2) (bear . -3) (bin . -4) (bins . -4) - (cabinet . -5) (computer . -5) (vax . -5) (ibm . -5) + (cabinet . -5) (computer . -5) (vax . -5) (ibm . -5) (protoplasm . -6) - (dial . -7) - (button . -8) - (chute . -9) + (dial . -7) + (button . -8) + (chute . -9) (painting . -10) (bed . -11) (urinal . -12) (URINE . -13) - (pipes . -14) (pipe . -14) - (box . -15) (slit . -15) - (cable . -16) (ethernet . -16) + (pipes . -14) (pipe . -14) + (box . -15) (slit . -15) + (cable . -16) (ethernet . -16) (mail . -17) (drop . -17) (bus . -18) (gate . -19) - (cliff . -20) + (cliff . -20) (skeleton . -21) (dinosaur . -21) (fish . -22) (tanks . -23) (tank . -23) @@ -2152,7 +2152,7 @@ A hole leads north." (blackboard . -25) (disposal . -26) (garbage . -26) (ladder . -27) - (subway . -28) (train . -28) + (subway . -28) (train . -28) (pc . -29) (drive . -29) (coconut . -30) (coconuts . -30) (lake . -32) (water . -32) )) @@ -2169,9 +2169,9 @@ A hole leads north." ;;; Objects that cannot be taken but might move and are ;;; described during room description are negative. ;;; Stuff that is described and might change are 255, and are -;;; handled specially by 'dun-describe-room. +;;; handled specially by 'dun-describe-room. -(setq dun-room-objects (list nil +(setq dun-room-objects (list nil (list obj-shovel) ;; treasure-room (list obj-boulder) ;; dead-end @@ -2183,11 +2183,11 @@ A hole leads north." (list obj-lamp obj-license obj-silver);; meadow nil nil (list obj-special) ;; sauna - nil + nil (list obj-weight obj-life) ;; weight-room nil nil (list obj-rms obj-floppy) ;; thirsty-maze - nil nil nil nil nil nil nil + nil nil nil nil nil nil nil (list obj-emerald) ;; hidden-area nil (list obj-gold) ;; misty-room @@ -2268,7 +2268,7 @@ nil)) (list obj-disposal) ;; north-end-of-n-s-tunnel nil nil (list obj-computer) ;; endgame-computer-room - nil nil nil nil nil nil nil nil + nil nil nil nil nil nil nil nil (list obj-pc) ;; pc-area nil nil nil nil nil nil )) @@ -2312,9 +2312,9 @@ nil)) ;;; Weight of objects -(setq dun-object-lbs +(setq dun-object-lbs '(2 1 1 1 1 0 2 2 10 3 1 1 1 0 1 1 0 1 1 1 1 0 0 2 2 1 0 0)) -(setq dun-object-pts +(setq dun-object-pts '(0 0 0 0 0 0 0 10 0 0 10 10 10 0 0 10 0 10 10 0 0 0 0 10 10 10 10 0)) @@ -2420,7 +2420,7 @@ wall, and you cannot move it." "The urinal is very clean compared with everything else in the cave. There isn't even any rust. Upon close examination you realize that the drain at the bottom is missing, and there is just a large hole leading down the -pipes into nowhere. The hole is too small for a person to fit in. The +pipes into nowhere. The hole is too small for a person to fit in. The flush handle is so clean that you can see your reflection in it." nil nil @@ -2444,7 +2444,7 @@ nil ) ) -(setq dun-diggables +(setq dun-diggables (list nil nil nil (list obj-cpu) nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil ;11-20 nil nil nil nil nil nil nil nil nil nil ;21-30 @@ -2453,8 +2453,8 @@ nil (setq dun-room-shorts nil) (dolist (x dun-rooms) - (setq dun-room-shorts - (append dun-room-shorts (list (downcase + (setq dun-room-shorts + (append dun-room-shorts (list (downcase (dun-space-to-hyphen (cadr x))))))) @@ -2526,7 +2526,7 @@ treasures for points?" "4" "four") (if (eq (dun-parse2 nil dun-unix-verbs line) -1) (progn (if (setq esign (string-match "=" line)) - (dun-doassign line esign) + (dun-doassign line esign) (dun-mprinc (car line-list)) (dun-mprincl ": not found."))))) (goto-char (point-max)) @@ -2559,7 +2559,7 @@ treasures for points?" "4" "four") (setq epoint (+ (string-match "\"" afterq) (+ esign 3)))) - + (if (not (setq epoint (string-match " " line))) (setq epoint (length line)))) (setq epoint (1+ epoint)) @@ -2587,7 +2587,7 @@ treasures for points?" "4" "four") (switch-to-buffer "*dungeon*") (if eval-error (dun-mprincl "Invalid syntax.")))) - + (defun dun-unix-interface () (dun-login) @@ -2691,7 +2691,7 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (dun-mprincl "-rwxr-xr-x 1 toukmond restricted 0 Jan 1 1970 paper.o.Z")) (dolist (x dun-inventory) - (dun-mprinc + (dun-mprinc "-rwxr-xr-x 1 toukmond restricted 0 Jan 1 1970 ") (dun-mprincl (nth x dun-objfiles)))) @@ -2740,7 +2740,7 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (if dun-batch-mode (dun-mprincl "Guest login okay, send your user ident as password.") - (dun-mprincl + (dun-mprincl "\nGuest login okay, send your user ident as password.")) (if dun-batch-mode (dun-mprinc "Password required for ") @@ -2753,25 +2753,25 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (dun-mprincl "Login failed.") (dun-mprincl "\nLogin failed.")) (if dun-batch-mode - (dun-mprincl + (dun-mprincl "Guest login okay, user access restrictions apply.") - (dun-mprincl + (dun-mprincl "\nGuest login okay, user access restrictions apply.")) (dun-ftp-commands) - (setq newlist + (setq newlist '("What password did you use during anonymous ftp to gamma?")) (setq newlist (append newlist (list ident))) (rplaca (nthcdr 1 dun-endgame-questions) newlist))))))))) - + (defun dun-ftp-commands () (setq dun-exitf nil) (let (line) (while (not dun-exitf) (dun-mprinc "ftp> ") (setq line (dun-read-line)) - (if + (if (eq - (dun-parse2 nil + (dun-parse2 nil '((type . dun-ftptype) (binary . dun-bin) (bin . dun-bin) (send . dun-send) (put . dun-send) (quit . dun-ftpquit) (help . dun-ftphelp)(ascii . dun-fascii) @@ -2836,10 +2836,10 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (if (not (eq dun-ftptype 'binary)) (progn (if (not (member obj-protoplasm - (nth receiving-room + (nth receiving-room dun-room-objects))) (dun-replace dun-room-objects receiving-room - (append (nth receiving-room + (append (nth receiving-room dun-room-objects) (list obj-protoplasm)))) (dun-remove-obj-from-inven counter)) @@ -2854,7 +2854,7 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (dun-mprincl "No such file.")))))) (defun dun-ftphelp (args) - (dun-mprincl + (dun-mprincl "Possible commands are:\nsend quit type ascii binary help")) (defun dun-uexit (args) @@ -2895,16 +2895,16 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (setq passwd (dun-read-line)) (if (not (string= passwd "worms")) (dun-mprincl "\nlogin incorrect") - (dun-mprinc + (dun-mprinc "\nYou begin to feel strange for a moment, and you lose your items." ) - (dun-replace dun-room-objects computer-room - (append (nth computer-room dun-room-objects) + (dun-replace dun-room-objects computer-room + (append (nth computer-room dun-room-objects) dun-inventory)) (setq dun-inventory nil) (setq dun-current-room receiving-room) (dun-uexit nil)))))))) - + (defun dun-cd (args) (let (tcdpath tcdroom path-elements room-check) (if (not (car args)) @@ -2926,8 +2926,8 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (setq tcdpath "/rooms") (setq tcdroom -2)) ;In /rooms,/usr,root - (if (or - (= tcdroom -2) (= tcdroom -4) + (if (or + (= tcdroom -2) (= tcdroom -4) (= tcdroom -3)) (progn (setq tcdpath "/") @@ -2964,12 +2964,12 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (if (= tcdroom -2) (progn (dolist (x dun-visited) - (setq room-check - (nth x + (setq room-check + (nth x dun-room-shorts)) (if (string= room-check pe) (progn - (setq tcdpath + (setq tcdpath (concat "/rooms/" room-check)) (setq tcdroom x)))) (if (= tcdroom -2) @@ -2998,9 +2998,9 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (if (= dun-cdroom -10) (setq checklist dun-inventory) (setq checklist (nth dun-cdroom dun-room-objects))) - (if (not (member (cdr - (assq (intern - (substring args 0 doto)) + (if (not (member (cdr + (assq (intern + (substring args 0 doto)) dun-objnames)) checklist)) (dun-mprincl "File not found.") @@ -3008,13 +3008,13 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (if (assq (intern args) dun-unix-verbs) (dun-mprincl "Ascii files only.") (dun-mprincl "File not found.")))))))) - + (defun dun-zippy (args) (dun-mprincl (yow))) (defun dun-rlogin-endgame () (if (not (= (dun-score nil) 90)) - (dun-mprincl + (dun-mprincl "You have not achieved enough points to connect to endgame.") (dun-mprincl"\nWelcome to the endgame. You are a truly noble adventurer.") (setq dun-current-room treasure-room) @@ -3025,7 +3025,7 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (random t) (setq tloc (+ 60 (random 18))) -(dun-replace dun-room-objects tloc +(dun-replace dun-room-objects tloc (append (nth tloc dun-room-objects) (list 18))) (setq tcomb (+ 100 (random 899))) @@ -3081,7 +3081,7 @@ drwxr-xr-x 3 root staff 2048 Jan 1 1970 ..") (sleep-for 1) (if (or (not (setq args (car args))) (string= args "\\")) (dun-mprincl " - Volume in drive A is FOO + Volume in drive A is FOO Volume Serial Number is 1A16-08C9 Directory of A:\\ @@ -3091,7 +3091,7 @@ FOO TXT 40 01-20-93 1:01a 1065280 bytes free ") (dun-mprincl " - Volume in drive A is FOO + Volume in drive A is FOO Volume Serial Number is 1A16-08C9 Directory of A:\\ @@ -3200,7 +3200,7 @@ File not found"))) (error (setq ferror t))) (kill-buffer (current-buffer)) ferror)) - + (defun dun-save-val (varname) (let (value) @@ -3338,7 +3338,7 @@ File not found"))) (if (eq (dun-parse2 nil dun-unix-verbs line) -1) (let (esign) (if (setq esign (string-match "=" line)) - (dun-doassign line esign) + (dun-doassign line esign) (dun-mprinc (car line-list)) (dun-mprincl ": not found."))))) (goto-char (point-max)) diff --git a/lisp/play/fortune.el b/lisp/play/fortune.el index 269139176c6..0fad1df1048 100644 --- a/lisp/play/fortune.el +++ b/lisp/play/fortune.el @@ -253,8 +253,8 @@ the value of `fortune-file'. This currently cannot handle directories." (concat fortune-strfile fortune-strfile-options " " fortune-file fortune-quiet-strfile-options)))))) (t (error "Can't compile fortune file %s" fortune-file))))) - - + + ;;; ************** ;;; Use fortune for signature ;;;###autoload diff --git a/lisp/play/gamegrid.el b/lisp/play/gamegrid.el index f21db937dc6..dd092287b7a 100644 --- a/lisp/play/gamegrid.el +++ b/lisp/play/gamegrid.el @@ -236,7 +236,7 @@ static unsigned char gamegrid_bits[] = { (defun gamegrid-colorize-glyph (color) (find-image `((:type xpm :data ,gamegrid-xpm :ascent center - :color-symbols + :color-symbols (("col1" . ,(gamegrid-color color 0.6)) ("col2" . ,(gamegrid-color color 0.8)) ("col3" . ,(gamegrid-color color 1.0)))) diff --git a/lisp/play/gametree.el b/lisp/play/gametree.el index a7d961cb90a..407f218fe0a 100644 --- a/lisp/play/gametree.el +++ b/lisp/play/gametree.el @@ -67,7 +67,7 @@ ;; and the cursor is positioned on the new line just after the move ;; number, so you can start typing the new analysis. That's it, -;; quite simple. +;; quite simple. ;; As of version 1.1, a simple score reducer has been implemented. ;; As you type in leaf variations, you can add a numerical score tag @@ -199,19 +199,19 @@ should be no leading white space." (defun gametree-looking-at-ply () "Read and return the number of the ply under point." (if (eobp) 0 - (let ((boundary (concat "[ \t]*\\([1-9][0-9]*\\)\\(" + (let ((boundary (concat "[ \t]*\\([1-9][0-9]*\\)\\(" gametree-full-ply-regexp "\\|" gametree-half-ply-regexp "\\)")) (limit (save-excursion (beginning-of-line 1) (point)))) (if (looking-at boundary) (+ (* 2 (string-to-int (match-string 1))) (if (string-match gametree-half-ply-regexp (match-string 2)) 1 0)) - (save-excursion + (save-excursion (re-search-backward boundary limit) (skip-chars-backward "0123456789") (1+ (* 2 (string-to-int (buffer-substring (point) (match-end 1)))))))))) - + (defun gametree-current-branch-ply () "Return the ply number of the first move of the current variation." (save-excursion @@ -244,7 +244,7 @@ This value is simply the outline heading level of the current line." (save-excursion (beginning-of-line 1) (insert following-leaves)))) - + ;;;; Functions related to the task of saving and restoring current ;;;; outline layout @@ -336,7 +336,7 @@ This value is simply the outline heading level of the current line." (goto-char (match-beginning 1)) (delete-region (point) (match-end 1)) (let ((standard-output (current-buffer))) - (princ gametree-local-layout)))))) + (princ gametree-local-layout)))))) ;;;; Scoring functions @@ -408,7 +408,7 @@ depth AT-DEPTH or smaller is found." (error (goto-char (point-max)) (if (not (bolp)) (insert "\n")))) - (let ((starting-plys + (let ((starting-plys (if (> (gametree-current-branch-depth) parent-depth) (gametree-current-branch-ply) (save-excursion (forward-line -1) @@ -429,7 +429,7 @@ variation and the breaking point. With a numerical argument AT-MOVE, split the variation before White's AT-MOVEth move, or Black's if negative. The last option will -only work of Black's moves are explicitly numbered, for instance +only work of Black's moves are explicitly numbered, for instance `1. e4 1: e5'." (interactive "*P") (if at-move (progn @@ -466,8 +466,8 @@ only work of Black's moves are explicitly numbered, for instance (funcall gametree-make-heading-function depth) (gametree-prettify-heading)))) (save-excursion - (if (not (looking-at (concat "[ \t]*[1-9][0-9]*\\(" - gametree-full-ply-regexp "\\|" + (if (not (looking-at (concat "[ \t]*[1-9][0-9]*\\(" + gametree-full-ply-regexp "\\|" gametree-half-ply-regexp "\\)"))) (progn (insert (format (if (= 0 (mod (gametree-looking-at-ply) 2)) @@ -525,8 +525,8 @@ being entered automatically (and thus should lack the manual mark)." (save-excursion (insert gametree-score-closer))) (if (not (null score)) (save-excursion - (insert (int-to-string (prefix-numeric-value score)))))) - + (insert (int-to-string (prefix-numeric-value score)))))) + (defun gametree-compute-and-insert-score () "Compute current node score, maybe recursively from subnodes. Insert it. Subnodes which have been manually scored are honored." @@ -568,7 +568,7 @@ buffer, it is replaced by the new value. See the documentation for nil) (define-derived-mode gametree-mode outline-mode "GameTree" - "Major mode for managing game analysis trees. + "Major mode for managing game analysis trees. Useful to postal and email chess (and, it is hoped, also checkers, go, shogi, etc.) players, it is a slightly modified version of Outline mode. diff --git a/lisp/play/gomoku.el b/lisp/play/gomoku.el index a7f5476309c..c644672356a 100644 --- a/lisp/play/gomoku.el +++ b/lisp/play/gomoku.el @@ -80,7 +80,7 @@ One useful value to include is `turn-on-font-lock' to highlight the pieces." :type 'hook :group 'gomoku) -;;; +;;; ;;; CONSTANTS FOR BOARD ;;; @@ -840,7 +840,7 @@ Use \\[describe-mode] for more info." gomoku-square-height) 1) gomoku-board-height)))) - + (defun gomoku-mouse-play (click) "Play at the square where you click." (interactive "e") diff --git a/lisp/play/handwrite.el b/lisp/play/handwrite.el index 95ddac4c0bf..9167bc536b5 100644 --- a/lisp/play/handwrite.el +++ b/lisp/play/handwrite.el @@ -143,7 +143,7 @@ Variables: handwrite-linespace (default 12) ((pmin) ; thanks, Havard (lastp) (cur-buf (current-buffer)) - (tpoint (point)) + (tpoint (point)) (ps-ypos 63) (lcount 0) (ipage 1) @@ -175,7 +175,7 @@ Variables: handwrite-linespace (default 12) (switch-to-buffer cur-buf) (goto-char (point-min)) ;start at beginning (save-excursion - ;;as long as we see a newline the document is not ended. + ;;as long as we see a newline the document is not ended. (while (re-search-forward "\n" nil t) (previous-line 1) (beginning-of-line) @@ -1375,7 +1375,7 @@ end ;; Key bindings -;;; I'd rather not fill up the menu bar menus with +;;; I'd rather not fill up the menu bar menus with ;;; lots of random miscellaneous features. -- rms. ;;;(define-key-after ;;; (lookup-key global-map [menu-bar edit]) diff --git a/lisp/play/hanoi.el b/lisp/play/hanoi.el index fd8223eb6b2..d3bf2bd336e 100644 --- a/lisp/play/hanoi.el +++ b/lisp/play/hanoi.el @@ -106,7 +106,7 @@ intermediate positions." ;;; ;;;###autoload (defun hanoi (nrings) - "Towers of Hanoi diversion. Use NRINGS rings." + "Towers of Hanoi diversion. Use NRINGS rings." (interactive (list (if (null current-prefix-arg) 3 @@ -132,7 +132,7 @@ Repent before ring 31 moves." ;;;###autoload (defun hanoi-unix-64 () - "Like hanoi-unix, but pretend to have a 64-bit clock. + "Like hanoi-unix, but pretend to have a 64-bit clock. This is, necessarily (as of emacs 20.3), a crock. When the current-time interface is made s2G-compliant, hanoi.el will need to be updated." diff --git a/lisp/play/life.el b/lisp/play/life.el index 5442595dcc1..c3bc0b38f8a 100644 --- a/lisp/play/life.el +++ b/lisp/play/life.el @@ -53,7 +53,7 @@ " @@ " " @@ " " @@ " " @@ " " @@ " " @@ " " @@") - ("@@@@@@@@@" "@ @ @" "@ @@@@@ @" "@ @ @ @" "@@@ @@@" + ("@@@@@@@@@" "@ @ @" "@ @@@@@ @" "@ @ @ @" "@@@ @@@" "@ @ @ @" "@ @@@@@ @" "@ @ @" "@@@@@@@@@")] "Vector of rectangles containing some Life startup patterns.") @@ -265,7 +265,7 @@ generations (this defaults to 1)." (defun life-display-generation (sleeptime) (goto-char life-window-start) (recenter 0) - + ;; Redisplay; if the user has hit a key, exit the loop. (or (eq t (sit-for sleeptime)) (throw 'life-exit nil))) diff --git a/lisp/play/pong.el b/lisp/play/pong.el index 11aad3b6ea3..8d4f0871290 100644 --- a/lisp/play/pong.el +++ b/lisp/play/pong.el @@ -34,12 +34,12 @@ ;;; Customization -(defgroup pong nil +(defgroup pong nil "Emacs-Lisp implementation of the classical game pong." :tag "Pong" :group 'games) -(defcustom pong-buffer-name "*Pong*" +(defcustom pong-buffer-name "*Pong*" "*Name of the buffer used to play." :group 'pong :type '(string)) @@ -313,12 +313,12 @@ implementations you move with left/right paddle." (gamegrid-set-cell x (1- y) pong-blank)) (if (< (+ y pong-bat-width) (1- pong-height)) (gamegrid-set-cell x (+ y pong-bat-width) pong-blank))))) - + (defun pong-init () "Initialize a game." - + (define-key pong-mode-map pong-pause-key 'pong-pause) (add-hook 'kill-buffer-hook 'pong-quit nil t) @@ -345,44 +345,44 @@ updates ball and bats positions. It is responsible of collision detection and checks if a player scores." (if (not (eq (current-buffer) pong-buffer)) (pong-pause) - + (let ((old-x pong-x) (old-y pong-y)) - + (setq pong-x (+ pong-x pong-xx)) (setq pong-y (+ pong-y pong-yy)) - + (if (and (> old-y 0) (< old-y (- pong-height 1))) (gamegrid-set-cell old-x old-y pong-blank)) - + (if (and (> pong-y 0) (< pong-y (- pong-height 1))) (gamegrid-set-cell pong-x pong-y pong-ball)) - + (cond ((or (= pong-x 3) (= pong-x 2)) - (if (and (>= pong-y pong-bat-player1) + (if (and (>= pong-y pong-bat-player1) (< pong-y (+ pong-bat-player1 pong-bat-width))) - (and + (and (setq pong-yy (+ pong-yy - (cond + (cond ((= pong-y pong-bat-player1) -1) ((= pong-y (1+ pong-bat-player1)) 0) (t 1)))) (setq pong-xx (- pong-xx))))) ((or (= pong-x (- pong-width 4)) (= pong-x (- pong-width 3))) - (if (and (>= pong-y pong-bat-player2) + (if (and (>= pong-y pong-bat-player2) (< pong-y (+ pong-bat-player2 pong-bat-width))) - (and + (and (setq pong-yy (+ pong-yy - (cond + (cond ((= pong-y pong-bat-player2) -1) ((= pong-y (1+ pong-bat-player2)) 0) (t 1)))) (setq pong-xx (- pong-xx))))) - + ((<= pong-y 1) (setq pong-yy (- pong-yy))) diff --git a/lisp/play/solitaire.el b/lisp/play/solitaire.el index da144683b0a..127db243d3d 100644 --- a/lisp/play/solitaire.el +++ b/lisp/play/solitaire.el @@ -76,9 +76,9 @@ (define-key solitaire-mode-map [kp-5] 'solitaire-center-point) (define-key solitaire-mode-map [S-kp-6] 'solitaire-move-right) - (define-key solitaire-mode-map [S-kp-4] 'solitaire-move-left) - (define-key solitaire-mode-map [S-kp-8] 'solitaire-move-up) - (define-key solitaire-mode-map [S-kp-2] 'solitaire-move-down) + (define-key solitaire-mode-map [S-kp-4] 'solitaire-move-left) + (define-key solitaire-mode-map [S-kp-8] 'solitaire-move-up) + (define-key solitaire-mode-map [S-kp-2] 'solitaire-move-down) (define-key solitaire-mode-map [kp-enter] 'solitaire-move) (define-key solitaire-mode-map [kp-0] 'solitaire-undo) @@ -154,22 +154,22 @@ I don't know who invented this game, but it seems to be rather old and its origin seems to be northern Africa. Here's how to play: Initially, the board will look similar to this: - Le Solitaire - ============ - - o o o - - o o o - + Le Solitaire + ============ + + o o o + + o o o + o o o o o o o - + o o o . o o o - + o o o o o o o - - o o o - - o o o + + o o o + + o o o Let's call the o's stones and the .'s holes. One stone fits into one hole. As you can see, all holes but one are occupied by stones. The @@ -186,18 +186,18 @@ which therefore is taken away. The above thus `evaluates' to: . . o That's all. Here's the board after two moves: - o o o - - . o o - + o o o + + . o o + o o . o o o o - + o . o o o o o - + o o o o o o o - - o o o - + + o o o + o o o Pick your favourite shortcuts: @@ -312,7 +312,7 @@ Pick your favourite shortcuts: (not (eolp)))) (if (or (= 0 (following-char)) (= ?\ (following-char)) - (= ?\n (following-char))) + (= ?\n (following-char))) (goto-char start)))) (defun solitaire-center-point () @@ -354,7 +354,7 @@ which a stone will be taken away) and target." (error class) (let ((start (car class)) (skip (car (cdr class))) - (target (car (cdr (cdr class))))) + (target (car (cdr (cdr class))))) (goto-char start) (delete-char 1) (insert ?.) @@ -385,7 +385,7 @@ which a stone will be taken away) and target." (<= (solitaire-current-line) solitaire-end-y) (setq count (1+ count)))) count))) - (solitaire-build-modeline) + (solitaire-build-modeline) (if solitaire-auto-eval (solitaire-do-check))) (defun solitaire-check () diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index 3e4d5baa9ba..d5bd539b421 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -303,7 +303,7 @@ type A is Value_1, Value_2);" :type 'boolean :group 'ada) - + (defcustom ada-indent-is-separate t "*Non-nil means indent 'is separate' or 'is abstract' if on a single line." :type 'boolean :group 'ada) @@ -1322,7 +1322,7 @@ If you use ada-xref.el: (modes . '(ada-mode)))) (setq ada-align-modes nil) - + (add-to-list 'ada-align-modes '(ada-declaration-assign (regexp . "[^:]\\(\\s-*\\):[^:]") @@ -1348,10 +1348,10 @@ If you use ada-xref.el: (regexp . "\\(\\s-+\\)at\\>") (modes . '(ada-mode)))) - + (setq align-mode-rules-list ada-align-modes) )) - + ;; Set up the contextual menu (if ada-popup-key (define-key ada-mode-map ada-popup-key 'ada-popup-menu)) @@ -1366,11 +1366,11 @@ If you use ada-xref.el: ;; beginning of subprograms, not the end. ;; Fix is: redefine a new function ada-which-function, and call it when the ;; major-mode is ada-mode. - + (unless ada-xemacs ;; This function do not require that we load which-func now. ;; This can be done by the user if he decides to use which-func-mode - + (defadvice which-function (around ada-which-function activate) "In Ada buffers, should work with overloaded subprograms, and does not use imenu." @@ -1412,7 +1412,7 @@ use imenu." (if ada-fill-comment-prefix (set 'comment-start ada-fill-comment-prefix) (set 'comment-start "-- ")) - + ;; Run this after the hook to give the users a chance to activate ;; font-lock-mode @@ -1461,7 +1461,7 @@ use imenu." (defun ada-save-exceptions-to-file (file-name) "Save the exception lists `ada-case-exception' and `ada-case-exception-substring' to the file FILE-NAME." - + ;; Save the list in the file (find-file (expand-file-name file-name)) (erase-buffer) @@ -1474,7 +1474,7 @@ use imenu." (save-buffer) (kill-buffer nil) ) - + (defun ada-create-case-exception (&optional word) "Defines WORD as an exception for the casing system. If WORD is not given, then the current word in the buffer is used instead. @@ -1625,14 +1625,14 @@ word itself has a special casing." (save-excursion (forward-word -1) - + (unwind-protect (progn (modify-syntax-entry ?_ "." (syntax-table)) - + (while substrings (setq re (concat "\\b" (regexp-quote (caar substrings)) "\\b")) - + (save-excursion (while (re-search-forward re max t) (replace-match (caar substrings)))) @@ -2359,7 +2359,7 @@ offset." (goto-char column) (skip-chars-backward " \t") (list (1- (point)) 0)) - + (if (and (skip-chars-backward " \t") (= (char-before) ?\n) (not (forward-comment -10000)) @@ -2378,10 +2378,10 @@ offset." ;; or else D) -- indenting this line. ;; ??? This is really a hack, we should have a proper way to go to ;; ??? the beginning of the statement - + (if (= (char-before) ?\)) (backward-sexp)) - + (if (memq (char-before) '(?, ?\; ?\( ?\))) (list column 0) (list column 'ada-continuation-indent) @@ -2431,7 +2431,7 @@ offset." (beginning-of-line) (if (looking-at ada-named-block-re) (setq label (- ada-label-indent)))))))) - + ;; found 'record' => ;; if the keyword is found at the beginning of a line (or just ;; after limited, we indent on it, otherwise we indent on the @@ -2469,7 +2469,7 @@ offset." (list (progn (back-to-indentation) (point)) 0)))) ;; elsif - + ((looking-at "elsif\\>") (save-excursion (ada-goto-matching-start 1 nil t) @@ -2480,7 +2480,7 @@ offset." ;;--------------------------- ;; starting with w (when) ;;--------------------------- - + ((and (= (downcase (char-after)) ?w) (looking-at "when\\>")) (save-excursion @@ -2507,7 +2507,7 @@ offset." ;;--------------------------- ;; starting with l (loop) ;;--------------------------- - + ((and (= (downcase (char-after)) ?l) (looking-at "loop\\>")) (setq pos (point)) @@ -2526,7 +2526,7 @@ offset." ;;---------------------------- ;; starting with l (limited) or r (record) ;;---------------------------- - + ((or (and (= (downcase (char-after)) ?l) (looking-at "limited\\>")) (and (= (downcase (char-after)) ?r) @@ -2580,7 +2580,7 @@ offset." ((and (= (downcase (char-after)) ?r) (looking-at "re\\(turn\\|names\\)\\>")) - + (save-excursion (let ((var 'ada-indent-return)) ;; If looking at a renames, skip the 'return' statement too @@ -2592,12 +2592,12 @@ offset." (= (downcase (char-after (car pos))) ?r)) (goto-char (car pos))) (set 'var 'ada-indent-renames))) - + (forward-comment -1000) (if (= (char-before) ?\)) (forward-sexp -1) (forward-word -1)) - + ;; If there is a parameter list, and we have a function declaration ;; or a access to subprogram declaration (let ((num-back 1)) @@ -2610,13 +2610,13 @@ offset." (backward-word 1) (set 'num-back 2) (looking-at "\\(function\\|procedure\\)\\>"))))) - + ;; The indentation depends of the value of ada-indent-return (if (<= (eval var) 0) (list (point) (list '- var)) (list (progn (backward-word num-back) (point)) var)) - + ;; Else there is no parameter list, but we have a function ;; Only do something special if the user want to indent ;; relative to the "function" keyword @@ -2624,10 +2624,10 @@ offset." (save-excursion (forward-word -1) (looking-at "function\\>"))) (list (progn (forward-word -1) (point)) var) - + ;; Else... (ada-indent-on-previous-lines nil orgpoint orgpoint))))))) - + ;;-------------------------------- ;; starting with 'o' or 'p' ;; 'or' as statement-start @@ -2817,7 +2817,7 @@ if INITIAL-POS is non-nil, moves point to INITIAL-POS before calculation." ((looking-at "<<") (list (+ (save-excursion (back-to-indentation) (point)) (- ada-label-indent)))) - + ;; ((looking-at "with\\>\\|use\\>") ;; Are we still in that statement, or are we in fact looking at @@ -3432,7 +3432,7 @@ match." (goto-char (car match-dat)) (unless (ada-in-open-paren-p) (cond - + ((and (looking-at "\\<\\(record\\|loop\\|select\\|else\\|then\\)\\>") (save-excursion @@ -3445,7 +3445,7 @@ match." (and (save-excursion (ada-goto-previous-word) (ada-goto-previous-word) (not (looking-at "subtype"))) - + (save-excursion (goto-char (cdr match-dat)) (ada-goto-next-non-ws) ;; words that can go after an 'is' @@ -3456,7 +3456,7 @@ match." '("separate" "access" "array" "abstract" "new") t) "\\>\\|(")))))))) - + (t (setq found t)) ))) @@ -3779,7 +3779,7 @@ If GOTOTHEN is non-nil, point moves to the 'then' following 'if'." ;; it ends a block => increase nest depth (setq nest-count (1+ nest-count) pos (point)) - + ;; it starts a block => decrease nest depth (setq nest-count (1- nest-count)))) (goto-char pos)) @@ -3869,7 +3869,7 @@ If GOTOTHEN is non-nil, point moves to the 'then' following 'if'." (back-to-indentation) (looking-at "\\<then\\>"))) (goto-char (match-beginning 0))) - + ;; ;; found 'do' => skip back to 'accept' ;; @@ -3879,7 +3879,7 @@ If GOTOTHEN is non-nil, point moves to the 'then' following 'if'." 'word-search-backward) (error "missing 'accept' in front of 'do'")))) (point)) - + (if noerror nil (error "no matching start")))))) @@ -3936,7 +3936,7 @@ If NOERROR is non-nil, it only returns nil if found no matching start." ;; handling. ;; Nothing should be done if we have only the specs or a ;; generic instantion. - + ((and (looking-at "\\<procedure\\|function\\>")) (if first (forward-word 1) @@ -3944,7 +3944,7 @@ If NOERROR is non-nil, it only returns nil if found no matching start." (ada-goto-next-non-ws) (unless (looking-at "\\<new\\>") (ada-goto-matching-end 0 t)))) - + ;; found block end => decrease nest depth ((looking-at "\\<end\\>") (setq nest-count (1- nest-count) @@ -3955,7 +3955,7 @@ If NOERROR is non-nil, it only returns nil if found no matching start." (ada-goto-next-non-ws) (looking-at "\\<\\(loop\\|select\\|record\\|case\\|if\\)\\>")) (forward-word 1))) - + ;; found package start => check if it really starts a block, and is not ;; in fact a generic instantiation for instance ((looking-at "\\<package\\>") @@ -3967,7 +3967,7 @@ If NOERROR is non-nil, it only returns nil if found no matching start." (goto-char (match-end 0)) (setq nest-count (1+ nest-count) found (<= nest-count 0)))) - + ;; all the other block starts (t (setq nest-count (1+ nest-count) @@ -4188,7 +4188,7 @@ parenthesis, or nil." ;; Value_1); ;; type B is ( -- comment ;; Value_2); - + (if (or (not ada-indent-handle-comment-special) (not (looking-at "[ \t]+--"))) (skip-chars-forward " \t")) @@ -4279,7 +4279,7 @@ of the region. Otherwise, operates only on the current line." (replace-match "-- \\1") (forward-line 1) (beginning-of-line)) - + (goto-char (point-min)) (while (re-search-forward "\\>(" nil t) (if (not (ada-in-string-or-comment-p)) @@ -4405,7 +4405,7 @@ Moves to 'begin' if in a declarative part." (skip-syntax-backward "w") (looking-at "\\<begin\\>")) (ada-goto-matching-end 1)) - + ;; on first line of subprogram body ;; Do nothing for specs or generic instantion, since these are ;; handled as the general case (find the enclosing block) @@ -4418,7 +4418,7 @@ Moves to 'begin' if in a declarative part." )) (skip-syntax-backward "w") (ada-goto-matching-end 0 t)) - + ;; on first line of task declaration ((save-excursion (and (ada-goto-stmt-start) @@ -4444,12 +4444,12 @@ Moves to 'begin' if in a declarative part." (skip-syntax-backward "w") (looking-at "\\<declare\\>")) (ada-goto-matching-end 0 t)) - + ;; inside a 'begin' ... 'end' block (decl-start (goto-char decl-start) (ada-goto-matching-end 0 t)) - + ;; (hopefully ;-) everything else (t (ada-goto-matching-end 1))) @@ -4831,7 +4831,7 @@ otherwise." ;; If we are using project file, search for the other file in all ;; the possible src directories. - + (if (functionp 'ada-find-src-file-in-dir) (let ((other (ada-find-src-file-in-dir @@ -4888,7 +4888,7 @@ Since the search can be long, the results are cached." ;; Are we looking at "function Foo\n (paramlist)" (skip-chars-forward " \t\n(") - + (condition-case nil (up-list 1) (error nil)) @@ -4899,7 +4899,7 @@ Since the search can be long, the results are cached." (forward-word 1) (skip-chars-forward " \t\n") (skip-chars-forward "a-zA-Z0-9_'"))) - + ;; Can't simply do forward-word, in case the "is" is not on the ;; same line as the closing parenthesis (skip-chars-forward "is \t\n") @@ -5088,7 +5088,7 @@ Returns nil if no body was found." ;; Ada unnamed numerical constants (list "\\W\\([-+]?[0-9._]+\\)\\>" '(1 font-lock-constant-face)) - + )) "Default expressions to highlight in Ada mode.") diff --git a/lisp/progmodes/ada-prj.el b/lisp/progmodes/ada-prj.el index 09ec600486e..ce96f43f4ed 100644 --- a/lisp/progmodes/ada-prj.el +++ b/lisp/progmodes/ada-prj.el @@ -75,7 +75,7 @@ prj))) (if (not (string= (file-name-extension filename t) ".adp")) (error "File name extension for project files must be .adp")) - + (ada-customize nil filename))) (defun ada-prj-edit () @@ -105,19 +105,19 @@ project file is found, returns the default values." ;; Else use the active one (set 'prj ada-prj-default-project-file)) - + (if (and prj (not (string= prj "")) (assoc prj ada-xref-project-files)) (set symbol (copy-sequence (cdr (assoc prj ada-xref-project-files)))) - + ;; Set default values (except for the file name if this was given ;; in the buffer (ada-xref-set-default-prj-values symbol ada-buffer) (if (and prj (not (string= prj ""))) (set symbol (plist-put (eval symbol) 'filename prj))) ))) - + (defun ada-prj-save-specific-option (field) "Returns the string to print in the project file to save FIELD. @@ -138,7 +138,7 @@ If the current value of FIELD is the default value, returns an empty string." ;; Save the fields that do not depend on the current buffer ;; only if they are different from the default value - + (ada-prj-save-specific-option 'comp_opt) (ada-prj-save-specific-option 'bind_opt) (ada-prj-save-specific-option 'link_opt) @@ -173,7 +173,7 @@ If the current value of FIELD is the default value, returns an empty string." (plist-get ada-prj-current-values 'debug_post_cmd)) "\n" )) - + (find-file file-name) (erase-buffer) (insert output) @@ -264,9 +264,9 @@ The current buffer must be the project editing buffer." widget-field-list nil) (mapcar (lambda (x) (delete-overlay x)) (car (overlay-lists))) (mapcar (lambda (x) (delete-overlay x)) (cdr (overlay-lists))))) - + ;; Display the tabs - + (widget-insert "\n Project and Editor configuration.\n ___________ ____________ ____________ ____________ ____________\n / ") (widget-create 'push-button :notify @@ -286,9 +286,9 @@ The current buffer must be the project editing buffer." (widget-insert " \\\n") ;; Display the currently selected page - + (cond - + ;; ;; First page (General) ;; @@ -335,7 +335,7 @@ vxworks, you would enter 'powerpc-wrs-vxworks-'. To use JGNAT, enter 'j'.") ) - + ;; ;; Second page (Paths) ;; @@ -347,7 +347,7 @@ To use JGNAT, enter 'j'.") (plist-get ada-prj-current-values 'cross_prefix)) (ada-initialize-runtime-library ada-old-cross-prefix))) - + (widget-insert "/_____________\\/ \\/______________\\/______________\\/______________\\\n") (ada-prj-field 'src_dir "Source directories" "Enter the list of directories where your Ada @@ -363,7 +363,7 @@ and the standard runtime." "\n") ) (widget-insert "\n\n") - + (ada-prj-field 'obj_dir "Object directories" "Enter the list of directories where the GNAT library files (ALI files) can be found. These @@ -397,7 +397,7 @@ command and are passed to the binder") command and are passed to the linker") (ada-prj-field 'gnatmake_opt "Switches for gnatmake" "These switches are used in the default gnatmake -command.") +command.") (ada-prj-field 'gnatfind_opt "Switches for gnatfind" "The command gnatfind is run every time the Ada/Goto/List_References menu. You should for instance add -a if you are working in an environment @@ -455,7 +455,7 @@ command will be executed on the remote host." t) debugger" "The following commands are executed one after the other before starting the debugger. These can be used to set up your environment." t) - + (ada-prj-field 'debug_cmd "Debugging the application" "Specifies how to debug the application, possibly remotely if remote_machine has been set. We @@ -469,7 +469,7 @@ recommend the following debuggers: started. These can be used to initialize the debugger, for instance to connect to the target when working with cross-environments" t) ) - + ) @@ -505,7 +505,7 @@ If FILENAME is given, edit that file." ;; We can only edit interactively the standard ada-mode project files. If ;; the user is using other formats for the project file (through hooks in ;; `ada-load-project-hook', we simply edit the file - + (if (and (not new-file) (or ada-prj-default-project-file filename) (string= (file-name-extension @@ -519,22 +519,22 @@ If FILENAME is given, edit that file." ;; Else start the interactive editor (switch-to-buffer "*Customize Ada Mode*") (kill-all-local-variables) - + (ada-xref-set-default-prj-values 'ada-prj-default-values ada-buffer) (ada-prj-initialize-values 'ada-prj-current-values ada-buffer filename) - + (set (make-local-variable 'ada-prj-ada-buffer) ada-buffer) - + (use-local-map (copy-keymap custom-mode-map)) (local-set-key "\C-x\C-s" 'ada-prj-save) - + (make-local-variable 'widget-keymap) (define-key widget-keymap "\C-x\C-s" 'ada-prj-save) - + (set (make-local-variable 'ada-old-cross-prefix) (ada-xref-get-project-field 'cross-prefix)) - + (ada-prj-display-page 1) ))) diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el index cb9e1dcf934..ebc658f5622 100644 --- a/lisp/progmodes/ada-stmt.el +++ b/lisp/progmodes/ada-stmt.el @@ -29,7 +29,7 @@ ;; Nov 1993. Rolf Ebert <ebert@enpc.fr> (RE) Moved the ;; skeleton generation into this separate file. The code still is ;; essentially written by DP -;; +;; ;; Adapted Jun 1994. Markus Heritsch ;; <Markus.Heritsch@studbox.uni-stuttgart.de> (MH) ;; added menu bar support for templates @@ -432,7 +432,7 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'." ; "Inserts a use clause, prompting for the list of packages used." ; "[list of packages used]: " ; "use " str ?\;) - + (define-skeleton ada-record "Insert a skeleton record type declaration." @@ -475,7 +475,7 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'." " (" ("[discriminant]: " str "; ") ") is\n" > "entry " _ \n <"end " str ";" ) - + (define-skeleton ada-get-param1 "Prompt for arguments and if any enclose them in brackets." @@ -556,7 +556,7 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'." "[delay value]: " < "or\n" > "delay " str ";") - + (define-skeleton ada-or-terminate "Insert a terminate statement." diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el index 0390ac04854..369119208f9 100644 --- a/lisp/progmodes/ada-xref.el +++ b/lisp/progmodes/ada-xref.el @@ -225,7 +225,7 @@ CROSS-PREFIX is the prefix to use for the gnatls command" (goto-char (point-min)) ;; Source path - + (search-forward "Source Search Path:") (forward-line 1) (while (not (looking-at "^$")) @@ -238,7 +238,7 @@ CROSS-PREFIX is the prefix to use for the gnatls command" (forward-line 1)) ;; Object path - + (search-forward "Object Search Path:") (forward-line 1) (while (not (looking-at "^$")) @@ -282,7 +282,7 @@ replaced by the name including the extension." (if (null value) (if (not (setq value (getenv name))) (message (concat "No environment variable " name " found")))) - + (cond ((null value) (setq cmd-string (replace-match "" t t cmd-string))) @@ -303,7 +303,7 @@ replaced by the name including the extension." plist) (save-excursion (set-buffer ada-buffer) - + (set 'plist ;; Try hard to find a default value for filename, so that the user ;; can edit his project file even if the current buffer is not an @@ -357,7 +357,7 @@ replaced by the name including the extension." 'debug_post_cmd (list nil))) ) (set symbol plist))) - + (defun ada-xref-get-project-field (field) "Extract the value of FIELD from the current project file. The project file must have been loaded first. @@ -373,7 +373,7 @@ addition return the default paths." ;; Get the project file (either the current one, or a default one) (setq file (or (assoc file-name ada-xref-project-files) (assoc nil ada-xref-project-files))) - + ;; If the file was not found, use the default values (if file ;; Get the value from the file @@ -409,10 +409,10 @@ All the directories are returned as absolute directories." (append ;; Add ${build_dir} in front of the path (list build-dir) - + (ada-get-absolute-dir-list (ada-xref-get-project-field 'src_dir) build-dir) - + ;; Add the standard runtime at the end ada-xref-runtime-library-specs-path))) @@ -424,10 +424,10 @@ All the directories are returned as absolute directories." (append ;; Add ${build_dir} in front of the path (list build-dir) - + (ada-get-absolute-dir-list (ada-xref-get-project-field 'obj_dir) build-dir) - + ;; Add the standard runtime at the end ada-xref-runtime-library-ali-path))) @@ -442,7 +442,7 @@ All the directories are returned as absolute directories." (cons 'New (cons "New..." 'ada-prj-new)) (cons 'Edit (cons "Edit..." 'ada-prj-edit)) (cons 'sep (cons "---" nil)))) - + ;; Add the new items (mapcar (lambda (x) @@ -469,7 +469,7 @@ All the directories are returned as absolute directories." (equal ada-prj-default-project-file (car x)) )))))))) - + ;; Parses all the known project files, and insert at least the default ;; one (in case ada-xref-project-files is nil) (or ada-xref-project-files '(nil))) @@ -650,7 +650,7 @@ name as was passed to `ada-create-menu'." (not ada-tight-gvd-integration)) :style toggle :selected ada-tight-gvd-integration])) ) - + ;; for Emacs (let* ((menu (or (lookup-key ada-mode-map [menu-bar Ada]) ;; Emacs-21.4's easymenu.el downcases the events. @@ -699,7 +699,7 @@ name as was passed to `ada-create-menu'." '("Goto Declaration Other Frame" . ada-goto-declaration-other-frame)) (define-key goto-menu [Decl] '("Goto Declaration/Body" . ada-goto-declaration)) - + (define-key edit-menu [rem] '("----" . nil)) (define-key edit-menu [Complete] '("Complete Identifier" . ada-complete-identifier)) @@ -745,7 +745,7 @@ name as was passed to `ada-create-menu'." (not ada-xref-project-files) (string= ada-prj-default-project-file "")) (ada-reread-prj-file))) - + (defun ada-xref-push-pos (filename position) "Push (FILENAME, POSITION) on the position ring for cross-references." (setq ada-xref-pos-ring (cons (list position filename) ada-xref-pos-ring)) @@ -787,21 +787,21 @@ file. If none is set, return nil." ;; Use the active project file if there is one. ;; This is also valid if we don't currently have an Ada buffer, or if ;; the current buffer is not a real file (for instance an emerge buffer) - + (if (or (not (string= mode-name "Ada")) (not (buffer-file-name)) (and ada-prj-default-project-file (not (string= ada-prj-default-project-file "")))) (set 'selected ada-prj-default-project-file) - + ;; other cases: use a more complex algorithm - + (let* ((current-file (buffer-file-name)) (first-choice (concat (file-name-sans-extension current-file) ada-project-file-extension)) (dir (file-name-directory current-file)) - + ;; on Emacs 20.2, directory-files does not work if ;; parse-sexp-lookup-properties is set (parse-sexp-lookup-properties nil) @@ -810,18 +810,18 @@ file. If none is set, return nil." (concat ".*" (regexp-quote ada-project-file-extension) "$"))) (choice nil)) - + (cond - + ;; Else if there is a project file with the same name as the Ada ;; file, but not the same extension. ((file-exists-p first-choice) (set 'selected first-choice)) - + ;; Else if only one project file was found in the current directory ((= (length prj-files) 1) (set 'selected (car prj-files))) - + ;; Else if there are multiple files, ask the user ((and (> (length prj-files) 1) (not no-user-question)) (save-window-excursion @@ -846,7 +846,7 @@ file. If none is set, return nil." (setq choice (string-to-int (read-from-minibuffer "Enter No. of your choice: ")))) (set 'selected (nth (1- choice) prj-files)))) - + ;; Else if no project file was found in the directory, ask a name ;; to the user, using as a default value the last one entered by ;; the user @@ -921,7 +921,7 @@ The current buffer should be the ada-file buffer." (set 'project (plist-put project (intern (match-string 1)) (match-string 2)))))) (forward-line 1)) - + (if src_dir (set 'project (plist-put project 'src_dir (reverse src_dir)))) (if obj_dir (set 'project (plist-put project 'obj_dir @@ -946,7 +946,7 @@ The current buffer should be the ada-file buffer." ;; the list (if (assoc nil ada-xref-project-files) (setq ada-xref-project-files nil)) - + ;; Memorize the newly read project file (if (assoc prj-file ada-xref-project-files) (setcdr (assoc prj-file ada-xref-project-files) project) @@ -954,7 +954,7 @@ The current buffer should be the ada-file buffer." ;; Set the project file as the active one. (setq ada-prj-default-project-file prj-file) - + ;; Sets up the compilation-search-path so that Emacs is able to ;; go to the source of the errors in a compilation buffer (setq compilation-search-path (ada-xref-get-src-dir-field)) @@ -964,13 +964,13 @@ The current buffer should be the ada-file buffer." (progn (setq ada-case-exception-file (reverse casing)) (ada-case-read-exceptions))) - + ;; Add the directories to the search path for ff-find-other-file ;; Do not add the '/' or '\' at the end (setq ada-search-directories (append (mapcar 'directory-file-name compilation-search-path) ada-search-directories)) - + ;; Kill the project buffer (kill-buffer nil) (set-buffer ada-buffer) @@ -985,8 +985,8 @@ The current buffer should be the ada-file buffer." ;; directory. (setq compilation-search-path (list nil default-directory)) )) - - + + (defun ada-find-references (&optional pos arg local-only) "Find all references to the entity under POS. Calls gnatfind to find the references. @@ -1061,7 +1061,7 @@ buffer *gnatfind* if it exists." (save-excursion (set-buffer "*gnatfind*") (setq old-contents (buffer-string)))) - + (compile-internal command "No more references" "gnatfind") ;; Hide the "Compilation" menu @@ -1251,7 +1251,7 @@ If ARG is not nil, ask for user confirmation." ;; Make a single command from the list of commands, including the ;; commands to run it on a remote machine. (setq cmd (ada-remote (mapconcat 'identity cmd ada-command-separator))) - + (if (or ada-xref-confirm-compile arg) (setq cmd (read-from-minibuffer "enter command to compile: " cmd))) @@ -1260,7 +1260,7 @@ If ARG is not nil, ask for user confirmation." ;; which gets confused by newline characters. (if (not (string-match "cmdproxy.exe" shell-file-name)) (setq cmd (concat cmd "\n\n"))) - + (compile (ada-quote-cmd cmd)))) (defun ada-compile-current (&optional arg prj-field) @@ -1274,16 +1274,16 @@ command, and should be either comp_cmd (default) or check_cmd." (cmd (ada-xref-get-project-field field)) (process-environment (ada-set-environment)) (compilation-scroll-output t)) - + (setq compilation-search-path (ada-xref-get-src-dir-field)) (unless cmd (setq cmd '("") arg t)) - + ;; Make a single command from the list of commands, including the ;; commands to run it on a remote machine. (setq cmd (ada-remote (mapconcat 'identity cmd ada-command-separator))) - + ;; If no project file was found, ask the user (if (or ada-xref-confirm-compile arg) (setq cmd (read-from-minibuffer "enter command to compile: " cmd))) @@ -1293,7 +1293,7 @@ command, and should be either comp_cmd (default) or check_cmd." ;; which gets confused by newline characters. (if (not (string-match "cmdproxy.exe" shell-file-name)) (setq cmd (concat cmd "\n\n"))) - + (compile (ada-quote-cmd cmd)))) (defun ada-check-current (&optional arg) @@ -1321,7 +1321,7 @@ if ARG is not-nil, asks for user confirmation." ;; Modify the command to run remotely (setq command (ada-remote (mapconcat 'identity command ada-command-separator))) - + ;; Ask for the arguments to the command if required (if (or ada-xref-confirm-compile arg) (setq command (read-from-minibuffer "Enter command to execute: " @@ -1412,7 +1412,7 @@ If ARG is non-nil, ask the user to confirm the command." ;; Temporarily replaces the definition of `comint-exec' so that we ;; can execute commands before running gdb. - (fset 'comint-exec + (fset 'comint-exec `(lambda (buffer name command startfile switches) (let (compilation-buffer-name-function) (save-excursion @@ -1429,7 +1429,7 @@ If ARG is non-nil, ask the user to confirm the command." ada-tight-gvd-integration (not (string-match "--tty" cmd))) (setq cmd (concat cmd "--tty"))) - + (if (and (string-match "jdb" (comint-arguments cmd 0 0)) (boundp 'jdb)) (funcall (symbol-function 'jdb) cmd) @@ -1480,7 +1480,7 @@ replacing the file extension with .ali" (if (and ali-file-name (get-file-buffer ali-file-name)) (kill-buffer (get-file-buffer ali-file-name))) - + (let* ((name (ada-convert-file-name file)) (body-name (or (ada-get-body-name name) name))) @@ -1516,7 +1516,7 @@ replacing the file extension with .ali" (while (and (not found) dir-list) (set 'found (concat (file-name-as-directory (car dir-list)) (file-name-nondirectory file))) - + (unless (file-exists-p found) (set 'found nil)) (set 'dir-list (cdr dir-list))) @@ -1587,14 +1587,14 @@ the project file." (file-name-nondirectory (ada-other-file-name))) ".ali")))) - + (setq ali-file-name (or ali-file-name - + ;; Else we take the .ali file associated with the unit (ada-find-ali-file-in-dir short-ali-file-name) - + ;; else we did not find the .ali file Second chance: in case ;; the files do not have standard names (such as for instance @@ -1605,35 +1605,35 @@ the project file." (file-name-nondirectory (ada-other-file-name))) ".ali")) - + ;; If we still don't have an ali file, try to get the one ;; from the parent unit, in case we have a separate entity. (let ((parent-name (file-name-sans-extension (file-name-nondirectory file)))) - + (while (and (not ali-file-name) (string-match "^\\(.*\\)[.-][^.-]*" parent-name)) - + (set 'parent-name (match-string 1 parent-name)) (set 'ali-file-name (ada-find-ali-file-in-dir (concat parent-name ".ali"))) ) ali-file-name))) - + ;; If still not found, try to recompile the file (if (not ali-file-name) ;; recompile only if the user asked for this. and search the ali ;; filename again. We avoid a possible infinite recursion by ;; temporarily disabling the automatic compilation. - + (if ada-xref-create-ali (setq ali-file-name (concat (file-name-sans-extension (ada-xref-current file)) ".ali")) (error "Ali file not found. Recompile your file")) - - + + ;; same if the .ali file is too old and we must recompile it (if (and (file-newer-than-file-p file ali-file-name) ada-xref-create-ali) @@ -1657,7 +1657,7 @@ file for possible paths." (set-buffer buffer) (find-file original-file) (ada-require-project-file))) - + ;; we choose the first possible completion and we ;; return the absolute file name (let ((filename (ada-find-src-file-in-dir file))) @@ -1687,7 +1687,7 @@ macros `ada-name-of', `ada-line-of', `ada-column-of', `ada-file-of',..." ;; If at end of buffer (e.g the buffer is empty), error (if (>= (point) (point-max)) (error "No identifier on point")) - + ;; goto first character of the identifier/operator (skip backward < and > ;; since they are part of multiple character operators (goto-char pos) @@ -1724,7 +1724,7 @@ macros `ada-name-of', `ada-line-of', `ada-column-of', `ada-file-of',..." (if (looking-at "[a-zA-Z0-9_]+") (set 'identifier (match-string 0)) (error "No identifier around"))) - + ;; Build the identlist (set 'identlist (ada-make-identlist)) (ada-set-name identlist (downcase identifier)) @@ -1739,7 +1739,7 @@ macros `ada-name-of', `ada-line-of', `ada-column-of', `ada-file-of',..." (defun ada-get-all-references (identlist) "Completes and returns IDENTLIST with the information extracted from the ali file (definition file and places where it is referenced)." - + (let ((ali-buffer (ada-get-ali-buffer (ada-file-of identlist))) declaration-found) (set-buffer ali-buffer) @@ -1749,7 +1749,7 @@ from the ali file (definition file and places where it is referenced)." ;; First attempt: we might already be on the declaration of the identifier ;; We want to look for the declaration only in a definite interval (after ;; the "^X ..." line for the current file, and before the next "^X" line - + (if (re-search-forward (concat "^X [0-9]+ " (file-name-nondirectory (ada-file-of identlist))) nil t) @@ -1768,7 +1768,7 @@ from the ali file (definition file and places where it is referenced)." ;; have to fall back on other algorithms (unless declaration-found - + ;; Since we alread know the number of the file, search for a direct ;; reference to it (goto-char (point-min)) @@ -1796,7 +1796,7 @@ from the ali file (definition file and places where it is referenced)." "[^0-9]" (ada-column-of identlist) "\\>") nil t) - + ;; If still not found, then either the declaration is unknown ;; or the source file has been modified since the ali file was ;; created @@ -1831,7 +1831,7 @@ from the ali file (definition file and places where it is referenced)." ))) ) - + ;; Now that we have found a suitable line in the .ali file, get the ;; information available (beginning-of-line) @@ -1854,13 +1854,13 @@ from the ali file (definition file and places where it is referenced)." identlist (ada-get-ada-file-name (match-string 1) (ada-file-of identlist))) - + ;; Else clean up the ali file (error (kill-buffer ali-buffer) (error (error-message-string err))) )) - + (ada-set-references identlist current-line) )) )) @@ -1913,16 +1913,16 @@ This function is disabled for operators, and only works for identifiers." (error (concat "No declaration of " (ada-name-of identlist) " recorded in .ali file"))) - + ;; one => should be the right one ((= len 1) (goto-line (caar declist))) - + ;; more than one => display choice list (t (save-window-excursion (with-output-to-temp-buffer "*choice list*" - + (princ "Identifier is overloaded and Xref information is not up to date.\n") (princ "Possible declarations are:\n\n") (princ " no. in file at line col\n") @@ -1994,7 +1994,7 @@ opens a new window to show the declaration." ) ;; Else get the nearest file (set 'file (ada-declare-file-of identlist))) - + (set 'locations (append locations (list (list line col file))))) ;; Add the specs at the end again, so that from the last body we go to @@ -2007,7 +2007,7 @@ opens a new window to show the declaration." (setq line (caar locations) col (nth 1 (car locations)) file (nth 2 (car locations))) - + (while locations (if (and (string= (caar locations) (ada-line-of identlist)) (string= (nth 1 (car locations)) (ada-column-of identlist)) @@ -2046,27 +2046,27 @@ This command requires the external `egrep' program to be available. This works well when one is using an external librarie and wants to find the declaration and documentation of the subprograms one is is using." - + (let (list (dirs (ada-xref-get-obj-dir-field)) (regexp (concat "[ *]" (ada-name-of identlist))) line column choice file) - + (save-excursion - + ;; Do the grep in all the directories. We do multiple shell ;; commands instead of one in case there is no .ali file in one ;; of the directory and the shell stops because of that. - + (set-buffer (get-buffer-create "*grep*")) (while dirs (insert (shell-command-to-string (concat "egrep -i -h '^X|" regexp "( |$)' " (file-name-as-directory (car dirs)) "*.ali"))) (set 'dirs (cdr dirs))) - + ;; Now parse the output (set 'case-fold-search t) (goto-char (point-min)) @@ -2080,23 +2080,23 @@ is using." column (match-string 2)) (re-search-backward "^X [0-9]+ \\(.*\\)$") (set 'file (list (match-string 1) line column)) - + ;; There could be duplicate choices, because of the structure ;; of the .ali files (unless (member file list) (set 'list (append list (list file)))))))) - + ;; Current buffer is still "*grep*" (kill-buffer "*grep*") ) - + ;; Now display the list of possible matches (cond - + ;; No choice found => Error ((null list) (error "No cross-reference found, please recompile your file")) - + ;; Only one choice => Do the cross-reference ((= (length list) 1) (set 'file (ada-find-src-file-in-dir (caar list))) @@ -2109,12 +2109,12 @@ is using." (error (concat (caar list) " not found in src_dir"))) (message "This is only a (good) guess at the cross-reference.") ) - + ;; Else, ask the user (t (save-window-excursion (with-output-to-temp-buffer "*choice list*" - + (princ "Identifier is overloaded and Xref information is not up to date.\n") (princ "Possible declarations are:\n\n") (princ " no. in file at line col\n") @@ -2315,7 +2315,7 @@ This function typically is to be hooked into `ff-file-created-hooks'." (progn (set-buffer-modified-p nil) (kill-buffer (current-buffer)))) - + ;; Make sure the current buffer is the spec (this might not be the case ;; if for instance the user was asked for a project file) diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 1d1fbfab252..1bdc86260a5 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -88,7 +88,7 @@ (eval-when-compile (require 'cl) (defmacro cond-emacs-xemacs (&rest args) - (cond-emacs-xemacs-macfn + (cond-emacs-xemacs-macfn args "`cond-emacs-xemacs' must return exactly one element")) (defun cond-emacs-xemacs-macfn (args &optional msg) (if (atom args) args @@ -1627,7 +1627,7 @@ Use prefix argument ARG to return \(LEVEL OPTION LOCATION)." :active active)) (sort (mapcar 'car (elt antlr-options-alists (1- level))) 'string-lessp)))) - + ;;;=========================================================================== ;;; Insert option: determine section-kind @@ -1904,7 +1904,7 @@ For OLD, see `antlr-insert-option-do'." ;; stuff (no =, {, } or /) at point is not followed by ";" (insert ";") (backward-char))) - + (defun antlr-insert-option-space (area old) "Find appropriate place to insert option, insert newlines/spaces. For AREA and OLD, see `antlr-insert-option-do'." @@ -1924,7 +1924,7 @@ For AREA and OLD, see `antlr-insert-option-do'." (setq orig (point)) (goto-char orig))) (skip-chars-forward " \t") - + (if (looking-at "$\\|//") ;; just comment after point => skip (+ lines w/ same col comment) (let ((same (if (> (match-end 0) (match-beginning 0)) diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el index b23b7657996..97cac196aa8 100644 --- a/lisp/progmodes/cc-cmds.el +++ b/lisp/progmodes/cc-cmds.el @@ -1811,7 +1811,7 @@ stops at them when going backward, but not when going forward." (interactive "p") (c-forward-conditional (- count) -1) (c-keep-region-active)) - + (defun c-up-conditional-with-else (count) "Move back to the containing preprocessor conditional, including `#else'. Just like `c-up-conditional', except it also stops at `#else' diff --git a/lisp/progmodes/cc-compat.el b/lisp/progmodes/cc-compat.el index 967c1165c18..c0b167faaba 100644 --- a/lisp/progmodes/cc-compat.el +++ b/lisp/progmodes/cc-compat.el @@ -106,7 +106,7 @@ This is in addition to c-continued-statement-offset.") (if (eq (char-before) ?{) (forward-char -1) (goto-char (cdr langelem))) - (let* ((curcol (save-excursion + (let* ((curcol (save-excursion (goto-char (cdr langelem)) (current-column))) (bocm-lossage @@ -138,7 +138,7 @@ This is in addition to c-continued-statement-offset.") (defun cc-block-close-offset (langelem) (save-excursion (let* ((here (point)) - bracep + bracep (curcol (progn (goto-char (cdr langelem)) (current-column))) @@ -154,7 +154,7 @@ This is in addition to c-continued-statement-offset.") (current-column)))) (- bocm-lossage curcol (if bracep 0 c-indent-level))))) - + (defun cc-substatement-open-offset (langelem) (+ c-continued-statement-offset c-continued-brace-offset)) diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 0e6ba8f4191..25f31a0ec8c 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -79,7 +79,7 @@ ;; Returns the value of certain commonly referenced POSITIONs ;; relative to POINT. The current point is used if POINT isn't ;; specified. POSITION can be one of the following symbols: - ;; + ;; ;; bol -- beginning of line ;; eol -- end of line ;; bod -- beginning of defun @@ -91,7 +91,7 @@ ;; eonl -- end of next line ;; bopl -- beginning of previous line ;; eopl -- end of previous line - ;; + ;; ;; If the referenced position doesn't exist, the closest accessible ;; point to it is returned. This function does not modify point or ;; mark. diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index 3a630567a48..fe33b2f755d 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el @@ -125,7 +125,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") "[ \t]*([^)]*)[ \t]*)[ \t]*[^ \t;]" ; see above ) 1))) ;; Class definitions - ("Class" + ("Class" ,(concat "^" ; beginning of line is required "\\(template[ \t]*<[^>]+>[ \t]*\\)?" ; there may be a `template <...>' @@ -137,7 +137,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") "\\([ \t\n]\\|\\\\\n\\)*[:{]" ) 3)) "Imenu generic expression for C++ mode. See `imenu-generic-expression'.") - + (defvar cc-imenu-c-generic-expression cc-imenu-c++-generic-expression "Imenu generic expression for C mode. See `imenu-generic-expression'.") @@ -155,11 +155,11 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") "[][a-zA-Z,_1-9\n \t]*" ; arguments ")[ \t]*" ; "[^;(]" - "[,a-zA-Z_1-9\n \t]*{" + "[,a-zA-Z_1-9\n \t]*{" ) 6)) "Imenu generic expression for Java mode. See `imenu-generic-expression'.") -;; *Warning for cc-mode developers* +;; *Warning for cc-mode developers* ;; ;; `cc-imenu-objc-generic-expression' elements depend on ;; `cc-imenu-c++-generic-expression'. So if you change this @@ -169,8 +169,8 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") ;; order to know where the each regexp *group \\(foobar\\)* elements ;; are started. ;; -;; *-index variables are initialized during `cc-imenu-objc-generic-expression' -;; being initialized. +;; *-index variables are initialized during `cc-imenu-objc-generic-expression' +;; being initialized. ;; ;; Internal variables @@ -179,10 +179,10 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") (defvar cc-imenu-objc-generic-expression-proto-index nil) (defvar cc-imenu-objc-generic-expression-objc-base-index nil) -(defvar cc-imenu-objc-generic-expression - (concat +(defvar cc-imenu-objc-generic-expression + (concat ;; - ;; For C + ;; For C ;; ;; > Special case to match a line like `main() {}' ;; > e.g. no return type, not even on the previous line. @@ -198,7 +198,7 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") ;; > `int main _PROTO( (int argc,char *argv[]) )'. ;; Pick a token by (match-string 5) (if cc-imenu-c-prototype-macro-regexp - (concat + (concat "\\|" (car (cdr (nth 3 cc-imenu-c++-generic-expression))) ; -> index += 1 (prog2 (setq cc-imenu-objc-generic-expression-objc-base-index 6) "") @@ -210,20 +210,20 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") ;; For Objective-C ;; Pick a token by (match-string 5 or 6) ;; - "\\|\\(" + "\\|\\(" "^[-+][:a-zA-Z0-9()*_<>\n\t ]*[;{]" ; Methods - "\\|" - "^@interface[\t ]+[a-zA-Z0-9_]+[\t ]*:" - "\\|" + "\\|" + "^@interface[\t ]+[a-zA-Z0-9_]+[\t ]*:" + "\\|" "^@interface[\t ]+[a-zA-Z0-9_]+[\t ]*([a-zA-Z0-9_]+)" - "\\|" + "\\|" ;; For NSObject, NSProxy and Object... They don't have super class. "^@interface[\t ]+[a-zA-Z0-9_]+[\t ]*.*$" - "\\|" + "\\|" "^@implementation[\t ]+[a-zA-Z0-9_]+[\t ]*([a-zA-Z0-9_]+)" - "\\|" + "\\|" "^@implementation[\t ]+[a-zA-Z0-9_]+" - "\\|" + "\\|" "^@protocol[\t ]+[a-zA-Z0-9_]+" "\\)") "Imenu generic expression for ObjC mode. See `imenu-generic-expression'.") @@ -231,13 +231,13 @@ A sample value might look like: `\\(_P\\|_PROTO\\)'.") ;; Imenu support for objective-c uses functions. (defsubst cc-imenu-objc-method-to-selector (method) "Return the objc selector style string of METHOD. -Example: +Example: - perform: (SEL)aSelector withObject: object1 withObject: object2; /* METHOD */ => -perform:withObject:withObject:withObject: /* selector */" (let ((return "") ; String to be returned - (p 0) ; Current scanning position in METHOD - (pmax (length method)) ; + (p 0) ; Current scanning position in METHOD + (pmax (length method)) ; char ; Current scanning target (betweenparen 0) ; CHAR is in parentheses. argreq ; An argument is required. @@ -253,17 +253,17 @@ Example: (and (<= ?A char) (<= char ?Z)) (and (<= ?0 char) (<= char ?9)) (= ?_ char))) - (if argreq + (if argreq (setq inargvar t argreq nil) (setq return (concat return (char-to-string char))))) ;; Or a white space? - ((and inargvar (or (eq ?\ char) (eq ?\n char)) + ((and inargvar (or (eq ?\ char) (eq ?\n char)) (setq inargvar nil))) ;; Or a method separator? ;; If a method separator, the next token will be an argument variable. - ((eq ?: char) - (setq argreq t + ((eq ?: char) + (setq argreq t return (concat return (char-to-string char)))) ;; Or an open parentheses? ((eq ?\( char) @@ -277,7 +277,7 @@ Example: "Remove all spaces and tabs from STR." (let ((return "") (p 0) - (max (length str)) + (max (length str)) char) (while (< p max) (setq char (aref str p)) @@ -294,7 +294,7 @@ Example: ;; ;; OBJC, Cnoreturn, Cgeneralfunc, Cproto are constants. ;; - ;; *Warning for developers* + ;; *Warning for developers* ;; These constants depend on `cc-imenu-c++-generic-expression'. ;; (OBJC cc-imenu-objc-generic-expression-objc-base-index) @@ -310,13 +310,13 @@ Example: toplist stupid str - str2 + str2 (intflen (length "@interface")) (implen (length "@implementation")) (prtlen (length "@protocol")) (func ;; - ;; Does this emacs has buffer-substring-no-properties? + ;; Does this emacs has buffer-substring-no-properties? ;; (if (fboundp 'buffer-substring-no-properties) 'buffer-substring-no-properties @@ -326,7 +326,7 @@ Example: ;; (while (re-search-backward cc-imenu-objc-generic-expression nil t) (imenu-progress-message stupid) - (setq langnum (if (match-beginning OBJC) + (setq langnum (if (match-beginning OBJC) OBJC (cond ((match-beginning Cproto) Cproto) @@ -334,7 +334,7 @@ Example: ((match-beginning Cnoreturn) Cnoreturn)))) (setq str (funcall func (match-beginning langnum) (match-end langnum))) ;; - (cond + (cond ;; ;; C ;; @@ -342,7 +342,7 @@ Example: (setq clist (cons (cons str (match-beginning langnum)) clist))) ;; ;; ObjC - ;; + ;; ;; An instance Method ((eq (aref str 0) ?-) (setq str (concat "-" (cc-imenu-objc-method-to-selector str))) @@ -355,10 +355,10 @@ Example: (setq methodlist (cons (cons str (match-beginning langnum)) methodlist))) - ;; Interface or implementation or protocol + ;; Interface or implementation or protocol ((eq (aref str 0) ?@) (setq classcount (1+ classcount)) - (cond + (cond ((and (> (length str) implen) (string= (substring str 0 implen) "@implementation")) (setq str (substring str implen) @@ -376,7 +376,7 @@ Example: (setq toplist (cons nil (cons (cons str methodlist) toplist)) methodlist nil)))) - ;; + ;; (imenu-progress-message stupid 100) (if (eq (car toplist) nil) (setq toplist (cdr toplist))) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 3e363220058..a7c17720126 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -511,8 +511,8 @@ One should tune up `cperl-close-paren-offset' as well." :type 'boolean :group 'cperl-indentation-details) -(defcustom cperl-syntaxify-by-font-lock - (and window-system +(defcustom cperl-syntaxify-by-font-lock + (and window-system (boundp 'parse-sexp-lookup-properties)) "*Non-nil means that CPerl uses `font-lock's routines for syntaxification." :type '(choice (const message) boolean) @@ -620,7 +620,7 @@ want it to: put the following into your .emacs file: (defalias 'perl-mode 'cperl-mode) -Get perl5-info from +Get perl5-info from $CPAN/doc/manual/info/perl-info.tar.gz older version was on http://www.metronet.com:70/9/perlinfo/perl5/manual/perl5-info.tar.gz @@ -840,7 +840,7 @@ B) Speed of editing operations. syntaxically to be not code `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of 2-arg operators s/y/tr/ or of RExen, - `font-lock-function-name-face' Special-cased m// and s//foo/, _ as + `font-lock-function-name-face' Special-cased m// and s//foo/, _ as a target of a file tests, file tests, subroutine names at the moment of definition (except those conflicting with Perl operators), @@ -1910,7 +1910,7 @@ to nil." head1 notlast name p really-delete over) (and (save-excursion (forward-word -1) - (and + (and (eq (preceding-char) ?=) (progn (setq head1 (looking-at "head1\\>[ \t]*$")) @@ -1922,8 +1922,8 @@ to nil." (get-text-property (point) 'in-pod) (cperl-after-expr-p nil "{;:") (and (re-search-backward - ;; "\\(\\`\n?\\|\n\n\\)=\\sw+" - "\\(\\`\n?\\|^\n\\)=\\sw+" + ;; "\\(\\`\n?\\|\n\n\\)=\\sw+" + "\\(\\`\n?\\|^\n\\)=\\sw+" (point-min) t) (not (or (looking-at "=cut") @@ -1938,13 +1938,13 @@ to nil." (insert "\n\n=cut") (cperl-ensure-newlines 2) (forward-word -2) - (if (and head1 - (not + (if (and head1 + (not (save-excursion (forward-char -1) (re-search-backward "\\(\\`\n?\\|\n\n\\)=head1\\>" nil t)))) ; Only one - (progn + (progn (forward-word 1) (setq name (file-name-sans-extension (file-name-nondirectory (buffer-file-name))) @@ -2466,7 +2466,7 @@ and closing parentheses and brackets." (list pre-indent-point))) 0) cperl-continued-statement-offset)))) - ((not + ((not (or (setq is-block (and (setq delim (= (char-after containing-sexp) ?{)) (save-excursion ; Is it a hash? @@ -2517,7 +2517,7 @@ and closing parentheses and brackets." ;;; (skip-chars-forward " \t")) ;;; (+ (current-column) ; Correct indentation of trailing ?\} ;;; (if (eq char-after ?\}) (+ cperl-indent-level -;;; cperl-close-paren-offset) +;;; cperl-close-paren-offset) ;;; 0))) (t ;; Statement level. Is it a continuation or a new statement? @@ -2544,7 +2544,7 @@ and closing parentheses and brackets." (memq (preceding-char) (append (if is-block " ;{" " ,;{") '(nil))) (and (eq (preceding-char) ?\}) - (cperl-after-block-and-statement-beg + (cperl-after-block-and-statement-beg containing-sexp)))) ;; This line is continuation of preceding line's statement; ;; indent `cperl-continued-statement-offset' more than the @@ -2557,7 +2557,7 @@ and closing parentheses and brackets." (+ (if (memq char-after (append "}])" nil)) 0 ; Closing parenth cperl-continued-statement-offset) - (if (or is-block + (if (or is-block (not delim) (not (eq char-after ?\}))) 0 @@ -2618,7 +2618,7 @@ and closing parentheses and brackets." (+ (if (and (bolp) (zerop cperl-indent-level)) (+ cperl-brace-offset cperl-continued-statement-offset) cperl-indent-level) - (if (or is-block + (if (or is-block (not delim) (not (eq char-after ?\}))) 0 @@ -3097,7 +3097,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (or max (setq max (point-max))) (let* (face head-face here-face b e bb tag qtag b1 e1 argument i c tail tb is-REx is-x-REx REx-comment-start REx-comment-end was-comment i2 - (cperl-pod-here-fontify (eval cperl-pod-here-fontify)) go tmpend + (cperl-pod-here-fontify (eval cperl-pod-here-fontify)) go tmpend (case-fold-search nil) (inhibit-read-only t) (buffer-undo-list t) (modified (buffer-modified-p)) (after-change-functions nil) @@ -3121,11 +3121,11 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (if (boundp 'font-lock-function-name-face) font-lock-function-name-face 'font-lock-function-name-face)) - (font-lock-comment-face + (font-lock-comment-face (if (boundp 'font-lock-comment-face) font-lock-comment-face 'font-lock-comment-face)) - (cperl-nonoverridable-face + (cperl-nonoverridable-face (if (boundp 'cperl-nonoverridable-face) cperl-nonoverridable-face 'cperl-nonoverridable-face)) @@ -3134,7 +3134,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', max)) (search (concat - "\\(\\`\n?\\|^\n\\)=" + "\\(\\`\n?\\|^\n\\)=" "\\|" ;; One extra () before this: "<<" @@ -3208,7 +3208,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (setq tmpend nil) ; Valid for most cases (cond ((match-beginning 1) ; POD section - ;; "\\(\\`\n?\\|^\n\\)=" + ;; "\\(\\`\n?\\|^\n\\)=" (if (looking-at "cut\\>") (if ignore-max nil ; Doing a chunk only @@ -3234,7 +3234,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (setq e (point)) (and (> e max) (progn - (remove-text-properties + (remove-text-properties max e '(syntax-type t in-pod t syntax-table t cperl-postpone t syntax-subtype t @@ -3250,22 +3250,22 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (put-text-property (cperl-1- b) (point) 'syntax-type 'pod) (cperl-put-do-not-fontify b (point) t) ;; mark the non-literal parts as PODs - (if cperl-pod-here-fontify + (if cperl-pod-here-fontify (cperl-postpone-fontification b (point) 'face face t)) (re-search-forward "\n\n[^ \t\f\n]" e 'toend) (beginning-of-line) (setq b (point))) (put-text-property (cperl-1- (point)) e 'syntax-type 'pod) (cperl-put-do-not-fontify (point) e t) - (if cperl-pod-here-fontify - (progn + (if cperl-pod-here-fontify + (progn ;; mark the non-literal parts as PODs (cperl-postpone-fontification (point) e 'face face t) (goto-char bb) - (if (looking-at + (if (looking-at "=[a-zA-Z0-9_]+\\>[ \t]*\\(\\(\n?[^\n]\\)+\\)$") ;; mark the headers - (cperl-postpone-fontification + (cperl-postpone-fontification (match-beginning 1) (match-end 1) 'face head-face)) (while (re-search-forward @@ -3273,7 +3273,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', "^\n=[a-zA-Z0-9_]+\\>[ \t]*\\(\\(\n?[^\n]\\)+\\)$" e 'toend) ;; mark the headers - (cperl-postpone-fontification + (cperl-postpone-fontification (match-beginning 1) (match-end 1) 'face head-face)))) (cperl-commentify bb e nil) @@ -3558,15 +3558,15 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (progn (forward-word 1) ; skip modifiers s///s (if tail (cperl-commentify tail (point) t)) - (cperl-postpone-fontification + (cperl-postpone-fontification e1 (point) 'face 'cperl-nonoverridable-face))) ;; Check whether it is m// which means "previous match" ;; and highlight differently - (setq is-REx + (setq is-REx (and (string-match "^\\([sm]?\\|qr\\)$" argument) (or (not (= (length argument) 0)) (not (eq c ?\<))))) - (if (and is-REx + (if (and is-REx (eq e (+ 2 b)) ;; split // *is* using zero-pattern (save-excursion @@ -3616,7 +3616,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (progn (setq was-comment nil) (forward-char 1)) (if (match-beginning 2) - (progn + (progn (beginning-of-line 2) (if (> (point) e) (goto-char (1- e)))) @@ -3632,11 +3632,11 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (setq REx-comment-end (point)) (cperl-commentify REx-comment-start REx-comment-end nil) - (cperl-postpone-fontification + (cperl-postpone-fontification REx-comment-start REx-comment-end 'face font-lock-comment-face)))))) (if (and is-REx is-x-REx) - (put-text-property (1+ b) (1- e) + (put-text-property (1+ b) (1- e) 'syntax-subtype 'x-REx))) (if i2 (progn @@ -3708,7 +3708,7 @@ the sections using `cperl-pod-head-face', `cperl-pod-face', (goto-char b) (skip-chars-backward "\\\\") ;;;(setq i2 (= (% (skip-chars-backward "\\\\") 2) -1)) - (setq state (parse-partial-sexp + (setq state (parse-partial-sexp state-point b nil nil state) state-point b) (if (or (nth 3 state) (nth 4 state) ) @@ -3919,7 +3919,7 @@ Returns some position at the last line." (beginning-of-line))) ;; Looking at: ;; foreach my $var - (if (looking-at + (if (looking-at "[ \t]*\\<for\\(each\\)?[ \t]+\\(my\\|local\\|our\\)\\(\t*\\|[ \t][ \t]+\\)[^ \t\n]") (progn (forward-word 2) @@ -3928,7 +3928,7 @@ Returns some position at the last line." (beginning-of-line))) ;; Looking at: ;; foreach my $var ( - (if (looking-at + (if (looking-at "[ \t]*\\<for\\(each\\)?[ \t]+\\(my\\|local\\|our\\)[ \t]*\\$[_a-zA-Z0-9]+\\(\t*\\|[ \t][ \t]+\\)[^ \t\n#]") (progn (forward-word 3) @@ -3938,7 +3938,7 @@ Returns some position at the last line." (beginning-of-line))) ;; Looking at: ;; } foreach my $var () { - (if (looking-at + (if (looking-at "[ \t]*\\(}[ \t]*\\)?\\<\\(\\els\\(e\\|if\\)\\|continue\\|if\\|unless\\|while\\|for\\(each\\)?\\(\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\$[_a-zA-Z0-9]+\\)?\\|until\\)\\>\\([ \t]*(\\|[ \t\n]*{\\)\\|[ \t]*{") (progn (setq ml (match-beginning 8)) @@ -4332,7 +4332,7 @@ indentation and initial hashes. Behaves usually outside of comment." marker (make-marker)) (set-text-properties 0 (length name) nil name) (set-marker marker (match-end 3)) - (if (eq fchar ?p) + (if (eq fchar ?p) (setq name (concat "package " name)) (cond ((string-match "[:']" name) (setq meth t)) @@ -4340,7 +4340,7 @@ indentation and initial hashes. Behaves usually outside of comment." (t (setq name (concat package name) meth t)))) (setq index (cons name marker)) - (if (eq fchar ?p) + (if (eq fchar ?p) (push index index-pack-alist) (push index index-alist)) (if meth (push index index-meth-alist)) @@ -4429,7 +4429,7 @@ indentation and initial hashes. Behaves usually outside of comment." (t 3))) ; should not happen -(defvar cperl-compilation-error-regexp-alist +(defvar cperl-compilation-error-regexp-alist ;; This look like a paranoiac regexp: could anybody find a better one? (which WORK). '(("^[^\n]* \\(file\\|at\\) \\([^ \t\n]+\\) [^\n]*line \\([0-9]+\\)[\\., \n]" 2 3)) @@ -4658,7 +4658,7 @@ indentation and initial hashes. Behaves usually outside of comment." 3 font-lock-variable-name-face))) '("\\<for\\(each\\)?\\([ \t]+\\(my\\|local\\|our\\)\\)?[ \t]*\\(\\$[a-zA-Z_][a-zA-Z_0-9]*\\)[ \t]*(" 4 font-lock-variable-name-face))) - (setq + (setq t-font-lock-keywords-1 (and (fboundp 'turn-on-font-lock) ; Check for newer font-lock (not cperl-xemacs-p) ; not yet as of XEmacs 19.12 @@ -4689,7 +4689,7 @@ indentation and initial hashes. Behaves usually outside of comment." (append t-font-lock-keywords-1 (list '("[$*]{?\\(\\sw+\\)" 1 font-lock-variable-name-face))))) - (setq cperl-font-lock-keywords-1 + (setq cperl-font-lock-keywords-1 (if cperl-syntaxify-by-font-lock (cons 'cperl-fontify-update t-font-lock-keywords) @@ -5504,7 +5504,7 @@ See `cperl-lazy-help-time' too." (format "File %s unreadable. Continue? " ifile)) (setq cperl-unreadable-ok t) (error "Aborting: unreadable file %s" ifile))))) - (if (not file) + (if (not file) (message "Unreadable file %s" ifile) (message "Scanning file %s ..." file) (if (and cperl-use-syntax-table-text-property-for-tags @@ -5614,16 +5614,16 @@ Use as (erase (erase-buffer) (setq erase 'ignore))) - (let ((files + (let ((files (condition-case err - (directory-files file t + (directory-files file t (if recurse nil cperl-scan-files-regexp) t) (error (if cperl-unreadable-ok nil (if (y-or-n-p (format "Directory %s unreadable. Continue? " file)) - (setq cperl-unreadable-ok t + (setq cperl-unreadable-ok t tm nil) ; Return empty list (error "Aborting: unreadable directory %s" file))))))) (mapcar (function (lambda (file) @@ -6681,7 +6681,7 @@ prototype \&SUB Returns prototype of the function given a reference. (set-marker m1 (point)) (if (= level 1) (if (progn ; indent rigidly if multiline - ;; In fact does not make a lot of sense, since + ;; In fact does not make a lot of sense, since ;; the starting position can be already lost due ;; to insertion of "\n" and " " (goto-char tmp) @@ -6831,7 +6831,7 @@ We suppose that the regexp is scanned already." (set-marker e (1- (point))) (goto-char b) (while (re-search-forward "\\(#\\)\\|\n" e 'to-end) - (cond + (cond ((match-beginning 1) ; #-comment (or c (setq c (current-indentation))) (beginning-of-line 2) ; Skip @@ -6858,7 +6858,7 @@ We suppose that the regexp is scanned already." (set-marker e (1- (point))) (goto-char (1+ b)) (while (re-search-forward "\\(\\\\\\\\\\)\\|(" e t) - (cond + (cond ((match-beginning 1) ; Skip nil) (t ; Group @@ -7091,7 +7091,7 @@ We suppose that the regexp is scanned already." (defun cperl-fontify-syntaxically (end) ;; Some vars for debugging only ;; (message "Syntaxifying...") - (let (start (dbg (point)) (iend end) + (let (start (dbg (point)) (iend end) (istate (car cperl-syntax-state))) (and cperl-syntaxify-unwind (setq end (cperl-unwind-to-safe t end))) diff --git a/lisp/progmodes/cpp.el b/lisp/progmodes/cpp.el index 6e4c8d1f457..310c789bb13 100644 --- a/lisp/progmodes/cpp.el +++ b/lisp/progmodes/cpp.el @@ -32,7 +32,7 @@ ;;; Todo: ;; Should parse "#if" and "#elif" expressions and merge the faces -;; somehow. +;; somehow. ;; Somehow it is sometimes possible to make changes near a read only ;; area which you can't undo. Their are other strange effects in that @@ -67,7 +67,7 @@ :type 'face :group 'cpp) -(defcustom cpp-face-type 'light +(defcustom cpp-face-type 'light "*Indicate what background face type you prefer. Can be either light or dark for color screens, mono for monochrome screens, and none if you don't use a window system and don't have @@ -368,7 +368,7 @@ A prefix arg suppresses display of that buffer." (cond ((eq cpp-unknown-face 'invisible) (cpp-make-overlay-hidden overlay)) ((eq cpp-unknown-face 'default)) - (t + (t (overlay-put overlay 'face cpp-unknown-face))) (if cpp-unknown-writable () @@ -461,7 +461,7 @@ A prefix arg suppresses display of that buffer." (defun cpp-edit-mode () "Major mode for editing the criteria for highlighting cpp conditionals. -Click on objects to change them. +Click on objects to change them. You can also use the keyboard accelerators indicated like this: [K]ey." (kill-all-local-variables) (buffer-disable-undo) @@ -535,7 +535,7 @@ You can also use the keyboard accelerators indicated like this: [K]ey." (eq write 'both)) (setq cpp-edit-list (delq entry cpp-edit-list) entry nil)) - + (if (> (length symbol) 39) (insert (substring symbol 0 39) ": ") (insert (format "%39s: " symbol))) @@ -649,7 +649,7 @@ With optional argument ARG, make them writable iff ARG is positive." (interactive (let ((symbol (cpp-choose-symbol))) (list symbol - (cpp-choose-face "False face" + (cpp-choose-face "False face" (nth 2 (assoc symbol cpp-edit-list)))))) (setcar (nthcdr 2 (cpp-edit-list-entry-get-or-create symbol)) face) (cpp-edit-reset)) diff --git a/lisp/progmodes/dcl-mode.el b/lisp/progmodes/dcl-mode.el index 6f39a4840ff..b975b089360 100644 --- a/lisp/progmodes/dcl-mode.el +++ b/lisp/progmodes/dcl-mode.el @@ -31,10 +31,10 @@ ;; ;; Type `C-h m' when you are editing a .COM file to get more ;; information about this mode. -;; +;; ;; To use templates you will need a version of tempo.el that is at ;; least later than the buggy 1.1.1, which was included with my versions of -;; Emacs. I used version 1.2.4. +;; Emacs. I used version 1.2.4. ;; The latest tempo.el distribution can be fetched from ;; ftp.lysator.liu.se in the directory /pub/emacs. ;; I recommend setting (setq tempo-interactive t). This will make @@ -47,8 +47,8 @@ ;; ;; Any feedback will be welcomed. If you write functions for ;; dcl-calc-command-indent-function or dcl-calc-cont-indent-function, -;; please send them to the maintainer. -;; +;; please send them to the maintainer. +;; ;; ;; Ideas for improvement: ;; * Change meaning of `left margin' when dcl-tab-always-indent is nil. @@ -98,7 +98,7 @@ dcl-calc-cont-indent-function is set to a function." (defcustom dcl-margin-offset 8 "*Indentation for the first command line in DCL. -The first command line in a file or after a SUBROUTINE statement is indented +The first command line in a file or after a SUBROUTINE statement is indented this much. Other command lines are indented the same number of columns as the preceding command line. A command line is a line that starts with `$'." @@ -137,11 +137,11 @@ Set to nil to only indent at THEN-ELSE-ENDIF." (defcustom dcl-calc-command-indent-function nil "*Function to calculate indentation for a command line in DCL. -If this variable is non-nil it is called as a function: +If this variable is non-nil it is called as a function: \(func INDENT-TYPE CUR-INDENT EXTRA-INDENT LAST-POINT THIS-POINT) -The function must return the number of columns to indent the current line or +The function must return the number of columns to indent the current line or nil to get the default indentation. INDENT-TYPE is a symbol indicating what kind of indentation should be done. @@ -150,14 +150,14 @@ It can have the following values: outdent the lines indentation should be decreased, e.g a line with ENDIF. first-line indentation for the first line in a buffer or SUBROUTINE. CUR-INDENT is the indentation of the preceding command line. -EXTRA-INDENT is the default change in indentation for this line +EXTRA-INDENT is the default change in indentation for this line \(a negative number for 'outdent). LAST-POINT is the buffer position of the first significant word on the previous line or nil if the current line is the first line. THIS-POINT is the buffer position of the first significant word on the current line. -If this variable is nil, the indentation is calculated as +If this variable is nil, the indentation is calculated as CUR-INDENT + EXTRA-INDENT. This package includes two functions suitable for this: @@ -169,14 +169,14 @@ This package includes two functions suitable for this: (defcustom dcl-calc-cont-indent-function 'dcl-calc-cont-indent-relative "*Function to calculate indentation for a continuation line. -If this variable is non-nil it is called as a function: +If this variable is non-nil it is called as a function: \(func CUR-INDENT EXTRA-INDENT) -The function must return the number of columns to indent the current line or +The function must return the number of columns to indent the current line or nil to get the default indentation. -If this variable is nil, the indentation is calculated as +If this variable is nil, the indentation is calculated as CUR-INDENT + EXTRA-INDENT. This package includes one function suitable for this: @@ -189,7 +189,7 @@ This package includes one function suitable for this: "*Controls the operation of the TAB key in DCL mode. If t, pressing TAB always indents the current line. If nil, pressing TAB indents the current line if point is at the left margin. -Data lines (i.e. lines not part of a command line or continuation line) are +Data lines (i.e. lines not part of a command line or continuation line) are never indented." :type 'boolean :group 'dcl) @@ -246,7 +246,7 @@ never indented." "*Default imenu generic expression for DCL. The default includes SUBROUTINE labels in the main listing and -sub-listings for other labels, CALL, GOTO and GOSUB statements. +sub-listings for other labels, CALL, GOTO and GOSUB statements. See `imenu-generic-expression' for details." :type '(repeat (sexp :tag "Imenu Expression")) :group 'dcl) @@ -270,7 +270,7 @@ See `imenu-generic-expression' for details." (modify-syntax-entry ?\n ">" dcl-mode-syntax-table) ; comment end (modify-syntax-entry ?< "(>" dcl-mode-syntax-table) ; < and ... (modify-syntax-entry ?> ")<" dcl-mode-syntax-table) ; > is a matching pair -) +) (defvar dcl-mode-map () @@ -357,7 +357,7 @@ A label is a name followed by a colon followed by white-space or end-of-line." :group 'dcl) -(defcustom dcl-cmd-r +(defcustom dcl-cmd-r "^\\$\\(.*-[ \t]*\\(!.*\\)*\n\\)*[^!\"\n]*\\(\".*\\(\"\".*\\)*\"\\)*[^!\"\n]*" "Regular expression describing a DCL command line up to a trailing comment. A line starting with $, optionally followed by continuation lines, @@ -368,7 +368,7 @@ optionally followed by a comment, followed by a newline." :group 'dcl) -(defcustom dcl-command-regexp +(defcustom dcl-command-regexp "^\\$\\(.*-[ \t]*\\(!.*\\)*\n\\)*.*\\(\".*\\(\"\".*\\)*\"\\)*" "Regular expression describing a DCL command line. A line starting with $, optionally followed by continuation lines, @@ -392,7 +392,7 @@ dcl-electric-character and the you have just typed the `f' in :group 'dcl) -(defvar dcl-option-alist +(defvar dcl-option-alist '((dcl-basic-offset dcl-option-value-basic) (dcl-continuation-offset curval) (dcl-margin-offset dcl-option-value-margin-offset) @@ -400,12 +400,12 @@ dcl-electric-character and the you have just typed the `f' in (dcl-comment-line-regexp dcl-option-value-comment-line) (dcl-block-begin-regexp curval) (dcl-block-end-regexp curval) - (dcl-tab-always-indent toggle) - (dcl-electric-characters toggle) + (dcl-tab-always-indent toggle) + (dcl-electric-characters toggle) (dcl-electric-reindent-regexps curval) - (dcl-tempo-comma curval) - (dcl-tempo-left-paren curval) - (dcl-tempo-right-paren curval) + (dcl-tempo-comma curval) + (dcl-tempo-left-paren curval) + (dcl-tempo-right-paren curval) (dcl-calc-command-indent-function curval) (dcl-calc-cont-indent-function curval) (comment-start curval) @@ -421,7 +421,7 @@ curval the current value toggle the opposite of the current value (for t/nil)") -(defvar dcl-option-history +(defvar dcl-option-history (mapcar (lambda (option-assoc) (format "%s" (car option-assoc))) dcl-option-alist) @@ -443,7 +443,7 @@ Preloaded with all known option names from dcl-option-alist") ; "*Default imenu generic expression for DCL. ;The default includes SUBROUTINE labels in the main listing and -;sub-listings for other labels, CALL, GOTO and GOSUB statements. +;sub-listings for other labels, CALL, GOTO and GOSUB statements. ;See `imenu-generic-expression' in a recent (e.g. Emacs 19.30) imenu.el ;for details.") @@ -460,7 +460,7 @@ THEN-ELSE-ENDIF and between lines matching dcl-block-begin-regexp and dcl-block-end-regexp.) Labels are indented to a fixed position unless they begin or end a block. -Whole-line comments (matching dcl-comment-line-regexp) are not indented. +Whole-line comments (matching dcl-comment-line-regexp) are not indented. Data lines are not indented. Key bindings: @@ -488,7 +488,7 @@ Variables controlling indentation style and extra features: Indentation for a label. dcl-comment-line-regexp - Lines matching this regexp will not be indented. + Lines matching this regexp will not be indented. dcl-block-begin-regexp dcl-block-end-regexp @@ -511,10 +511,10 @@ Variables controlling indentation style and extra features: dcl-tab-always-indent If t, pressing TAB always indents the current line. - If nil, pressing TAB indents the current line if point is at the left + If nil, pressing TAB indents the current line if point is at the left margin. - dcl-electric-characters + dcl-electric-characters Non-nil causes lines to be indented at once when a label, ELSE or ENDIF is typed. @@ -530,7 +530,7 @@ Variables controlling indentation style and extra features: dcl-imenu-generic-expression Default value for imenu-generic-expression. The default includes SUBROUTINE labels in the main listing and sub-listings for - other labels, CALL, GOTO and GOSUB statements. + other labels, CALL, GOTO and GOSUB statements. dcl-imenu-label-labels dcl-imenu-label-goto @@ -539,30 +539,30 @@ Variables controlling indentation style and extra features: Change the text that is used as sub-listing labels in imenu. Loading this package calls the value of the variable -`dcl-mode-load-hook' with no args, if that value is non-nil. -Turning on DCL mode calls the value of the variable `dcl-mode-hook' +`dcl-mode-load-hook' with no args, if that value is non-nil. +Turning on DCL mode calls the value of the variable `dcl-mode-hook' with no args, if that value is non-nil. The following example uses the default values for all variables: -$! This is a comment line that is not indented (it matches +$! This is a comment line that is not indented (it matches $! dcl-comment-line-regexp) $! Next follows the first command line. It is indented dcl-margin-offset. $ i = 1 $ ! Other comments are indented like command lines. $ ! A margin label indented dcl-margin-label-offset: -$ label: +$ label: $ if i.eq.1 $ then -$ ! Lines between THEN-ELSE and ELSE-ENDIF are +$ ! Lines between THEN-ELSE and ELSE-ENDIF are $ ! indented dcl-basic-offset $ loop1: ! This matches dcl-block-begin-regexp... $ ! ...so this line is indented dcl-basic-offset -$ text = \"This \" + - ! is a continued line +$ text = \"This \" + - ! is a continued line \"lined up with the command line\" $ type sys$input -Data lines are not indented at all. +Data lines are not indented at all. $ endloop1: ! This matches dcl-block-end-regexp $ endif $ @@ -582,7 +582,7 @@ $ (make-local-variable 'comment-multi-line) (setq comment-multi-line nil) - + ;; This used to be "^\\$[ \t]*![ \t]*" which looks more correct. ;; The drawback was that you couldn't make empty comment lines by pressing ;; C-M-j repeatedly - only the first line became a comment line. @@ -608,7 +608,7 @@ $ (make-local-variable 'dcl-calc-command-indent-function) (make-local-variable 'dcl-calc-cont-indent-function) (make-local-variable 'dcl-electric-reindent-regexps) - + (setq major-mode 'dcl-mode) (setq mode-name "DCL") (use-local-map dcl-mode-map) @@ -668,7 +668,7 @@ $ "Move backward to a command. Move point to the preceding command line that is not a comment line, a command line with only a comment, only contains a `$' or only -contains a label. +contains a label. Returns point of the found command line or nil if not able to move." (interactive) @@ -712,7 +712,7 @@ Returns point of the found command line or nil if not able to move." "Move forward to a command. Move point to the end of the next command line that is not a comment line, a command line with only a comment, only contains a `$' or only -contains a label. +contains a label. Returns point of the found command line or nil if not able to move." (interactive) @@ -762,9 +762,9 @@ Leading $ and labels counts as whitespace in this case. If this is a comment line then move to the first non-whitespace character in the comment. -Typing \\[dcl-back-to-indentation] several times in a row will move point to other +Typing \\[dcl-back-to-indentation] several times in a row will move point to other `interesting' points closer to the left margin, and then back to the -rightmost point again. +rightmost point again. E.g. on the following line, point would go to the positions indicated by the numbers in order 1-2-3-1-... : @@ -785,7 +785,7 @@ by the numbers in order 1-2-3-1-... : ;; $ ! text ;; 3 2 1 ;; - ;; $ l: command ! + ;; $ l: command ! ;; 3 2 1 ;; ;; text @@ -807,7 +807,7 @@ by the numbers in order 1-2-3-1-... : (setq last-good-point (point))) (cond - ;; Special treatment for comment lines. We are trying to allow + ;; Special treatment for comment lines. We are trying to allow ;; things like "$ !*" as comment lines. ((looking-at dcl-comment-line-regexp) (re-search-forward (concat dcl-comment-line-regexp "[ \t]*") limit t) @@ -901,7 +901,7 @@ Returns one of the following symbols: (dcl-back-to-indentation) (point))) - + ;;;--------------------------------------------------------------------------- (defun dcl-show-line-type () "Test dcl-get-line-type." @@ -979,7 +979,7 @@ $ xxx If you use this function you will probably want to add \"then\" to dcl-electric-reindent-regexps and define the key \"n\" as -dcl-electric-character. +dcl-electric-character. " (let ((case-fold-search t)) (save-excursion @@ -1003,7 +1003,7 @@ dcl-electric-character. (- (+ cur-indent extra-indent) 2)) ((looking-at "\\belse\\b") (- (+ cur-indent extra-indent) 2)))) - ;; Outdent, this word is `endif' or `else': + 2 + ;; Outdent, this word is `endif' or `else': + 2 ((equal indent-type 'outdent) (goto-char this-point) (cond @@ -1028,19 +1028,19 @@ non-nil. If the current line should be outdented, calculate its indentation, either with the default method or by calling -dcl-calc-command-indent-function if it is non-nil. +dcl-calc-command-indent-function if it is non-nil. Rules for default indentation: If it is the first line in the buffer, indent dcl-margin-offset. -Go to the previous command line with a command on it. +Go to the previous command line with a command on it. Find out how much it is indented (cur-indent). Look at the first word on the line to see if the indentation should be adjusted. Skip margin-label, continuations and comments while looking for the first word. Save this buffer position as `last-point'. -If the first word after a label is SUBROUTINE, set extra-indent to +If the first word after a label is SUBROUTINE, set extra-indent to dcl-margin-offset. First word extra-indent @@ -1050,7 +1050,7 @@ block-begin +dcl-basic-offset Then return to the current line and look at the first word to see if the indentation should be adjusted again. Save this buffer position as -`this-point'. +`this-point'. First word extra-indent ELSE -dcl-basic-offset @@ -1063,7 +1063,7 @@ cur-indent to cur-indent+extra-indent. If an extra adjustment is necessary and if dcl-calc-command-indent-function is nil or returns nil set cur-indent -to cur-indent+extra-indent. +to cur-indent+extra-indent. See also documentation for dcl-calc-command-indent-function. The indent-type classification could probably be expanded upon. @@ -1106,7 +1106,7 @@ The indent-type classification could probably be expanded upon. ;; We couldn't go further back, so this must have been the ;; first line. (setq cur-indent dcl-margin-offset - last-point (dcl-indentation-point)) + last-point (dcl-indentation-point)) (setq done t))) ;; Examine the line to get current indentation and possibly a ;; reason to indent. @@ -1202,7 +1202,7 @@ Indented lines will align with either: yyy))) " (let ((case-fold-search t) - indent) + indent) (save-excursion (dcl-beginning-of-statement) (let ((end (save-excursion (forward-line 1) (point)))) @@ -1221,7 +1221,7 @@ Indented lines will align with either: (skip-chars-forward " \t:=" end))) ;; This could be the position to indent to (setq indent (current-column)) - + ;; Move to the next word unless we have seen an ;; assignment. If it starts with `/' it's a ;; qualifier and we will indent to that position @@ -1328,7 +1328,7 @@ Find out how much it is indented." (re-search-forward dcl-label-r))) (dcl-indent-to indent 1) ) - ;; + ;; (if (> (- (point-max) pos) (point)) (goto-char (- (point-max) pos))) )) @@ -1376,7 +1376,7 @@ Adjusts indentation on the current line. Data lines are not indented." (t (message "dcl-indent-line: unknown type")) ))) - + ;;;------------------------------------------------------------------------- (defun dcl-indent-command () @@ -1406,9 +1406,9 @@ the lines indentation; otherwise insert a tab." (start-point (point))) (cond ;; Data line : always insert tab - ((or (equal type 'data) (equal type 'empty-data)) + ((or (equal type 'data) (equal type 'empty-data)) (tab-to-tab-stop)) - ;; Indent only at start of line + ;; Indent only at start of line ((not dcl-tab-always-indent) ; nil (let ((search-end-point (save-excursion @@ -1428,7 +1428,7 @@ the lines indentation; otherwise insert a tab." ;;;------------------------------------------------------------------------- (defun dcl-electric-character (arg) "Inserts a character and indents if necessary. -Insert a character if the user gave a numeric argument or the flag +Insert a character if the user gave a numeric argument or the flag `dcl-electric-characters' is not set. If an argument was given, insert that many characters. @@ -1443,7 +1443,7 @@ regexps in `dcl-electric-reindent-regexps'." (self-insert-command 1) (let ((case-fold-search t)) ;; There must be a better way than (memq t ...). - ;; (apply 'or ...) didn't work + ;; (apply 'or ...) didn't work (if (memq t (mapcar 'dcl-was-looking-at dcl-electric-reindent-regexps)) (dcl-indent-line))))) @@ -1463,7 +1463,7 @@ regexps in `dcl-electric-reindent-regexps'." (progn (dcl-delete-chars " \t") (indent-to col minimum))))) - + ;;;------------------------------------------------------------------------- (defun dcl-split-line () @@ -1511,7 +1511,7 @@ Inserts continuation marks and splits character strings." (if (not done) ; normal M-LFD action (indent-new-comment-line)))) - + ;;;------------------------------------------------------------------------- (defun dcl-delete-indentation (&optional arg) "Join this line to previous like delete-indentation. @@ -1582,7 +1582,7 @@ Returns the column offset." (defun dcl-option-value-margin-offset (option-assoc) "Guess a value for margin offset. Find the column of the first non-blank character on the line, not -counting labels. +counting labels. Returns a number as a string." (save-excursion (beginning-of-line) @@ -1610,7 +1610,7 @@ Must return a string." (let ((regexp (buffer-substring (match-beginning 0) (match-end 0)))) (concat "^" (regexp-quote regexp))) dcl-comment-line-regexp)))) - + ;;;------------------------------------------------------------------------- (defun dcl-guess-option-value (option) @@ -1701,7 +1701,7 @@ Returns the name of the option variable as a string." (and next-indent (/= (- this-indent next-indent) 0)))))) "dcl-basic-offset") - ;; No more guesses. + ;; No more guesses. (t "")))) @@ -1739,8 +1739,8 @@ All variable names are available as completions and in the history list." ;;;------------------------------------------------------------------------- (defun dcl-save-local-variable (var &optional def-prefix def-suffix) "Save a variable in a `Local Variables' list. -Set or update the value of VAR in the current buffers -`Local Variables:' list." +Set or update the value of VAR in the current buffers +`Local Variables:' list." ;; Look for "Local variables:" line in last page. (save-excursion (goto-char (point-max)) @@ -1790,7 +1790,7 @@ Set or update the value of VAR in the current buffers ;; Not found. Insert a new entry before this line (setq continue nil) (beginning-of-line) - (insert (concat prefix-string (symbol-name var) ": " + (insert (concat prefix-string (symbol-name var) ": " (prin1-to-string (eval var)) " " suffix-string "\n"))) ;; Is it the variable we are looking for? @@ -1836,7 +1836,7 @@ Set or update the value of VAR in the current buffers comment-end (concat " " comment-end)))))) (insert (concat def-prefix "Local variables:" def-suffix "\n")) - (insert (concat def-prefix (symbol-name var) ": " + (insert (concat def-prefix (symbol-name var) ": " (prin1-to-string (eval var)) def-suffix "\n")) (insert (concat def-prefix "end:" def-suffix))) ))) @@ -1909,9 +1909,9 @@ section at the end of the current buffer." (require 'tempo) (defvar dcl-tempo-tags nil "Tempo tags for DCL mode.") - + (tempo-define-template "dcl-f$context" - '("f$context" dcl-tempo-left-paren + '("f$context" dcl-tempo-left-paren (p "context-type: ") dcl-tempo-comma (p "context-symbol: ") dcl-tempo-comma (p "selection-item: ") dcl-tempo-comma @@ -1920,33 +1920,33 @@ section at the end of the current buffer." "f$context" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$csid" - '("f$csid" dcl-tempo-left-paren + '("f$csid" dcl-tempo-left-paren (p "context-symbol: ") dcl-tempo-right-paren) "f$csid" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$cvsi" - '("f$cvsi" dcl-tempo-left-paren + '("f$cvsi" dcl-tempo-left-paren (p "start-bit: ") dcl-tempo-comma (p "number-of-bits: ") dcl-tempo-comma (p "string: ") dcl-tempo-right-paren) "f$cvsi" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$cvtime" - '("f$cvtime" dcl-tempo-left-paren + '("f$cvtime" dcl-tempo-left-paren (p "[input_time]: ") dcl-tempo-comma (p "[output_time_format]: ") dcl-tempo-comma (p "[output_field]: ") dcl-tempo-right-paren) "f$cvtime" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$cvui" - '("f$cvui" dcl-tempo-left-paren + '("f$cvui" dcl-tempo-left-paren (p "start-bit: ") dcl-tempo-comma (p "number-of-bits: ") dcl-tempo-comma (p "string") dcl-tempo-right-paren) "f$cvui" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$device" - '("f$device" dcl-tempo-left-paren + '("f$device" dcl-tempo-left-paren (p "[search_devnam]: ") dcl-tempo-comma (p "[devclass]: ") dcl-tempo-comma (p "[devtype]: ") dcl-tempo-comma @@ -1959,56 +1959,56 @@ section at the end of the current buffer." "f$directory" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$edit" - '("f$edit" dcl-tempo-left-paren + '("f$edit" dcl-tempo-left-paren (p "string: ") dcl-tempo-comma (p "edit-list: ") dcl-tempo-right-paren) "f$edit" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$element" - '("f$element" dcl-tempo-left-paren + '("f$element" dcl-tempo-left-paren (p "element-number: ") dcl-tempo-comma (p "delimiter: ") dcl-tempo-comma (p "string: ") dcl-tempo-right-paren) "f$element" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$environment" - '("f$environment" dcl-tempo-left-paren + '("f$environment" dcl-tempo-left-paren (p "item: ") dcl-tempo-right-paren) "f$environment" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$extract" - '("f$extract" dcl-tempo-left-paren + '("f$extract" dcl-tempo-left-paren (p "start: ") dcl-tempo-comma (p "length: ") dcl-tempo-comma (p "string: ") dcl-tempo-right-paren) "f$extract" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$fao" - '("f$fao" dcl-tempo-left-paren + '("f$fao" dcl-tempo-left-paren (p "control-string: ") dcl-tempo-comma ("argument[,...]: ") dcl-tempo-right-paren) "f$fao" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$file_attributes" - '("f$file_attributes" dcl-tempo-left-paren + '("f$file_attributes" dcl-tempo-left-paren (p "filespec: ") dcl-tempo-comma (p "item: ") dcl-tempo-right-paren) "f$file_attributes" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$getdvi" - '("f$getdvi" dcl-tempo-left-paren + '("f$getdvi" dcl-tempo-left-paren (p "device-name: ") dcl-tempo-comma (p "item: ") dcl-tempo-right-paren) "f$getdvi" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$getjpi" - '("f$getjpi" dcl-tempo-left-paren + '("f$getjpi" dcl-tempo-left-paren (p "pid: ") dcl-tempo-comma (p "item: ") dcl-tempo-right-paren ) "f$getjpi" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$getqui" - '("f$getqui" dcl-tempo-left-paren + '("f$getqui" dcl-tempo-left-paren (p "function: ") dcl-tempo-comma (p "[item]: ") dcl-tempo-comma (p "[object-id]: ") dcl-tempo-comma @@ -2016,20 +2016,20 @@ section at the end of the current buffer." "f$getqui" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$getsyi" - '("f$getsyi" dcl-tempo-left-paren + '("f$getsyi" dcl-tempo-left-paren (p "item: ") dcl-tempo-comma (p "[node-name]: ") dcl-tempo-comma (p "[cluster-id]: ") dcl-tempo-right-paren) "f$getsyi" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$identifier" - '("f$identifier" dcl-tempo-left-paren + '("f$identifier" dcl-tempo-left-paren (p "identifier: ") dcl-tempo-comma (p "conversion-type: ") dcl-tempo-right-paren) "f$identifier" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$integer" - '("f$integer" dcl-tempo-left-paren + '("f$integer" dcl-tempo-left-paren (p "expression: ") dcl-tempo-right-paren) "f$integer" "" 'dcl-tempo-tags) @@ -2039,13 +2039,13 @@ section at the end of the current buffer." "f$length" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$locate" - '("f$locate" dcl-tempo-left-paren + '("f$locate" dcl-tempo-left-paren (p "substring: ") dcl-tempo-comma (p "string: ") dcl-tempo-right-paren) "f$locate" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$message" - '("f$message" dcl-tempo-left-paren + '("f$message" dcl-tempo-left-paren (p "status-code: ") dcl-tempo-right-paren ) "f$message" "" 'dcl-tempo-tags) @@ -2054,7 +2054,7 @@ section at the end of the current buffer." "f$mode" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$parse" - '("f$parse" dcl-tempo-left-paren + '("f$parse" dcl-tempo-left-paren (p "filespec: ") dcl-tempo-comma (p "[default-spec]: ") dcl-tempo-comma (p "[related-spec]: ") dcl-tempo-comma @@ -2063,12 +2063,12 @@ section at the end of the current buffer." "f$parse" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$pid" - '("f$pid" dcl-tempo-left-paren + '("f$pid" dcl-tempo-left-paren (p "context-symbol: ") dcl-tempo-right-paren) "f$pid" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$privilege" - '("f$privilege" dcl-tempo-left-paren + '("f$privilege" dcl-tempo-left-paren (p "priv-states: ") dcl-tempo-right-paren) "f$privilege" "" 'dcl-tempo-tags) @@ -2077,18 +2077,18 @@ section at the end of the current buffer." "f$process" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$search" - '("f$search" dcl-tempo-left-paren + '("f$search" dcl-tempo-left-paren (p "filespec: ") dcl-tempo-comma (p "[stream-id]: ") dcl-tempo-right-paren) "f$search" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$setprv" - '("f$setprv" dcl-tempo-left-paren + '("f$setprv" dcl-tempo-left-paren (p "priv-states: ") dcl-tempo-right-paren) "f$setprv" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$string" - '("f$string" dcl-tempo-left-paren + '("f$string" dcl-tempo-left-paren (p "expression: ") dcl-tempo-right-paren) "f$string" "" 'dcl-tempo-tags) @@ -2097,7 +2097,7 @@ section at the end of the current buffer." "f$time" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$trnlnm" - '("f$trnlnm" dcl-tempo-left-paren + '("f$trnlnm" dcl-tempo-left-paren (p "logical-name: ") dcl-tempo-comma (p "[table]: ") dcl-tempo-comma (p "[index]: ") dcl-tempo-comma @@ -2107,7 +2107,7 @@ section at the end of the current buffer." "f$trnlnm" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$type" - '("f$type" dcl-tempo-left-paren + '("f$type" dcl-tempo-left-paren (p "symbol-name: ") dcl-tempo-right-paren) "f$type" "" 'dcl-tempo-tags) @@ -2116,7 +2116,7 @@ section at the end of the current buffer." "f$user" "" 'dcl-tempo-tags) (tempo-define-template "dcl-f$verify" - '("f$verify" dcl-tempo-left-paren + '("f$verify" dcl-tempo-left-paren (p "[procedure-value]: ") dcl-tempo-comma (p "[image-value]: ") dcl-tempo-right-paren) "f$verify" "" 'dcl-tempo-tags) @@ -2171,7 +2171,7 @@ otherwise return nil." () (equal start (match-end 0)))))) - + ;;;------------------------------------------------------------------------- (defun dcl-imenu-create-index-function () "Jacket routine to make imenu searches non case sensitive." diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index ffa86d3b69b..5f1bed74770 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el @@ -38,7 +38,7 @@ ;; (add-hook 'delphi-mode-hook 'turn-on-font-lock) ;; If font-lock is not loaded by default, you might have to do: -;; +;; ;; (autoload 'font-lock-mode "font-lock") ;; (autoload 'turn-on-font-lock "font-lock") ;; (setq font-lock-support-mode 'lazy-lock-mode) @@ -65,7 +65,7 @@ (provide 'delphi) (defconst delphi-version - (let ((revision "$Revision: 3.7 $")) + (let ((revision "$Revision: 3.8 $")) (string-match ": \\([^ ]+\\)" revision) (match-string 1 revision)) "Version of this delphi mode.") @@ -187,7 +187,7 @@ differs from the default." (defconst delphi-directives '(absolute abstract assembler automated cdecl default dispid dynamic export external far forward index inline message name near nodefault - overload override pascal private protected public published read readonly + overload override pascal private protected public published read readonly register reintroduce resident resourcestring safecall stdcall stored virtual write writeonly) "Delphi4 directives.") @@ -198,9 +198,9 @@ differs from the default." and array as asm at begin case class const constructor contains destructor dispinterface div do downto else end except exports file finalization finally for function goto if implementation implements - in inherited initialization interface is label library mod nil not + in inherited initialization interface is label library mod nil not of object on or out package packed procedure program property - raise record repeat requires result self set shl shr then threadvar + raise record repeat requires result self set shl shr then threadvar to try type unit uses until var while with xor ;; These routines should be keywords, if Borland had the balls. @@ -248,7 +248,7 @@ are followed by an expression.") (defconst delphi-visibilities '(public private protected published automated) "Class visibilities.") -(defconst delphi-block-statements +(defconst delphi-block-statements '(begin try case repeat initialization finalization asm) "Statements that contain multiple substatements.") @@ -526,7 +526,7 @@ routine.") ;; We have an end only if there is some string content (at ;; least a starting delimiter). (not (delphi-is-literal-end (1- p))))) - + ;; Special case: strings cannot span lines. (and (delphi-is kind delphi-strings) (eq ?\n (char-after (1- p))))))) @@ -568,7 +568,7 @@ routine.") ;; We are completing an incomplete literal. (let ((kind (delphi-literal-kind (1- search-start)))) (delphi-complete-literal kind limit) - (delphi-set-text-properties + (delphi-set-text-properties search-start (point) (delphi-literal-text-properties kind)))) ((re-search-forward @@ -583,7 +583,7 @@ routine.") (start (match-beginning 0))) (delphi-set-text-properties search-start start nil) (delphi-complete-literal kind limit) - (delphi-set-text-properties + (delphi-set-text-properties start (point) (delphi-literal-text-properties kind)))) ;; Nothing found. Mark it as a non-literal. @@ -735,7 +735,7 @@ routine.") (while (< p to) ;; Color the token and move past it. (setq token (delphi-token-at p)) - (add-text-properties + (add-text-properties (delphi-token-start token) (delphi-token-end token) (list 'face (delphi-face-of (delphi-token-kind token)) 'lazy-lock t)) (setq p (delphi-token-end token)) @@ -756,7 +756,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (delphi-progress-start) ;; Reparse at least from the token previous to the change to the end of ;; line after the change. - (delphi-parse-region-until-stable + (delphi-parse-region-until-stable (delphi-token-start (delphi-token-at (1- change-start))) (progn (goto-char change-end) (end-of-line) (point))) (delphi-progress-done))))) @@ -814,7 +814,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (catch 'done (while token (setq kind (delphi-token-kind token)) - (cond + (cond ;; Skip over ()/[] groups. ((eq 'close-group kind) (setq token (delphi-group-start token))) @@ -836,10 +836,10 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (catch 'done (while token (setq kind (delphi-token-kind token)) - (cond + (cond ((and (eq 'colon kind) (delphi-is (delphi-token-kind last-token) - `(,@delphi-block-statements + `(,@delphi-block-statements ,@delphi-expr-statements))) ;; We hit a label followed by a statement. Indent to the statement. (throw 'done nil)) @@ -916,7 +916,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ((delphi-composite-type-start token last-token) (throw 'done (if stop-on-class last-token token))) ) - (unless (delphi-is token-kind delphi-whitespace) + (unless (delphi-is token-kind delphi-whitespace) (setq last-token token)) (setq token (delphi-previous-token token))) ;; Start not found. @@ -1037,7 +1037,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (defun delphi-is-use-clause-end (at-token last-token last-colon from-kind) ;; True if we are after the end of a uses type clause. - (when (and last-token + (when (and last-token (not last-colon) (eq 'comma (delphi-token-kind at-token)) (eq 'semicolon from-kind)) @@ -1148,7 +1148,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (delphi-line-indent-of token)))) ;; Assembly sections always indent in from the asm keyword. - ((eq token-kind 'asm) + ((eq token-kind 'asm) (throw 'done (delphi-stmt-line-indent-of token delphi-indent-level))) ;; An enclosing statement delimits a previous statement. @@ -1236,7 +1236,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ;; An enclosing ":" means a label. ((and (eq 'colon token-kind) - (delphi-is (delphi-token-kind section-token) + (delphi-is (delphi-token-kind section-token) delphi-block-statements) (not last-terminator) (not expr-delimited) @@ -1270,7 +1270,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (from-kind (delphi-token-kind from-token)) (token-kind nil) (stmt-start nil) - (last-token nil) + (last-token nil) (equals-encountered nil) (before-equals nil) (expr-delimited nil)) @@ -1329,10 +1329,10 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: (if stmt-start ;; We are not actually indenting to the case statement, ;; but are within a label expression. - (delphi-stmt-line-indent-of + (delphi-stmt-line-indent-of stmt-start delphi-indent-level) ;; Indent from the case keyword. - (delphi-stmt-line-indent-of + (delphi-stmt-line-indent-of token delphi-case-label-indent)))) ;; Body expression statements are enclosing. Indent from the @@ -1340,7 +1340,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ;; it. ((delphi-is token-kind delphi-body-expr-statements) (throw 'done - (delphi-stmt-line-indent-of + (delphi-stmt-line-indent-of (or stmt-start token) delphi-indent-level))) ;; An else statement is enclosing, but it doesn't have an expression. @@ -1388,7 +1388,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ((+ (delphi-section-indent-of token) delphi-indent-level))))) ;; Assembly sections always indent in from the asm keyword. - ((eq token-kind 'asm) + ((eq token-kind 'asm) (throw 'done (delphi-stmt-line-indent-of token delphi-indent-level))) ;; Stop at an enclosing statement and indent from it. @@ -1426,18 +1426,18 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ;; + 2; ;; which doesn't look right. ;;;; Align binary ops with the before token. - ;;((delphi-is from-kind delphi-binary-ops) + ;;((delphi-is from-kind delphi-binary-ops) ;;(throw 'done (delphi-indent-of before-equals 0))) ;; Assignments (:=) we skip over to get a normal indent. ((eq (delphi-token-kind last-token) 'equals)) ;; Otherwise indent in from the equals. - ((throw 'done + ((throw 'done (delphi-indent-of before-equals delphi-indent-level))))) ;; Remember any "=" we encounter if it has not already been processed. - ((eq token-kind 'equals) + ((eq token-kind 'equals) (setq equals-encountered token before-equals last-token)) ) @@ -1473,7 +1473,7 @@ non-delphi buffer. Set to nil in a delphi buffer. To override, just do: ((delphi-is token-kind delphi-match-block-statements) ;; Use the block's indentation. - (let ((block-start + (let ((block-start (delphi-block-start token 'stop-on-class))) (cond ;; When trailing a body statement, indent to diff --git a/lisp/progmodes/f90.el b/lisp/progmodes/f90.el index 5b22921a65a..05619ce1370 100644 --- a/lisp/progmodes/f90.el +++ b/lisp/progmodes/f90.el @@ -1741,7 +1741,7 @@ CHANGE-WORD should be one of 'upcase-word, 'downcase-word, 'capitalize-word." (concat "\\(" f90-keywords-re "\\|" f90-procedures-re "\\|" f90-hpf-keywords-re "\\|" f90-operators-re "\\)")) - (ref-point (point-min)) + (ref-point (point-min)) (modified (buffer-modified-p)) state saveword back-point) (goto-char beg) diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el index 0c88bc46fa1..0213d2411c8 100644 --- a/lisp/progmodes/hideif.el +++ b/lisp/progmodes/hideif.el @@ -36,7 +36,7 @@ ;; M-x hide-ifdefs or C-c @ h ;; ;; Hide-ifdef suppresses the display of code that the preprocessor wouldn't -;; pass through. The support of constant expressions in #if lines is +;; pass through. The support of constant expressions in #if lines is ;; limited to identifiers, parens, and the operators: &&, ||, !, and ;; "defined". Please extend this. ;; @@ -45,7 +45,7 @@ ;; still in the buffer, and you can move the point into it and modify ;; text unawares. ;; You can make your buffer read-only while hide-ifdef-hiding by setting -;; hide-ifdef-read-only to a non-nil value. You can toggle this +;; hide-ifdef-read-only to a non-nil value. You can toggle this ;; variable with hide-ifdef-toggle-read-only (C-c @ C-q). ;; ;; You can undo the effect of hide-ifdefs by typing @@ -58,7 +58,7 @@ ;; If you define or undefine a symbol while hide-ifdef-mode is in effect, ;; the display will be updated. Only the define list for the current ;; buffer will be affected. You can save changes to the local define -;; list with hide-ifdef-set-define-alist. This adds entries +;; list with hide-ifdef-set-define-alist. This adds entries ;; to hide-ifdef-define-alist. ;; ;; If you have defined a hide-ifdef-mode-hook, you can set @@ -179,7 +179,7 @@ how the hiding is done: is used. `hide-ifdef-define-alist' - An association list of defined symbol lists. + An association list of defined symbol lists. Use `hide-ifdef-set-define-alist' to save the current `hide-ifdef-env' and `hide-ifdef-use-define-alist' to set the current `hide-ifdef-env' from one of the lists in `hide-ifdef-define-alist'. @@ -220,7 +220,7 @@ how the hiding is done: (remove-from-invisibility-spec '(hide-ifdef . t)) (if hide-ifdef-hiding (show-ifdefs)))) - + (defun hif-show-all () "Show all of the text in the current buffer." @@ -420,7 +420,7 @@ that form should be displayed.") (hif-nexttoken) (setq result (list math-op result (hif-factor)))) result)) - + (defun hif-factor () "Parse a factor: '!' factor | '(' expr ')' | 'defined(' id ')' | id." (cond @@ -720,7 +720,7 @@ Point is left unchanged." (setq end (point))) ; (save-excursion (end-of-line) (point)) (hif-make-range start end else)))) - + ;;; A bit slimy. (defun hif-hide-line (point) @@ -730,13 +730,13 @@ Point is left unchanged." (goto-char point) (hide-ifdef-region-internal (line-beginning-position) (progn (hif-end-of-line) (point)))))) - + ;;; Hif-Possibly-Hide ;;; There are four cases. The #ifX expression is "taken" if it ;;; the hide-ifdef-evaluator returns T. Presumably, this means the code ;;; inside the #ifdef would be included when the program was -;;; compiled. +;;; compiled. ;;; ;;; Case 1: #ifX taken, and there's an #else. ;;; The #else part must be hidden. The #if (then) part must be @@ -771,7 +771,7 @@ It uses the judgement of `hide-ifdef-evaluator'." (let ((test (hif-canonicalize)) (range (hif-find-range))) ;; (message "test = %s" test) (sit-for 1) - + (hif-hide-line (hif-range-end range)) (if (not (hif-not (funcall hide-ifdef-evaluator test))) (cond ((hif-range-else range) ; case 1 @@ -851,7 +851,7 @@ It does not do the work that's pointless to redo on a recursive entry." hif-outside-read-only)) (force-mode-line-update)) - + (defun hide-ifdef-define (var) "Define a VAR so that #ifdef VAR would be included." (interactive "SDefine what? ") @@ -866,8 +866,8 @@ It does not do the work that's pointless to redo on a recursive entry." (defun hide-ifdefs (&optional nomsg) - "Hide the contents of some #ifdefs. -Assume that defined symbols have been added to `hide-ifdef-env'. + "Hide the contents of some #ifdefs. +Assume that defined symbols have been added to `hide-ifdef-env'. The text hidden is the text that would not be included by the C preprocessor if it were given the file with those symbols defined. diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index f90d8d4f573..df5084814fc 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el @@ -46,7 +46,7 @@ (define-key icon-mode-map "\e\C-e" 'end-of-icon-defun) (define-key icon-mode-map "\e\C-q" 'indent-icon-exp) (define-key icon-mode-map "\177" 'backward-delete-char-untabify) - + (define-key icon-mode-map [menu-bar] (make-sparse-keymap "Icon")) (define-key icon-mode-map [menu-bar icon] (cons "Icon" map)) @@ -188,7 +188,7 @@ with no args, if that value is non-nil." (setq comment-indent-function 'icon-comment-indent) (set (make-local-variable 'indent-line-function) 'icon-indent-line) ;; font-lock support - (setq font-lock-defaults + (setq font-lock-defaults '((icon-font-lock-keywords icon-font-lock-keywords-1 icon-font-lock-keywords-2) nil nil ((?_ . "w")) beginning-of-defun @@ -202,7 +202,7 @@ with no args, if that value is non-nil." ;; we start from the assertion that `hs-special-modes-alist' is autoloaded. (unless (assq 'icon-mode hs-special-modes-alist) (setq hs-special-modes-alist - (cons '(icon-mode "\\<procedure\\>" "\\<end\\>" nil + (cons '(icon-mode "\\<procedure\\>" "\\<end\\>" nil icon-forward-sexp-function) hs-special-modes-alist))) (run-hooks 'icon-mode-hook)) @@ -613,7 +613,7 @@ Returns nil if line starts inside a string, t if in a comment." "Subdued level highlighting for Icon mode.") (defconst icon-font-lock-keywords-2 - (append + (append icon-font-lock-keywords-1 (eval-when-compile (list @@ -624,31 +624,31 @@ Returns nil if line starts inside a string, t if in a comment." 'font-lock-type-face) ;; Fontify all keywords. ;; - (cons - (regexp-opt - '("break" "do" "next" "repeat" "to" "by" "else" "if" "not" "return" - "until" "case" "of" "while" "create" "every" "suspend" "default" + (cons + (regexp-opt + '("break" "do" "next" "repeat" "to" "by" "else" "if" "not" "return" + "until" "case" "of" "while" "create" "every" "suspend" "default" "fail" "record" "then") 'words) 'font-lock-keyword-face) - ;; "end" "initial" + ;; "end" "initial" (cons (regexp-opt '("end" "initial") 'words) 'font-lock-builtin-face) ;; Fontify all system variables. - (cons - (regexp-opt - '("&allocated" "&ascii" "&clock" "&col" "&collections" "&column" + (cons + (regexp-opt + '("&allocated" "&ascii" "&clock" "&col" "&collections" "&column" "&control" "&cset" "¤t" "&date" "&dateline" "&digits" "&dump" - "&e" "&error" "&errornumber" "&errortext" "&errorvalue" "&errout" - "&eventcode" "&eventsource" "&eventvalue" "&fail" "&features" - "&file" "&host" "&input" "&interval" "&lcase" "&ldrag" "&letters" - "&level" "&line" "&lpress" "&lrelease" "&main" "&mdrag" "&meta" - "&mpress" "&mrelease" "&null" "&output" "&phi" "&pi" "&pos" - "&progname" "&random" "&rdrag" "®ions" "&resize" "&row" - "&rpress" "&rrelease" "&shift" "&source" "&storage" "&subject" + "&e" "&error" "&errornumber" "&errortext" "&errorvalue" "&errout" + "&eventcode" "&eventsource" "&eventvalue" "&fail" "&features" + "&file" "&host" "&input" "&interval" "&lcase" "&ldrag" "&letters" + "&level" "&line" "&lpress" "&lrelease" "&main" "&mdrag" "&meta" + "&mpress" "&mrelease" "&null" "&output" "&phi" "&pi" "&pos" + "&progname" "&random" "&rdrag" "®ions" "&resize" "&row" + "&rpress" "&rrelease" "&shift" "&source" "&storage" "&subject" "&time" "&trace" "&ucase" "&version" "&window" "&x" "&y") t) 'font-lock-constant-face) (cons ;; global local static declarations and link files - (concat + (concat "^[ \t]*" (regexp-opt '("global" "link" "local" "static") t) "\\(\\sw+\\>\\)*") @@ -660,13 +660,13 @@ Returns nil if line starts inside a string, t if in a comment." font-lock-variable-name-face))))) (cons ;; $define $elif $ifdef $ifndef $undef - (concat "^" + (concat "^" (regexp-opt'("$define" "$elif" "$ifdef" "$ifndef" "$undef") t) "\\>[ \t]*\\([^ \t\n]+\\)?") - '((1 font-lock-builtin-face) + '((1 font-lock-builtin-face) (4 font-lock-variable-name-face nil t))) - (cons ;; $dump $endif $else $include - (concat + (cons ;; $dump $endif $else $include + (concat "^" (regexp-opt'("$dump" "$endif" "$else" "$include") t) "\\>" ) 'font-lock-builtin-face) (cons ;; $warning $error diff --git a/lisp/progmodes/idlw-rinfo.el b/lisp/progmodes/idlw-rinfo.el index b44e0d0210e..8499574ffbd 100644 --- a/lisp/progmodes/idlw-rinfo.el +++ b/lisp/progmodes/idlw-rinfo.el @@ -49,7 +49,7 @@ ;; New versions of IDLWAVE, documentation, and more information ;; available from: ;; http://idlwave.org -;; +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Code: diff --git a/lisp/progmodes/idlw-toolbar.el b/lisp/progmodes/idlw-toolbar.el index 651d1bafd2a..74f16b6b70c 100644 --- a/lisp/progmodes/idlw-toolbar.el +++ b/lisp/progmodes/idlw-toolbar.el @@ -4,7 +4,7 @@ ;; Author: Carsten Dominik <dominik@astro.uva.nl> ;; Maintainer: J.D. Smith <jdsmith@as.arizona.edu> ;; Version: 4.15 -;; Date: $Date: 2002/06/14 19:06:16 $ +;; Date: $Date: 2002/09/12 16:56:54 $ ;; Keywords: processes ;; This file is part of GNU Emacs. @@ -399,7 +399,7 @@ static char * file[] = { \" \", \" \", \" \"};") - "The Cont icon.") + "The Cont icon.") (defvar idlwave-toolbar-to-here-icon (idlwave-toolbar-make-button diff --git a/lisp/progmodes/m4-mode.el b/lisp/progmodes/m4-mode.el index c85a85e6ad5..56a28b437b7 100644 --- a/lisp/progmodes/m4-mode.el +++ b/lisp/progmodes/m4-mode.el @@ -34,7 +34,7 @@ ;; * want to make m4-m4-(buffer|region) look sorta like M-x compile look&feel ? ;; * sexp motion commands don't seem to work right -;;; Thanks: +;;; Thanks: ;;; to Akim Demaille and Terry Jones for the bug reports ;;; to Simon Marshall for the regexp tip ;;; to Martin Buchholz for some general fixes @@ -154,21 +154,21 @@ ;(char-to-string (char-syntax ?`)) ;;;how I generate the nasty looking regexps at the top -;;;(make-regexp '("builtin" "changecom" "changequote" "changeword" "debugfile" -;;; "debugmode" "decr" "define" "defn" "divert" "divnum" "dnl" +;;;(make-regexp '("builtin" "changecom" "changequote" "changeword" "debugfile" +;;; "debugmode" "decr" "define" "defn" "divert" "divnum" "dnl" ;;; "dumpdef" "errprint" "esyscmd" "eval" "file" "format" "gnu" -;;; "ifdef" "ifelse" "include" "incr" "index" "indir" "len" "line" -;;; "m4exit" "m4wrap" "maketemp" "patsubst" "popdef" "pushdef" "regexp" -;;; "shift" "sinclude" "substr" "syscmd" "sysval" "traceoff" "traceon" +;;; "ifdef" "ifelse" "include" "incr" "index" "indir" "len" "line" +;;; "m4exit" "m4wrap" "maketemp" "patsubst" "popdef" "pushdef" "regexp" +;;; "shift" "sinclude" "substr" "syscmd" "sysval" "traceoff" "traceon" ;;; "translit" "undefine" "undivert" "unix")) -;;;(make-regexp '("m4_builtin" "m4_changecom" "m4_changequote" "m4_changeword" -;;; "m4_debugfile" "m4_debugmode" "m4_decr" "m4_define" "m4_defn" -;;; "m4_divert" "m4_divnum" "m4_dnl" "m4_dumpdef" "m4_errprint" -;;; "m4_esyscmd" "m4_eval" "m4_file" "m4_format" "m4_ifdef" "m4_ifelse" -;;; "m4_include" "m4_incr" "m4_index" "m4_indir" "m4_len" "m4_line" -;;; "m4_m4exit" "m4_m4wrap" "m4_maketemp" "m4_patsubst" "m4_popdef" -;;; "m4_pushdef" "m4_regexp" "m4_shift" "m4_sinclude" "m4_substr" -;;; "m4_syscmd" "m4_sysval" "m4_traceoff" "m4_traceon" "m4_translit" +;;;(make-regexp '("m4_builtin" "m4_changecom" "m4_changequote" "m4_changeword" +;;; "m4_debugfile" "m4_debugmode" "m4_decr" "m4_define" "m4_defn" +;;; "m4_divert" "m4_divnum" "m4_dnl" "m4_dumpdef" "m4_errprint" +;;; "m4_esyscmd" "m4_eval" "m4_file" "m4_format" "m4_ifdef" "m4_ifelse" +;;; "m4_include" "m4_incr" "m4_index" "m4_indir" "m4_len" "m4_line" +;;; "m4_m4exit" "m4_m4wrap" "m4_maketemp" "m4_patsubst" "m4_popdef" +;;; "m4_pushdef" "m4_regexp" "m4_shift" "m4_sinclude" "m4_substr" +;;; "m4_syscmd" "m4_sysval" "m4_traceoff" "m4_traceon" "m4_translit" ;;; "m4_m4_undefine" "m4_undivert")) ;;; m4-mode.el ends here diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el index 62cbdbb291d..4d825f83239 100644 --- a/lisp/progmodes/make-mode.el +++ b/lisp/progmodes/make-mode.el @@ -210,7 +210,7 @@ to MODIFY A FILE WITHOUT YOUR CONFIRMATION when \"it seems necessary\"." ;; ;; Special targets for DMake, Sun's make ... -;; +;; (defcustom makefile-special-targets-list '(("DEFAULT") ("DONE") ("ERROR") ("EXPORT") ("FAILED") ("GROUPEPILOG") ("GROUPPROLOG") ("IGNORE") diff --git a/lisp/progmodes/meta-mode.el b/lisp/progmodes/meta-mode.el index ec53cd1957b..fc34a2aac7e 100644 --- a/lisp/progmodes/meta-mode.el +++ b/lisp/progmodes/meta-mode.el @@ -41,15 +41,15 @@ ;; package or as a separate Emacs Lisp package. ;; Installation: -;; +;; ;; An interface to running Metafont or MetaPost as a shell process ;; from within Emacs is currently under development as a separate ;; Emacs Lisp package (meta-buf.el). In order to have that package ;; loaded automatically when first entering Metafont or MetaPost mode, ;; you might use the load-hook provided in this package by adding ;; these lines to your startup file: -;; -;; (add-hook 'meta-mode-load-hook +;; +;; (add-hook 'meta-mode-load-hook ;; '(lambda () (require 'meta-buf))) ;; ;; The add-on package loaded this way may in turn make use of the @@ -72,7 +72,7 @@ ;; global-font-lock-mode or font-lock-support-mode, you can also ;; activate fontification in Metafont and/or MetaPost mode by adding ;; the following lines to your startup file: -;; +;; ;; (add-hook 'meta-common-mode-hook 'turn-on-font-lock) ;; (add-hook 'meta-common-mode-hook 'turn-on-lazy-lock) @@ -109,7 +109,7 @@ ;; Improved and debbuged indentation function. ;; v 0.4 -- 1997/02/18 UV Added functions to indent regions for M-C-q, ;; also added a preliminary mode-specific menu. -;; v 0.5 -- 1997/02/19 UV Added functions to skip to next or previous +;; v 0.5 -- 1997/02/19 UV Added functions to skip to next or previous ;; defun and to re-indent or comment-out defuns. ;; v 0.6 -- 1997/02/20 UV More debugging, testing and clean-up. ;; v 0.7 -- 1997/02/22 UV Use easymenu to define mode-specific menu. @@ -247,7 +247,7 @@ '((1 font-lock-keyword-face) (2 font-lock-constant-face))) ;; embedded Metafont/MetaPost code in comments - (cons "|\\([^|]+\\)|" + (cons "|\\([^|]+\\)|" '(1 font-lock-constant-face t)) )) "Default expressions to highlight in Metafont or MetaPost mode.") @@ -286,10 +286,10 @@ ;; grep '^primitive' texk-7.0/web2c/{mf,mp}.web |\ ;; sed 's/primitive(\("[a-zA-Z]*"\).*/\1/' > {mf,mp}_prim.list ;; -;; grep '\(let\|def\|vardef\|primarydef\|secondarydef\|tertiarydef\)' +;; grep '\(let\|def\|vardef\|primarydef\|secondarydef\|tertiarydef\)' ;; texmf/meta{font,post}/plain.{mf,mp} > {mf,mp}_plain.list -(defconst meta-common-primitives-list +(defconst meta-common-primitives-list '("ASCII" "addto" "also" "and" "angle" "atleast" "batchmode" "begingroup" "boolean" "boundarychar" "char" "charcode" "chardp" "charexists" "charext" "charht" "charic" "charlist" "charwd" @@ -317,10 +317,10 @@ "transform" "transformed" "true" "turningnumber" "uniformdeviate" "unknown" "until" "vardef" "warningcheck" "withpen" "xpart" "xscaled" "xxpart" "xypart" "year" "ypart" "yscaled" "yxpart" - "yypart" "zscaled") + "yypart" "zscaled") "List of primitives common to Metafont and MetaPost.") -(defconst metafont-primitives-list +(defconst metafont-primitives-list '("at" "autorounding" "chardx" "chardy" "cull" "display" "dropping" "fillin" "from" "granularity" "hppp" "inwindow" "keeping" "numspecial" "openwindow" "proofing" "smoothing" @@ -328,7 +328,7 @@ "withweight" "xoffset" "yoffset") "List of primitives only defined in Metafont.") -(defconst metapost-primitives-list +(defconst metapost-primitives-list '("arclength" "arctime" "bluepart" "bounded" "btex" "clip" "clipped" "color" "dashed" "dashpart" "etex" "filled" "fontpart" "fontsize" "greenpart" "infont" "linecap" "linejoin" "llcorner" @@ -338,7 +338,7 @@ "verbatimtex" "withcolor" "within" "write") "List of primitives only defined in MetaPost.") -(defconst meta-common-plain-macros-list +(defconst meta-common-plain-macros-list '( "abs" "bot" "bye" "byte" "ceiling" "clear_pen_memory" "clearit" "clearpen" "clearxy" "counterclockwise" "cutdraw" "decr" "dir" "direction" "directionpoint" "div" "dotprod" "downto" "draw" @@ -353,7 +353,7 @@ "unitvector" "upto" "whatever") "List of macros common to plain Metafont and MetaPost.") -(defconst metafont-plain-macros-list +(defconst metafont-plain-macros-list '("beginchar" "change_width" "culldraw" "cullit" "cutoff" "define_blacker_pixels" "define_corrected_pixels" "define_good_x_pixels" "define_good_y_pixels" @@ -370,24 +370,24 @@ "mode_proof" "mode_setup" "mode_smoke" "nodisplays" "notransforms" "openit" "penrazor" "pensquare" "proofoffset" "proofrule" "proofrulethickness" "screenchars" "screenrule" "screenstrokes" - "showit" "slantfont" "smode" "titlefont" "vround") + "showit" "slantfont" "smode" "titlefont" "vround") "List of macros only defined in plain Metafont.") -(defconst metapost-plain-macros-list +(defconst metapost-plain-macros-list '("arrowhead" "bbox" "beginfig" "buildcycle" "center" "cutafter" "cutbefore" "dashpattern" "dotlabel" "dotlabels" "drawarrow" "drawdblarrow" "drawoptions" "endfig" "image" "label" "off" "on" - "thelabel") + "thelabel") "List of macros only defined in plain MetaPost.") -(defconst metapost-graph-macros-list - '("augment" "auto.x" "auto.y" "autogrid" "begingraph" "endgraph" - "format" "frame" "gdata" "gdotlabel" "gdraw" "gdrawarrow" - "gdrawdblarrow" "gfill" "glabel" "grid" "itick" "otick" "plot" +(defconst metapost-graph-macros-list + '("augment" "auto.x" "auto.y" "autogrid" "begingraph" "endgraph" + "format" "frame" "gdata" "gdotlabel" "gdraw" "gdrawarrow" + "gdrawdblarrow" "gfill" "glabel" "grid" "itick" "otick" "plot" "setcoords" "setrange") "List of macros only defined in MetaPost \"graph\" package.") - -(defconst metapost-boxes-macros-list + +(defconst metapost-boxes-macros-list '("boxit" "boxjoin" "bpath" "circleit" "drawboxed" "drawboxes" "drawunboxed" "fixpos" "fixsize" "pic" "rboxit") "List of macros only defined in MetaPost \"boxes\" package.") @@ -413,7 +413,7 @@ (defvar meta-symbol-list nil "List of known symbols to complete in Metafont or MetaPost mode.") -(defvar meta-symbol-changed nil +(defvar meta-symbol-changed nil "Flag indicating whether `meta-symbol-list' has been initialized.") (defvar meta-complete-list nil @@ -517,7 +517,7 @@ If the list was changed, sort the list and remove duplicates first." ;; utility function used in `meta-complete-symbol' (let ((pos (point))) (save-excursion - (and (re-search-backward + (and (re-search-backward regexp (if limit (max (point-min) (- (point) limit))) t) (eq (match-end 0) pos))))) @@ -585,7 +585,7 @@ If the list was changed, sort the list and remove duplicates first." (looking-at meta-left-comment-regexp)) (current-column) (skip-chars-backward "\t ") - (max (if (bolp) 0 (1+ (current-column))) + (max (if (bolp) 0 (1+ (current-column))) comment-column))) (defun meta-indent-line () @@ -605,7 +605,7 @@ If the list was changed, sort the list and remove duplicates first." "Return the indentation of current line of Metafont or MetaPost source." (save-excursion (back-to-indentation) - (cond + (cond ;; Comments to the left margin. ((and meta-left-comment-regexp (looking-at meta-left-comment-regexp)) @@ -615,15 +615,15 @@ If the list was changed, sort the list and remove duplicates first." (looking-at meta-right-comment-regexp)) comment-column) ;; Comments best left alone. - ((and meta-ignore-comment-regexp + ((and meta-ignore-comment-regexp (looking-at meta-ignore-comment-regexp)) (current-indentation)) ;; Backindent at end of environments. - ((looking-at + ((looking-at (concat "\\<" meta-end-environment-regexp "\\>")) (- (meta-indent-calculate-last) meta-indent-level)) ;; Backindent at keywords within environments. - ((looking-at + ((looking-at (concat "\\<" meta-within-environment-regexp "\\>")) (- (meta-indent-calculate-last) meta-indent-level)) (t (meta-indent-calculate-last))))) @@ -645,11 +645,11 @@ If the list was changed, sort the list and remove duplicates first." (meta-indent-level-count) (cond ;; Compensate for backindent at end of environments. - ((looking-at + ((looking-at (concat "\\<"meta-end-environment-regexp "\\>")) meta-indent-level) ;; Compensate for backindent within environments. - ((looking-at + ((looking-at (concat "\\<" meta-within-environment-regexp "\\>")) meta-indent-level) (t 0))))) @@ -660,7 +660,7 @@ If the list was changed, sort the list and remove duplicates first." (save-excursion (save-restriction (let ((count 0)) - (narrow-to-region + (narrow-to-region (point) (save-excursion (re-search-forward "[^\\\\\"]%\\|\n\\|\\'" nil t) (backward-char) (point))) @@ -669,12 +669,12 @@ If the list was changed, sort the list and remove duplicates first." (goto-char (match-beginning 0)) (cond ;; Count number of begin-end keywords within line. - ((looking-at + ((looking-at (concat "\\<" meta-begin-environment-regexp "\\>")) (setq count (+ count meta-indent-level))) - ((looking-at + ((looking-at (concat "\\<" meta-end-environment-regexp "\\>")) - (setq count (- count meta-indent-level))) + (setq count (- count meta-indent-level))) ;; Count number of open-close parentheses within line. ((looking-at "(") (setq count (+ count meta-indent-level))) @@ -704,9 +704,9 @@ and initial semicolons." ;; A line with nothing but a comment on it? ((looking-at (concat "[ \t]*" comment-start-skip)) (setq has-comment t) - (setq comment-fill-prefix + (setq comment-fill-prefix (buffer-substring (match-beginning 0) (match-end 0)))) - ;; A line with some code, followed by a comment? + ;; A line with some code, followed by a comment? ((condition-case nil (save-restriction (narrow-to-region (point-min) @@ -718,7 +718,7 @@ and initial semicolons." ((eq (char-after (point)) ?\") (forward-sexp 1)))) (looking-at comment-start-skip)) (error nil)) - (setq has-comment t + (setq has-comment t has-code-and-comment t) (setq comment-fill-prefix (concat (make-string (/ (current-column) 8) ?\t) @@ -736,7 +736,7 @@ and initial semicolons." (save-excursion (while (and (zerop (forward-line -1)) (looking-at (concat "^[ \t]*" comment-start)))) - (or (looking-at (concat ".*" comment-start)) + (or (looking-at (concat ".*" comment-start)) (forward-line 1)) (point)) ;; Find the beginning of the first line past the region to fill. @@ -744,9 +744,9 @@ and initial semicolons." (while (progn (forward-line 1) (looking-at (concat "^[ \t]*" comment-start)))) (point))) - (let* ((paragraph-start + (let* ((paragraph-start (concat paragraph-start "\\|[ \t%]*$")) - (paragraph-separate + (paragraph-separate (concat paragraph-start "\\|[ \t%]*$")) (paragraph-ignore-fill-prefix nil) (fill-prefix comment-fill-prefix) @@ -789,21 +789,21 @@ and initial semicolons." (defun meta-beginning-of-defun (&optional arg) "Move backward to beginnning of a defun in Metafont or MetaPost code. -With numeric argument, do it that many times. +With numeric argument, do it that many times. Negative arg -N means move forward to Nth following beginning of defun. Returns t unless search stops due to beginning or end of buffer." (interactive "p") (if (or (null arg) (= 0 arg)) (setq arg 1)) (and arg (< arg 0) (not (eobp)) (forward-char 1)) - (and (re-search-backward + (and (re-search-backward (concat "\\<" meta-begin-defun-regexp "\\>") nil t arg) (progn (goto-char (match-beginning 0)) (skip-chars-backward "%") (skip-chars-backward " \t") t))) - + (defun meta-end-of-defun (&optional arg) "Move forward to end of a defun in Metafont or MetaPost code. -With numeric argument, do it that many times. +With numeric argument, do it that many times. Negative argument -N means move back to Nth preceding end of defun. Returns t unless search stops due to beginning or end of buffer." (interactive "p") @@ -926,7 +926,7 @@ The environment marked is the one that contains point or follows point." () (setq meta-mode-map (make-sparse-keymap)) (define-key meta-mode-map "\t" 'meta-indent-line) - (define-key meta-mode-map "\C-m" 'reindent-then-newline-and-indent) + (define-key meta-mode-map "\C-m" 'reindent-then-newline-and-indent) ;; Comment Paragraphs: ; (define-key meta-mode-map "\M-a" 'backward-sentence) ; (define-key meta-mode-map "\M-e" 'forward-sentence) @@ -950,11 +950,11 @@ The environment marked is the one that contains point or follows point." (define-key meta-mode-map "\M-\t" 'meta-complete-symbol) ;; Shell Commands: ; (define-key meta-mode-map "\C-c\C-c" 'meta-command-file) -; (define-key meta-mode-map "\C-c\C-k" 'meta-kill-job) +; (define-key meta-mode-map "\C-c\C-k" 'meta-kill-job) ; (define-key meta-mode-map "\C-c\C-l" 'meta-recenter-output) ) -(easy-menu-define +(easy-menu-define meta-mode-menu meta-mode-map "Menu used in Metafont or MetaPost mode." (list "Meta" @@ -963,15 +963,15 @@ The environment marked is the one that contains point or follows point." "--" ["Indent Line" meta-indent-line t] ["Indent Environment" meta-indent-defun t] - ["Indent Region" meta-indent-region + ["Indent Region" meta-indent-region :active (meta-mark-active)] ["Indent Buffer" meta-indent-buffer t] "--" ["Comment Out Environment" meta-comment-defun t] ["Uncomment Environment" meta-uncomment-defun t] - ["Comment Out Region" meta-comment-region + ["Comment Out Region" meta-comment-region :active (meta-mark-active)] - ["Uncomment Region" meta-uncomment-region + ["Uncomment Region" meta-uncomment-region :active (meta-mark-active)] "--" ["Complete Symbol" meta-complete-symbol t] @@ -1019,9 +1019,9 @@ The environment marked is the one that contains point or follows point." (make-local-variable 'paragraph-start) (make-local-variable 'paragraph-separate) - (setq paragraph-start + (setq paragraph-start (concat page-delimiter "\\|$")) - (setq paragraph-separate + (setq paragraph-separate (concat page-delimiter "\\|$")) (make-local-variable 'paragraph-ignore-fill-prefix) diff --git a/lisp/progmodes/modula2.el b/lisp/progmodes/modula2.el index 15b716feaec..81e5653275f 100644 --- a/lisp/progmodes/modula2.el +++ b/lisp/progmodes/modula2.el @@ -1,6 +1,6 @@ ;;; modula2.el --- Modula-2 editing support package -;; Author: Michael Schmidt <michael@pbinfo.UUCP> +;; Author: Michael Schmidt <michael@pbinfo.UUCP> ;; Tom Perrine <Perrin@LOGICON.ARPA> ;; Maintainer: FSF ;; Keywords: languages @@ -104,11 +104,11 @@ (define-key map "\C-c\C-c" 'm2-compile) (setq m2-mode-map map))) -(defcustom m2-indent 5 +(defcustom m2-indent 5 "*This variable gives the indentation in Modula-2-Mode." :type 'integer :group 'modula2) - + ;;;###autoload (defun modula-2-mode () "This is a mode intended to support program development in Modula-2. @@ -429,7 +429,7 @@ followed by the first character of the construct. (defun m2-stdio () (interactive) (insert " -FROM TextIO IMPORT +FROM TextIO IMPORT WriteCHAR, ReadCHAR, WriteINTEGER, ReadINTEGER, WriteCARDINAL, ReadCARDINAL, WriteBOOLEAN, ReadBOOLEAN, WriteREAL, ReadREAL, WriteBITSET, ReadBITSET, diff --git a/lisp/progmodes/octave-hlp.el b/lisp/progmodes/octave-hlp.el index 4250797a799..9291392b41d 100644 --- a/lisp/progmodes/octave-hlp.el +++ b/lisp/progmodes/octave-hlp.el @@ -80,7 +80,7 @@ If KEY is not a string, prompt for it with completion." The files specified by `octave-help-files' are searched." (if octave-help-lookup-alist () - (message "Building help lookup alist...") + (message "Building help lookup alist...") (let ((files octave-help-files) file key node) (save-window-excursion (while files @@ -127,7 +127,7 @@ The files specified by `octave-help-files' are searched." (add-to-list 'octave-help-completion-alist (cons (car entry) (car entry))) (setq alist (cdr alist)))) - (message "Building help completion alist...done")) + (message "Building help completion alist...done")) octave-help-completion-alist) ;;; provide ourself diff --git a/lisp/progmodes/octave-inf.el b/lisp/progmodes/octave-inf.el index 1274c3eff31..bedc1a86aa8 100644 --- a/lisp/progmodes/octave-inf.el +++ b/lisp/progmodes/octave-inf.el @@ -116,7 +116,7 @@ the regular expression `comint-prompt-regexp', a buffer local variable." "Non-nil means that `inferior-octave-complete' is impossible.") (defvar inferior-octave-dynamic-complete-functions - '(inferior-octave-complete comint-dynamic-complete-filename) + '(inferior-octave-complete comint-dynamic-complete-filename) "List of functions called to perform completion for inferior Octave. This variable is used to initialize `comint-dynamic-complete-functions' in the Inferior Octave buffer.") @@ -138,12 +138,12 @@ Entry to this mode successively runs the hooks `comint-mode-hook' and (use-local-map inferior-octave-mode-map) (set-syntax-table inferior-octave-mode-syntax-table) - (make-local-variable 'comment-start) + (make-local-variable 'comment-start) (setq comment-start octave-comment-start) (make-local-variable 'comment-end) (setq comment-end "") (make-local-variable 'comment-column) - (setq comment-column 32) + (setq comment-column 32) (make-local-variable 'comment-start-skip) (setq comment-start-skip octave-comment-start-skip) @@ -227,7 +227,7 @@ startup file, `~/.emacs-octave'." (setq commands (list "page_screen_output = 0;\n" (if (not (string-equal - inferior-octave-output-string ">> ")) + inferior-octave-output-string ">> ")) "PS1=\"\\\\s> \";\n") (if (file-exists-p file) (format "source (\"%s\");\n" file)))) diff --git a/lisp/progmodes/octave-mod.el b/lisp/progmodes/octave-mod.el index 47d16fb3944..23a0cda0355 100644 --- a/lisp/progmodes/octave-mod.el +++ b/lisp/progmodes/octave-mod.el @@ -51,7 +51,7 @@ (defvar inferior-octave-receive-in-progress nil) (defconst octave-maintainer-address - "Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>, bug-gnu-emacs@gnu.org" + "Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>, bug-gnu-emacs@gnu.org" "Current maintainer of the Emacs Octave package.") (defvar octave-abbrev-table nil @@ -207,19 +207,19 @@ parenthetical grouping.") (define-key map "\n" 'octave-reindent-then-newline-and-indent) (define-key map "\t" 'indent-according-to-mode) (define-key map "\e;" 'octave-indent-for-comment) - (define-key map "\e\n" 'octave-indent-new-comment-line) + (define-key map "\e\n" 'octave-indent-new-comment-line) (define-key map "\e\t" 'octave-complete-symbol) (define-key map "\M-\C-a" 'octave-beginning-of-defun) (define-key map "\M-\C-e" 'octave-end-of-defun) (define-key map "\M-\C-h" 'octave-mark-defun) - (define-key map "\M-\C-q" 'octave-indent-defun) + (define-key map "\M-\C-q" 'octave-indent-defun) (define-key map "\C-c;" 'octave-comment-region) - (define-key map "\C-c:" 'octave-uncomment-region) + (define-key map "\C-c:" 'octave-uncomment-region) (define-key map "\C-c\C-b" 'octave-submit-bug-report) (define-key map "\C-c\C-p" 'octave-previous-code-line) (define-key map "\C-c\C-n" 'octave-next-code-line) (define-key map "\C-c\C-a" 'octave-beginning-of-line) - (define-key map "\C-c\C-e" 'octave-end-of-line) + (define-key map "\C-c\C-e" 'octave-end-of-line) (define-key map "\C-c\M-\C-n" 'octave-forward-block) (define-key map "\C-c\M-\C-p" 'octave-backward-block) (define-key map "\C-c\M-\C-u" 'octave-backward-up-block) @@ -231,14 +231,14 @@ parenthetical grouping.") (define-key map "\C-c\C-il" 'octave-send-line) (define-key map "\C-c\C-ib" 'octave-send-block) (define-key map "\C-c\C-if" 'octave-send-defun) - (define-key map "\C-c\C-ir" 'octave-send-region) + (define-key map "\C-c\C-ir" 'octave-send-region) (define-key map "\C-c\C-is" 'octave-show-process-buffer) (define-key map "\C-c\C-ih" 'octave-hide-process-buffer) (define-key map "\C-c\C-ik" 'octave-kill-process) (define-key map "\C-c\C-i\C-l" 'octave-send-line) (define-key map "\C-c\C-i\C-b" 'octave-send-block) (define-key map "\C-c\C-i\C-f" 'octave-send-defun) - (define-key map "\C-c\C-i\C-r" 'octave-send-region) + (define-key map "\C-c\C-i\C-r" 'octave-send-region) (define-key map "\C-c\C-i\C-s" 'octave-show-process-buffer) (define-key map "\C-c\C-i\C-h" 'octave-hide-process-buffer) (define-key map "\C-c\C-i\C-k" 'octave-kill-process) @@ -383,7 +383,7 @@ end keywords as associated values.") "Alist of Octave symbols for completion in Octave mode. Each element looks like (VAR . VAR), where the car and cdr are the same symbol (an Octave command or variable name). -Currently, only builtin variables can be completed.") +Currently, only builtin variables can be completed.") (defvar octave-mode-imenu-generic-expression (list @@ -516,16 +516,16 @@ including a reproducible test case and send the message." (setq mode-name "Octave") (setq local-abbrev-table octave-abbrev-table) (set-syntax-table octave-mode-syntax-table) - + (make-local-variable 'indent-line-function) (setq indent-line-function 'octave-indent-line) - (make-local-variable 'comment-start) + (make-local-variable 'comment-start) (setq comment-start octave-comment-start) (make-local-variable 'comment-end) (setq comment-end "") (make-local-variable 'comment-column) - (setq comment-column 32) + (setq comment-column 32) (make-local-variable 'comment-start-skip) (setq comment-start-skip "\\s<+\\s-*") (make-local-variable 'comment-indent-function) @@ -566,7 +566,7 @@ including a reproducible test case and send the message." (describe-function major-mode)) (defun octave-point (position) - "Returns the value of point at certain positions." + "Returns the value of point at certain positions." (save-excursion (cond ((eq position 'bol) (beginning-of-line)) @@ -644,7 +644,7 @@ See `comment-region'." (interactive "r\nP") (let ((comment-start (char-to-string octave-comment-char))) (comment-region beg end arg))) - + (defun octave-uncomment-region (beg end &optional arg) "Uncomment each line in the region as Octave code." (interactive "r\nP") @@ -741,7 +741,7 @@ level." "Maybe insert and indent an Octave comment. If there is no comment already on this line, create a code-level comment \(started by two comment characters) if the line is empty, or an in-line -comment (started by one comment character) otherwise. +comment (started by one comment character) otherwise. Point is left after the start of the comment which is properly aligned." (interactive) (indent-for-comment) @@ -767,8 +767,8 @@ fixed goal column." (defun octave-indent-new-comment-line () "Break Octave line at point, continuing comment if within one. If within code, insert `octave-continuation-string' before breaking the -line. If within a string, signal an error. -The new line is properly indented." +line. If within a string, signal an error. +The new line is properly indented." (interactive) (delete-horizontal-space) (cond @@ -808,7 +808,7 @@ On success, return 0. Otherwise, go as far as possible and return -1." (setq n (forward-line inc))) (setq arg (- arg inc))) n)) - + (defun octave-previous-code-line (&optional arg) "Move ARG lines of Octave code backward (forward if ARG is negative). Skips past all empty and comment lines. Default for ARG is 1. @@ -863,7 +863,7 @@ does not end in `...' or `\\' or is inside an open parenthesis list." (looking-at octave-continuation-regexp))) (zerop (forward-line 1))))) (end-of-line))) - + (defun octave-scan-blocks (from count depth) "Scan from character number FROM by COUNT Octave begin-end blocks. Returns the character number of the position thus found. @@ -1068,7 +1068,7 @@ An end of a function occurs right after the end keyword matching the (interactive "p") (or arg (setq arg 1)) (and (< arg 0) (skip-syntax-backward "w")) - (and (> arg 0) (skip-syntax-forward "w")) + (and (> arg 0) (skip-syntax-forward "w")) (if (octave-in-defun-p) (setq arg (- arg 1))) (if (= arg 0) (setq arg -1)) @@ -1091,7 +1091,7 @@ The function marked is the one containing point or following point." (exchange-point-and-mark)) (goto-char pos) (message "No function to mark found")))) - + ;;; Filling (defun octave-auto-fill () @@ -1101,7 +1101,7 @@ otherwise." (let (fc give-up) (if (or (null (setq fc (current-fill-column))) (save-excursion - (beginning-of-line) + (beginning-of-line) (and auto-fill-inhibit-regexp (looking-at auto-fill-inhibit-regexp)))) nil ; Can't do anything @@ -1158,7 +1158,7 @@ otherwise." (defun octave-fill-paragraph (&optional arg) "Fill paragraph of Octave code, handling Octave comments." (interactive "P") - (save-excursion + (save-excursion (let ((end (progn (forward-paragraph) (point))) (beg (progn (forward-paragraph -1) @@ -1263,7 +1263,7 @@ variables." (let ((list (all-completions string octave-completion-alist)) (conf (current-window-configuration))) ;; Taken from comint.el - (message "Making completion list...") + (message "Making completion list...") (with-output-to-temp-buffer "*Completions*" (display-completion-list list)) (message "Hit space to flush") @@ -1284,7 +1284,7 @@ variables." (set-window-configuration conf) (setq unread-command-events (listify-key-sequence key)))))))))) - + ;;; Electric characters && friends (defun octave-reindent-then-newline-and-indent () @@ -1383,21 +1383,21 @@ entered without parens)." (indent-according-to-mode) (newline 2) (insert prefix "usage: " string) - (reindent-then-newline-and-indent) + (reindent-then-newline-and-indent) (insert prefix) - (reindent-then-newline-and-indent) + (reindent-then-newline-and-indent) (insert prefix) (indent-according-to-mode) (save-excursion (newline 2) (insert "endfunction") (indent-according-to-mode)))) - + ;;; Menu (defun octave-add-octave-menu () "Adds the `Octave' menu to the menu bar in Octave mode." - (require 'easymenu) + (require 'easymenu) (easy-menu-define octave-mode-menu-map octave-mode-map "Menu keymap for Octave mode." octave-mode-menu) (easy-menu-add octave-mode-menu-map octave-mode-map)) @@ -1431,7 +1431,7 @@ entered without parens)." (defun octave-send-region (beg end) "Send current region to the inferior Octave process." (interactive "r") - (inferior-octave t) + (inferior-octave t) (let ((proc inferior-octave-process) (string (buffer-substring-no-properties beg end)) line) @@ -1459,7 +1459,7 @@ entered without parens)." (display-buffer inferior-octave-buffer))) (defun octave-send-block () - "Send current Octave block to the inferior Octave process." + "Send current Octave block to the inferior Octave process." (interactive) (save-excursion (octave-mark-block) @@ -1498,7 +1498,7 @@ code line." (print-escape-newlines nil) (opoint (point))) (terpri) - (prin1 + (prin1 (save-excursion (forward-sexp -1) (inferior-octave-send-list-and-digest diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el index dd718217ec6..debe52ed6f3 100644 --- a/lisp/progmodes/pascal.el +++ b/lisp/progmodes/pascal.el @@ -43,7 +43,7 @@ ;; pascal-auto-endcomments t ;; pascal-auto-lineup '(all) ;; pascal-toggle-completions nil -;; pascal-type-keywords '("array" "file" "packed" "char" +;; pascal-type-keywords '("array" "file" "packed" "char" ;; "integer" "real" "string" "record") ;; pascal-start-keywords '("begin" "end" "function" "procedure" ;; "repeat" "until" "while" "read" "readln" @@ -104,9 +104,9 @@ "Imenu expression for Pascal-mode. See `imenu-generic-expression'.") (defvar pascal-keywords - '("and" "array" "begin" "case" "const" "div" "do" "downto" "else" "end" - "file" "for" "function" "goto" "if" "in" "label" "mod" "nil" "not" "of" - "or" "packed" "procedure" "program" "record" "repeat" "set" "then" "to" + '("and" "array" "begin" "case" "const" "div" "do" "downto" "else" "end" + "file" "for" "function" "goto" "if" "in" "label" "mod" "nil" "not" "of" + "or" "packed" "procedure" "program" "record" "repeat" "set" "then" "to" "type" "until" "var" "while" "with" ;; The following are not standard in pascal, but widely used. "get" "put" "input" "output" "read" "readln" "reset" "rewrite" "write" @@ -138,7 +138,7 @@ () (setq pascal-mode-syntax-table (make-syntax-table)) (modify-syntax-entry ?\\ "." pascal-mode-syntax-table) - (modify-syntax-entry ?( "()1" pascal-mode-syntax-table) + (modify-syntax-entry ?( "()1" pascal-mode-syntax-table) (modify-syntax-entry ?) ")(4" pascal-mode-syntax-table) (modify-syntax-entry ?* ". 23b" pascal-mode-syntax-table) (modify-syntax-entry ?{ "<" pascal-mode-syntax-table) @@ -283,8 +283,8 @@ are handled in another way, and should not be added to this list." (defun pascal-declaration-end () (let ((nest 1)) (while (and (> nest 0) - (re-search-forward - "[:=]\\|\\(\\<record\\>\\)\\|\\(\\<end\\>\\)" + (re-search-forward + "[:=]\\|\\(\\<record\\>\\)\\|\\(\\<end\\>\\)" (save-excursion (end-of-line 2) (point)) t)) (cond ((match-beginning 1) (setq nest (1+ nest))) ((match-beginning 2) (setq nest (1- nest))) @@ -300,7 +300,7 @@ are handled in another way, and should not be added to this list." ((match-beginning 3) (setq nest (1+ nest))))) (= nest 0))) - + (defsubst pascal-within-string () (save-excursion (nth 3 (parse-partial-sexp (pascal-get-beg-of-line) (point))))) @@ -420,7 +420,7 @@ no args, if that value is non-nil." (search-forward "*)" (pascal-get-end-of-line) t)))) (setq setstar t)))) ;; If last line was a star comment line then this one shall be too. - (if (null setstar) + (if (null setstar) (pascal-indent-line) (insert "* ")))) @@ -602,7 +602,7 @@ area. See also `pascal-comment-area'." (if (not (looking-at (concat "\\s \\|\\s)\\|" pascal-defun-re))) (forward-sexp 1)) (let ((nest 0) (max -1) (func 0) - (reg (concat pascal-beg-block-re "\\|" + (reg (concat pascal-beg-block-re "\\|" pascal-end-block-re "\\|" pascal-defun-re))) (while (re-search-backward reg nil 'move) @@ -634,7 +634,7 @@ area. See also `pascal-comment-area'." (pascal-beg-of-defun)) (forward-char 1) (let ((nest 0) (func 1) - (reg (concat pascal-beg-block-re "\\|" + (reg (concat pascal-beg-block-re "\\|" pascal-end-block-re "\\|" pascal-defun-re))) (while (and (/= func 0) @@ -686,7 +686,7 @@ area. See also `pascal-comment-area'." (catch 'found (while t (re-search-forward regexp nil 'move) - (setq nest (if (match-end 1) + (setq nest (if (match-end 1) (1+ nest) (1- nest))) (cond ((eobp) @@ -939,7 +939,7 @@ Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)." ))))) ;; Return type of block and indent level. - (if (> par 0) ; Unclosed Parenthesis + (if (> par 0) ; Unclosed Parenthesis (list 'contexp par) (list type (pascal-indent-level)))))) @@ -974,7 +974,7 @@ Do not count labels, case-statements or records." (ind 0)) ;; Get right indent (while (< (point) end) - (if (re-search-forward + (if (re-search-forward "^[ \t]*[^ \t,:]+[ \t]*\\(,[ \t]*[^ \t,:]+[ \t]*\\)*:" (marker-position end) 'move) (forward-char -1)) @@ -1010,7 +1010,7 @@ indent of the current line in parameterlist." (let* ((oldpos (point)) (stpos (progn (goto-char (scan-lists (point) -1 1)) (point))) (stcol (1+ (current-column))) - (edpos (progn (pascal-declaration-end) + (edpos (progn (pascal-declaration-end) (search-backward ")" (pascal-get-beg-of-line) t) (point))) (usevar (re-search-backward "\\<var\\>" stpos t))) @@ -1032,7 +1032,7 @@ indent of the current line in parameterlist." (let ((pos (point-marker))) (if (and (not (or arg start)) (not (pascal-declaration-beg))) () - (let ((lineup (if (or (looking-at "\\<var\\>\\|\\<record\\>") arg start) + (let ((lineup (if (or (looking-at "\\<var\\>\\|\\<record\\>") arg start) ":" "=")) (stpos (if start start (forward-word 2) (backward-word 1) (point))) @@ -1108,7 +1108,7 @@ indent of the current line in parameterlist." (end-of-line) (skip-chars-backward " \t") (1+ (current-column)))))) - + ;;; @@ -1146,7 +1146,7 @@ indent of the current line in parameterlist." (t "\\<\\(function\\|procedure\\)\\s +")) "\\<\\(" pascal-str "[a-zA-Z0-9_.]*\\)\\>")) match) - + (if (not (looking-at "\\<\\(function\\|procedure\\)\\>")) (re-search-backward "\\<\\(function\\|procedure\\)\\>" nil t)) (forward-char 1) @@ -1171,8 +1171,8 @@ indent of the current line in parameterlist." (while (< (point) end) (if (re-search-forward "[:=]" (pascal-get-end-of-line) t) ;; Traverse current line - (while (and (re-search-backward - (concat "\\((\\|\\<\\(var\\|type\\|const\\)\\>\\)\\|" + (while (and (re-search-backward + (concat "\\((\\|\\<\\(var\\|type\\|const\\)\\>\\)\\|" pascal-symbol-re) (pascal-get-beg-of-line) t) (not (match-end 1))) @@ -1232,7 +1232,7 @@ indent of the current line in parameterlist." (defun pascal-keyword-completion (keyword-list) "Give list of all possible completions of keywords in KEYWORD-LIST." - (mapcar '(lambda (s) + (mapcar '(lambda (s) (if (string-match (concat "\\<" pascal-str) s) (if (or (null pascal-pred) (funcall pascal-pred s)) @@ -1283,7 +1283,7 @@ indent of the current line in parameterlist." (save-excursion (pascal-var-completion)) (pascal-func-completion 'function) (pascal-keyword-completion pascal-separator-keywords)))) - + ;; Now we have built a list of all matches. Give response to caller (pascal-completion-response)))) @@ -1352,7 +1352,7 @@ indent of the current line in parameterlist." (progn ;; Update entry number in list (setq pascal-last-completions allcomp - pascal-last-word-numb + pascal-last-word-numb (if (>= pascal-last-word-numb (1- (length allcomp))) 0 (1+ pascal-last-word-numb))) @@ -1374,7 +1374,7 @@ indent of the current line in parameterlist." (if (not (null (cdr allcomp))) (message "(Complete but not unique)") (message "(Sole completion)"))) - ;; Display buffer if the current completion didn't help + ;; Display buffer if the current completion didn't help ;; on completing the label. ((and (not (null (cdr allcomp))) (= (length pascal-str) (length match))) @@ -1447,7 +1447,7 @@ With optional second arg non-nil, STR is the complete name of the instruction." (setq pascal-str (pascal-build-defun-re "[a-zA-Z_]")) (setq pascal-str (pascal-build-defun-re pascal-str))) (goto-char (point-min)) - + ;; Build a list of all possible completions (while (re-search-forward pascal-str nil t) (setq match (buffer-substring (match-beginning 2) (match-end 2))) @@ -1547,7 +1547,7 @@ Pascal Outline mode provides some additional commands. (defun pascal-outline-change (b e pascal-flag) (let ((modp (buffer-modified-p))) (unwind-protect - (subst-char-in-region b e (if (= pascal-flag ?\n) + (subst-char-in-region b e (if (= pascal-flag ?\n) ?\^M ?\n) pascal-flag) (set-buffer-modified-p modp)))) diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 5eaee97e74f..b5027ee3841 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -96,7 +96,7 @@ ;; /{/; while (<${glob_me}>) ;; but a simpler solution is to add a space between the $ and the {: ;; while (<$ {glob_me}>) -;; +;; ;; Problem 7 is even worse, but this 'fix' does work :-( ;; $DB'stop#' ;; [$DB'line#' @@ -337,7 +337,7 @@ The expansion is entirely correct because it uses the C preprocessor." (put-text-property (point) (progn (forward-comment (point-max)) (point)) 'font-lock-multiline t) - ;; + ;; (unless (save-excursion (let* ((char2 (char-after)) @@ -365,7 +365,7 @@ The expansion is entirely correct because it uses the C preprocessor." ;; ;; FIXME: `end' is accessed via dyn-scoping. ;; pos (min end (1- (point))) nil '(nil)) ;; nil))))))) - + (defcustom perl-indent-level 4 "*Indentation of Perl statements with respect to containing block." @@ -435,7 +435,7 @@ Variables controlling indentation style: regardless of where in the line point is when the TAB command is used. `perl-tab-to-comment' Non-nil means that for lines which don't need indenting, TAB will - either delete an empty comment, indent an existing comment, move + either delete an empty comment, indent an existing comment, move to end-of-line, or if at end-of-line already, create a new comment. `perl-nochange' Lines starting with this regular expression are not auto-indented. @@ -535,7 +535,7 @@ If at end-of-line, and not in a comment or a quote, correct the's indentation." (or (/= last-command-char ?:) ;; Colon is special only after a label .... (looking-at "\\s-*\\(\\w\\|\\s_\\)+$")) - (let ((pps (parse-partial-sexp + (let ((pps (parse-partial-sexp (perl-beginning-of-function) insertpos))) (not (or (nth 3 pps) (nth 4 pps) (nth 5 pps)))))) (progn ; must insert, indent, delete @@ -622,7 +622,7 @@ possible action from the following list: (defun perl-indent-line (&optional nochange parse-start) "Indent current line as Perl code. -Return the amount the indentation +Return the amount the indentation changed by, or (parse-state) if line starts in a quoted string." (let ((case-fold-search nil) (pos (- (point-max) (point))) @@ -850,7 +850,7 @@ Optional argument PARSE-START should be the position of `beginning-of-defun'." (while (< (point) (marker-position last-mark)) (setq delta (perl-indent-line nil (marker-position bof-mark))) (if (numberp delta) ; unquoted start-of-line? - (progn + (progn (if (eolp) (delete-horizontal-space)) (setq lsexp-mark (point-marker)))) diff --git a/lisp/progmodes/simula.el b/lisp/progmodes/simula.el index ab3e9547120..6737e6a9dc5 100644 --- a/lisp/progmodes/simula.el +++ b/lisp/progmodes/simula.el @@ -77,7 +77,7 @@ If value is a list, each line in a multipleline continued statement will have the car of the list extra indentation with respect to the previous line of the statement.") -(defcustom simula-continued-statement-offset +(defcustom simula-continued-statement-offset simula-continued-statement-offset-default "*Extra indentation for lines not starting a statement or substatement. If value is a list, each line in a multipleline continued statement @@ -201,7 +201,7 @@ for SIMULA mode to function correctly." "spect\\)\\)\\|l\\([et]\\|abel\\)\\|n\\(ew?\\|ot\\)\\|" "o\\(r\\|therwise\\)\\|pr\\(ior\\|otected\\)\\|qua\\|" "reactivate\\|s\\(tep\\|witch\\)\\|t\\(h\\(en\\|is\\)\\|o\\)\\|" - "until\\|virtual\\|wh\\(en\\|ile\\)" + "until\\|virtual\\|wh\\(en\\|ile\\)" "\\)\\>") ;; ;; Types. @@ -496,7 +496,7 @@ at all." (simula-indent-line)) (forward-line 1))) (and end (set-marker end nil)))))) - + (defun simula-indent-line () "Indent this line as SIMULA code. @@ -728,7 +728,7 @@ The relative indentation among the lines of the statement are preserved." (delete-horizontal-space) (indent-to amount))) (goto-char (- (point-max) origin))))) - + (defun simula-backward-up-level (count) "Move backward up COUNT block levels. @@ -797,7 +797,7 @@ If COUNT is negative, move backward down block level instead." (goto-char origin) (signal 'quit nil)))))) - + (defun simula-previous-statement (count) "Move backward COUNT statements. If COUNT is negative, move forward instead." @@ -808,7 +808,7 @@ If COUNT is negative, move forward instead." (case-fold-search t) (origin (point))) (condition-case () - ;; + ;; (progn (simula-skip-comment-backward) (if (memq (preceding-char) '(?n ?N)) @@ -1104,7 +1104,7 @@ If COUNT is negative, move backward instead." ;; (at or before comment or label) ;; temp = t means finished (setq temp - (and (not (simula-context)) + (and (not (simula-context)) (save-excursion (skip-chars-forward " \t\f") (or (looking-at "virtual") @@ -1443,7 +1443,7 @@ If not nil and not t, move to limit of search and return nil." nil (signal 'search-failed (list regexp)))))) - + (defun simula-install-standard-abbrevs () "Define Simula keywords, procedures and classes in local abbrev table." ;; procedure and class names are as of the SIMULA 87 standard. diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el index 38867b96ec8..dedf0c4b664 100644 --- a/lisp/progmodes/tcl.el +++ b/lisp/progmodes/tcl.el @@ -6,7 +6,7 @@ ;; Author: Tom Tromey <tromey@redhat.com> ;; Chris Lindblad <cjl@lcs.mit.edu> ;; Keywords: languages tcl modes -;; Version: $Revision: 1.69 $ +;; Version: $Revision: 1.70 $ ;; This file is part of GNU Emacs. @@ -318,7 +318,7 @@ have three inferior Lisps running: If you do a \\[tcl-eval-defun] command on some Lisp source code, what process do you send it to? -- If you're in a process buffer (foo, bar, or *inferior-tcl*), +- If you're in a process buffer (foo, bar, or *inferior-tcl*), you send it to that process. - If you're in some other buffer (e.g., a source file), you send it to the process attached to buffer `inferior-tcl-buffer'. @@ -494,7 +494,7 @@ Uses variables `tcl-proc-regexp' and `tcl-keyword-list'." ;; FIXME consider using "not word or symbol", not ;; "whitespace". (cons (concat "\\(\\s-\\|^\\)" - ;; FIXME Use regexp-quote? + ;; FIXME Use regexp-quote? (regexp-opt tcl-keyword-list t) "\\(\\s-\\|$\\)") 2)))) @@ -573,7 +573,7 @@ Commands: (set (make-local-variable 'imenu-generic-expression) 'tcl-imenu-generic-expression) - + ;; Settings for new dabbrev code. (set (make-local-variable 'dabbrev-case-fold-search) nil) (set (make-local-variable 'dabbrev-case-replace) nil) @@ -789,7 +789,7 @@ Returns nil if line starts inside a string, t if in a comment." (beginning-of-line) (let* ((indent-point (point)) (case-fold-search nil) - (continued-line + (continued-line (save-excursion (if (bobp) nil @@ -937,13 +937,13 @@ Returns nil if line starts inside a string, t if in a comment." contain-stack (cons nil contain-stack) last-depth (1+ last-depth))) (if (null (car contain-stack)) - (setcar contain-stack + (setcar contain-stack (or (car (cdr state)) (save-excursion (forward-sexp -1) (point))))) (forward-line 1) - (setq continued-line + (setq continued-line (save-excursion (backward-char) (= (preceding-char) ?\\))) @@ -969,14 +969,14 @@ Returns nil if line starts inside a string, t if in a comment." (setq this-indent (- this-indent 1)))) ;; Put chosen indentation into effect. (or (null this-indent) - (= (current-column) - (if continued-line + (= (current-column) + (if continued-line (+ this-indent tcl-indent-level) this-indent)) (progn (delete-region (point) (progn (beginning-of-line) (point))) - (indent-to - (if continued-line + (indent-to + (if continued-line (+ this-indent tcl-indent-level) this-indent))))))))) ) diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index 5b9091c8f3e..9827ad3696e 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -605,7 +605,7 @@ begin -- process <label> <cursor> elsif <clock>'event and <clock> = '1' then -- rising clock edge if <enable> = '1' then -- synchronous load - + end if; end if; end process <label>;" |