summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautogen/configure12
-rw-r--r--doc/emacs/ChangeLog14
-rw-r--r--doc/emacs/building.texi436
-rw-r--r--doc/emacs/emacs.texi2
-rw-r--r--doc/lispref/ChangeLog7
-rw-r--r--doc/lispref/elisp.texi4
-rw-r--r--doc/lispref/internals.texi4
-rw-r--r--doc/lispref/nonascii.texi2
-rw-r--r--doc/lispref/vol1.texi6
-rw-r--r--doc/lispref/vol2.texi4
-rw-r--r--doc/lispref/windows.texi34
-rw-r--r--doc/misc/calc.texi6
-rw-r--r--doc/misc/cc-mode.texi2
-rw-r--r--doc/misc/dbus.texi2
-rw-r--r--doc/misc/ebrowse.texi2
-rw-r--r--doc/misc/emacs-mime.texi2
-rw-r--r--doc/misc/gnus-faq.texi2
-rw-r--r--doc/misc/gnus.texi4
-rw-r--r--doc/misc/tramp.texi4
-rw-r--r--etc/NEWS3
-rw-r--r--etc/srecode/el.srt2
-rw-r--r--lib-src/ChangeLog2
-rw-r--r--lisp/ChangeLog95
-rw-r--r--lisp/ChangeLog.132
-rw-r--r--lisp/ChangeLog.152
-rw-r--r--lisp/ChangeLog.32
-rw-r--r--lisp/ChangeLog.714
-rw-r--r--lisp/calc/calc-poly.el26
-rw-r--r--lisp/cedet/semantic/bovine/el.el8
-rw-r--r--lisp/cedet/semantic/find.el2
-rw-r--r--lisp/cedet/semantic/grammar.el2
-rw-r--r--lisp/cedet/semantic/wisent/comp.el2
-rw-r--r--lisp/cedet/srecode/srt-mode.el2
-rw-r--r--lisp/comint.el2
-rw-r--r--lisp/delim-col.el14
-rw-r--r--lisp/emulation/cua-base.el2
-rw-r--r--lisp/epa-dired.el2
-rw-r--r--lisp/epa-file.el4
-rw-r--r--lisp/erc/ChangeLog.038
-rw-r--r--lisp/eshell/em-dirs.el2
-rw-r--r--lisp/forms.el2
-rw-r--r--lisp/gnus/ChangeLog96
-rw-r--r--lisp/gnus/plstore.el2
-rw-r--r--lisp/ibuf-ext.el2
-rw-r--r--lisp/ibuffer.el2
-rw-r--r--lisp/international/mule-util.el2
-rw-r--r--lisp/mail/emacsbug.el2
-rw-r--r--lisp/net/ange-ftp.el2
-rw-r--r--lisp/net/dbus.el2
-rw-r--r--lisp/net/tramp-sh.el6
-rw-r--r--lisp/net/xesam.el2
-rw-r--r--lisp/obsolete/old-whitespace.el8
-rw-r--r--lisp/org/ChangeLog2
-rw-r--r--lisp/org/org.el6
-rw-r--r--lisp/proced.el2
-rw-r--r--lisp/progmodes/ada-mode.el6
-rw-r--r--lisp/progmodes/ada-xref.el2
-rw-r--r--lisp/progmodes/cc-awk.el8
-rw-r--r--lisp/progmodes/cc-cmds.el2
-rw-r--r--lisp/progmodes/cc-engine.el230
-rw-r--r--lisp/progmodes/cc-fonts.el5
-rw-r--r--lisp/progmodes/cc-langs.el12
-rw-r--r--lisp/progmodes/cc-mode.el6
-rw-r--r--lisp/progmodes/gdb-mi.el3
-rw-r--r--lisp/progmodes/grep.el2
-rw-r--r--lisp/progmodes/gud.el4
-rw-r--r--lisp/progmodes/hideif.el2
-rw-r--r--lisp/progmodes/inf-lisp.el2
-rw-r--r--lisp/progmodes/make-mode.el58
-rw-r--r--lisp/progmodes/pascal.el1
-rw-r--r--lisp/progmodes/vhdl-mode.el18
-rw-r--r--lisp/ses.el288
-rw-r--r--lisp/shell.el2
-rw-r--r--lisp/url/url-cookie.el2
-rw-r--r--lisp/url/url-vars.el1
-rw-r--r--lisp/window.el8
-rw-r--r--src/ChangeLog16
-rw-r--r--src/ChangeLog.106
-rw-r--r--src/ChangeLog.26
-rw-r--r--src/alloc.c2
-rw-r--r--src/coding.c11
-rw-r--r--src/editfns.c2
-rw-r--r--src/emacs.c2
-rw-r--r--src/fontset.c2
-rw-r--r--src/ftfont.c2
-rw-r--r--src/lastfile.c3
-rw-r--r--src/lread.c2
-rw-r--r--src/nsfont.m2
-rw-r--r--src/region-cache.c4
-rw-r--r--src/region-cache.h4
-rw-r--r--src/termhooks.h4
-rw-r--r--src/window.c17
-rw-r--r--src/xfns.c8
-rw-r--r--test/indent/pascal.pas1088
94 files changed, 2003 insertions, 725 deletions
diff --git a/autogen/configure b/autogen/configure
index 9dc6dd9ad34..c24266ebe6d 100755
--- a/autogen/configure
+++ b/autogen/configure
@@ -8353,9 +8353,9 @@ $as_echo "no" >&6; }
if test $HAVE_ALSA = yes; then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CFLAGS="$ALSA_CFLAGS $CFLAGS"
- LDFLAGS="$ALSA_LIBS $LDFLAGS"
+ LIBS="$ALSA_LIBS $LIBS"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <asoundlib.h>
@@ -8398,7 +8398,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
LIBSOUND="$LIBSOUND $ALSA_LIBS"
CFLAGS_SOUND="$CFLAGS_SOUND $ALSA_CFLAGS"
@@ -11567,9 +11567,9 @@ fi
if test "$HAVE_GSETTINGS" = "yes" || test "$HAVE_GCONF" = "yes"; then
SAVE_CFLAGS="$CFLAGS"
- SAVE_LDFLAGS="$LDFLAGS"
+ SAVE_LIBS="$LIBS"
CFLAGS="$SETTINGS_CFLAGS $CFLAGS"
- LDFLAGS="$SETTINGS_LIBS $LDFLAGS"
+ LIBS="$SETTINGS_LIBS $LIBS"
for ac_func in g_type_init
do :
ac_fn_c_check_func "$LINENO" "g_type_init" "ac_cv_func_g_type_init"
@@ -11582,7 +11582,7 @@ fi
done
CFLAGS="$SAVE_CFLAGS"
- LDFLAGS="$SAVE_LDFLAGS"
+ LIBS="$SAVE_LIBS"
fi
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 7661b8c401b..c26f1a7e1ca 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,15 @@
+2011-12-12 Chong Yidong <cyd@gnu.org>
+
+ * building.texi (Executing Lisp): Fix xref for C-M-x.
+ (Lisp Libraries): Add xref to node explaining `load' in Lisp
+ manual. Note that load-path is not customizable.
+ (Lisp Eval): Note that listed commands are available globally.
+ Explain the meaning of "defun" in the C-M-x context.
+ (Lisp Interaction): Copyedits.
+ (External Lisp): Fix name of inferior Lisp buffer. Mention
+ Scheme.
+ (Compilation): Define "inferior process".
+
2011-12-10 Eli Zaretskii <eliz@gnu.org>
* msdog.texi (Windows Fonts): Document how to force GDI font
@@ -1676,7 +1688,7 @@
2009-08-31 Nick Roberts <nickrob@snap.net.nz>
* building.texi (Threads Buffer, Multithreaded Debugging):
- Re-organise these two sections.
+ Reorganize these two sections.
2009-08-29 Eli Zaretskii <eliz@gnu.org>
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 5e2cb8119de..ab4a485cb87 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -24,9 +24,9 @@ assist in the process of compiling and testing programs.
* Executing Lisp:: Various modes for editing Lisp programs,
with different facilities for running
the Lisp programs.
-* Libraries: Lisp Libraries. Creating Lisp programs to run in Emacs.
-* Eval: Lisp Eval. Executing a single Lisp expression in Emacs.
-* Interaction: Lisp Interaction. Executing Lisp in an Emacs buffer.
+* Lisp Libraries:: How Lisp programs are loaded into Emacs.
+* Lisp Eval:: Executing a single Lisp expression in Emacs.
+* Lisp Interaction:: Executing Lisp in an Emacs buffer.
* External Lisp:: Communicating through Emacs with a separate Lisp.
@end menu
@@ -37,10 +37,9 @@ assist in the process of compiling and testing programs.
@cindex compilation errors
@cindex error log
- Emacs can run compilers for languages such as C and Fortran as
-inferior processes, feeding the compilation log into an Emacs buffer.
-It can also parse the error messages and show you where the errors
-occurred.
+ Emacs can run compilers for languages such as C and Fortran, feeding
+the compilation log into an Emacs buffer. It can also parse the error
+messages and show you where the errors occurred.
@table @kbd
@item M-x compile
@@ -56,11 +55,11 @@ Kill the running compilation subprocess.
@findex compile
To run @code{make} or another compilation command, type @kbd{M-x
compile}. This reads a shell command line using the minibuffer, and
-then executes the command in an inferior shell, putting output in the
-buffer named @samp{*compilation*}. The current buffer's default
-directory is used as the working directory for the execution of the
-command; normally, therefore, compilation takes place in this
-directory.
+then executes the command by running a shell as a subprocess (or
+@dfn{inferior process}) of Emacs. The output is inserted in a buffer
+named @samp{*compilation*}. The current buffer's default directory is
+used as the working directory for the execution of the command;
+normally, therefore, compilation takes place in this directory.
@vindex compile-command
The default compilation command is @samp{make -k}, which is usually
@@ -1286,109 +1285,119 @@ that thread.
@node Executing Lisp
@section Executing Lisp Expressions
- Emacs has several different major modes for Lisp and Scheme. They are
-the same in terms of editing commands, but differ in the commands for
-executing Lisp expressions. Each mode has its own purpose.
+ Emacs has major modes for several variants of Lisp. They use the
+same editing commands as other programming language modes
+(@pxref{Programs}). In addition, they provide special commands for
+executing Lisp expressions.
@table @asis
-@item Emacs-Lisp mode
-The mode for editing source files of programs to run in Emacs Lisp.
-This mode defines @kbd{C-M-x} to evaluate the current defun.
-@xref{Lisp Libraries}.
+@item Emacs Lisp mode
+The mode for editing Emacs Lisp source files. It defines @kbd{C-M-x}
+to evaluate the current top-level Lisp expression. @xref{Lisp Eval}.
+
@item Lisp Interaction mode
-The mode for an interactive session with Emacs Lisp. It defines
-@kbd{C-j} to evaluate the sexp before point and insert its value in the
+The mode for an interactive Emacs Lisp session. It defines @kbd{C-j}
+to evaluate the expression before point and insert its value in the
buffer. @xref{Lisp Interaction}.
+
@item Lisp mode
The mode for editing source files of programs that run in Lisps other
-than Emacs Lisp. This mode defines @kbd{C-M-x} to send the current defun
-to an inferior Lisp process. @xref{External Lisp}.
+than Emacs Lisp. It defines @kbd{C-M-x} to evaluate the current
+top-level expression in an external Lisp. @xref{External Lisp}.
+
@item Inferior Lisp mode
-The mode for an interactive session with an inferior Lisp process.
-This mode combines the special features of Lisp mode and Shell mode
-(@pxref{Shell Mode}).
+The mode for an interactive session with an external Lisp which is
+being run as a subprocess (or @dfn{inferior process}) of Emacs.
+@ifnottex
+@xref{External Lisp}.
+@end ifnottex
+
@item Scheme mode
-Like Lisp mode but for Scheme programs.
+Like Lisp mode, but for Scheme programs.
+
@item Inferior Scheme mode
-The mode for an interactive session with an inferior Scheme process.
+Like Inferior Lisp mode, but for Scheme.
@end table
- Most editing commands for working with Lisp programs are in fact
-available globally. @xref{Programs}.
-
@node Lisp Libraries
@section Libraries of Lisp Code for Emacs
@cindex libraries
@cindex loading Lisp code
- Lisp code for Emacs editing commands is stored in files whose names
-conventionally end in @file{.el}. This ending tells Emacs to edit them in
-Emacs-Lisp mode (@pxref{Executing Lisp}).
+ Emacs Lisp code is stored in files whose names conventionally end in
+@file{.el}. Such files are automatically visited in Emacs Lisp mode.
@cindex byte code
Emacs Lisp code can be compiled into byte-code, which loads faster,
-takes up less space, and executes faster. @xref{Byte Compilation,,
-Byte Compilation, elisp, the Emacs Lisp Reference Manual}. By
-convention, the compiled code for a library goes in a separate file
-whose name ends in @samp{.elc}. Thus, the compiled code for
-@file{foo.el} goes in @file{foo.elc}.
+takes up less space, and executes faster. By convention, compiled
+Emacs Lisp code goes in a separate file whose name ends in
+@samp{.elc}. For example, the compiled code for @file{foo.el} goes in
+@file{foo.elc}. @xref{Byte Compilation,, Byte Compilation, elisp, the
+Emacs Lisp Reference Manual}.
@findex load-file
- To execute a file of Emacs Lisp code, use @kbd{M-x load-file}. This
-command reads a file name using the minibuffer and then executes the
-contents of that file as Lisp code. It is not necessary to visit the
-file first; in any case, this command reads the file as found on disk,
-not text in an Emacs buffer.
+ To @dfn{load} an Emacs Lisp file, type @kbd{M-x load-file}. This
+command reads a file name using the minibuffer, and executes the
+contents of that file as Emacs Lisp code. It is not necessary to
+visit the file first; this command reads the file directly from disk,
+not from an existing Emacs buffer.
@findex load
@findex load-library
- Once a file of Lisp code is installed in the Emacs Lisp library
-directories, users can load it using @kbd{M-x load-library}. Programs
-can load it by calling @code{load}, a more primitive function that is
-similar but accepts some additional arguments.
-
- @kbd{M-x load-library} differs from @kbd{M-x load-file} in that it
-searches a sequence of directories and tries three file names in each
-directory. Suppose your argument is @var{lib}; the three names are
-@file{@var{lib}.elc}, @file{@var{lib}.el}, and lastly just
-@file{@var{lib}}. If @file{@var{lib}.elc} exists, it is by convention
-the result of compiling @file{@var{lib}.el}; it is better to load the
-compiled file, since it will load and run faster.
-
- If @code{load-library} finds that @file{@var{lib}.el} is newer than
-@file{@var{lib}.elc} file, it issues a warning, because it's likely
-that somebody made changes to the @file{.el} file and forgot to
-recompile it. Nonetheless, it loads @file{@var{lib}.elc}. This is
-because people often leave unfinished edits the source file, and don't
-recompile it until they think it is ready to use.
+@cindex load path for Emacs Lisp
+ If an Emacs Lisp file is installed in the Emacs Lisp @dfn{load path}
+(defined below), you can load it by typing @kbd{M-x load-library},
+instead of using @kbd{M-x load-file}. The @kbd{M-x load-library}
+command prompts for a @dfn{library name} rather than a file name; it
+searches through each directory in the Emacs Lisp load path, trying to
+find a file matching that library name. If the library name is
+@samp{@var{foo}}, it tries looking for files named
+@file{@var{foo}.elc}, @file{@var{foo}.el}, and lastly just
+@file{@var{foo}}; the first one found is loaded. This command prefers
+@file{.elc} files over @file{.el} files because compiled files load
+and run faster. If it finds that @file{@var{lib}.el} is newer than
+@file{@var{lib}.elc}, it issues a warning, in case someone made
+changes to the @file{.el} file and forgot to recompile it, but loads
+the @file{.elc} file anyway. (Due to this behavior, you can save
+unfinished edits to Emacs Lisp source files, and not recompile until
+your changes are ready for use.)
+
+ Emacs Lisp programs usually load Emacs Lisp files using the
+@code{load} function. This is similar to @code{load-library}, but is
+lower-level and accepts additional arguments. @xref{How Programs Do
+Loading,,, elisp, the Emacs Lisp Reference Manual}.
@vindex load-path
- The variable @code{load-path} specifies the sequence of directories
-searched by @kbd{M-x load-library}. Its value should be a list of
-strings that are directory names; in addition, @code{nil} in this list
-stands for the current default directory. (Generally, it is not a
-good idea to put @code{nil} in the list; if you find yourself wishing
+ The Emacs Lisp load path is specified by the variable
+@code{load-path}. Its value should be a list of directory names
+(strings). These directories are searched, in the specified order, by
+the @kbd{M-x load-library} command, the lower-level @code{load}
+function, and other Emacs functions that find Emacs Lisp libraries. A
+list entry in @code{load-path} can also have the special value
+@code{nil}, which stands for the current default directory, but it is
+almost always a bad idea to use this. (If you find yourself wishing
that @code{nil} were in the list, most likely what you really want is
-to do @kbd{M-x load-file} this once.)
+to use @kbd{M-x load-file}.)
The default value of @code{load-path} is a list of directories where
the Lisp code for Emacs itself is stored. If you have libraries of
-your own, put them in a single directory and add that directory to
-@code{load-path}, by adding a line like this to your init file
-(@pxref{Init File}):
+your own in another directory, you can add that directory to the load
+path. Unlike most other variables described in this manual,
+@code{load-path} cannot be changed via the Customize interface
+(@pxref{Easy Customization}), but you can add a directory to it by
+putting a line like this in your init file (@pxref{Init File}):
@example
-(add-to-list 'load-path "/path/to/lisp/libraries")
+(add-to-list 'load-path "/path/to/my/lisp/library")
@end example
@cindex autoload
- Some commands are @dfn{autoloaded}: when you run them, Emacs will
-automatically load the associated library first. For instance, the
-@code{compile} and @code{compilation-mode} commands
-(@pxref{Compilation}) are autoloaded; if you call either command,
-Emacs automatically loads the @code{compile} library. In contrast,
-the command @code{recompile} is not autoloaded, so it is unavailable
-until you load the @code{compile} library.
+ Some commands are @dfn{autoloaded}: when you run them, Emacs
+automatically loads the associated library first. For instance, the
+@kbd{M-x compile} command (@pxref{Compilation}) is autoloaded; if you
+call it, Emacs automatically loads the @code{compile} library first.
+In contrast, the command @kbd{M-x recompile} is not autoloaded, so it
+is unavailable until you load the @code{compile} library.
@vindex load-dangerous-libraries
@cindex Lisp files byte-compiled by XEmacs
@@ -1399,38 +1408,35 @@ Emacs to crash. Set the variable @code{load-dangerous-libraries} to
@node Lisp Eval
@section Evaluating Emacs Lisp Expressions
-@cindex Emacs-Lisp mode
-@cindex mode, Emacs-Lisp
+@cindex Emacs Lisp mode
+@cindex mode, Emacs Lisp
@findex emacs-lisp-mode
- Lisp programs intended to be run in Emacs should be edited in
-Emacs-Lisp mode; this happens automatically for file names ending in
-@file{.el}. By contrast, Lisp mode itself is used for editing Lisp
-programs intended for other Lisp systems. To switch to Emacs-Lisp mode
-explicitly, use the command @kbd{M-x emacs-lisp-mode}.
-
- For testing of Lisp programs to run in Emacs, it is often useful to
-evaluate part of the program as it is found in the Emacs buffer. For
-example, after changing the text of a Lisp function definition,
-evaluating the definition installs the change for future calls to the
-function. Evaluation of Lisp expressions is also useful in any kind of
-editing, for invoking noninteractive functions (functions that are
-not commands).
+ Emacs Lisp mode is the major mode for editing Emacs Lisp. Its mode
+command is @kbd{M-x emacs-lisp-mode}.
-@table @kbd
-@item M-:
-Read a single Lisp expression in the minibuffer, evaluate it, and print
-the value in the echo area (@code{eval-expression}).
-@item C-x C-e
-Evaluate the Lisp expression before point, and print the value in the
-echo area (@code{eval-last-sexp}).
-@item C-M-x
+ Emacs provides several commands for evaluating Emacs Lisp
+expressions. You can use these commands in Emacs Lisp mode, to test
+your Emacs Lisp code as it is being written. For example, after
+re-writing a function, you can evaluate the function definition to
+make it take effect for subsequent function calls. These commands are
+also available globally, and can be used outside Emacs Lisp mode.
+
+@table @asis
+@item @kbd{M-:}
+Read a single Emacs Lisp expression in the minibuffer, evaluate it,
+and print the value in the echo area (@code{eval-expression}).
+@item @kbd{C-x C-e}
+Evaluate the Emacs Lisp expression before point, and print the value
+in the echo area (@code{eval-last-sexp}).
+@item @kbd{C-M-x} @r{(in Emacs Lisp mode)}
+@itemx @kbd{M-x eval-defun}
Evaluate the defun containing or after point, and print the value in
the echo area (@code{eval-defun}).
-@item M-x eval-region
-Evaluate all the Lisp expressions in the region.
-@item M-x eval-buffer
-Evaluate all the Lisp expressions in the buffer.
+@item @kbd{M-x eval-region}
+Evaluate all the Emacs Lisp expressions in the region.
+@item @kbd{M-x eval-buffer}
+Evaluate all the Emacs Lisp expressions in the buffer.
@end table
@ifinfo
@@ -1442,150 +1448,144 @@ Evaluate all the Lisp expressions in the buffer.
@kindex M-:
@end ifnotinfo
@findex eval-expression
- @kbd{M-:} (@code{eval-expression}) is the most basic command for evaluating
-a Lisp expression interactively. It reads the expression using the
-minibuffer, so you can execute any expression on a buffer regardless of
-what the buffer contains. When the expression is evaluated, the current
-buffer is once again the buffer that was current when @kbd{M-:} was
-typed.
-
-@kindex C-M-x @r{(Emacs-Lisp mode)}
-@findex eval-defun
- In Emacs-Lisp mode, the key @kbd{C-M-x} is bound to the command
-@code{eval-defun}, which parses the defun containing or following point
-as a Lisp expression and evaluates it. The value is printed in the echo
-area. This command is convenient for installing in the Lisp environment
-changes that you have just made in the text of a function definition.
-
- @kbd{C-M-x} treats @code{defvar} expressions specially. Normally,
-evaluating a @code{defvar} expression does nothing if the variable it
-defines already has a value. But @kbd{C-M-x} unconditionally resets the
-variable to the initial value specified in the @code{defvar} expression.
-@code{defcustom} expressions are treated similarly.
-This special feature is convenient for debugging Lisp programs.
-Typing @kbd{C-M-x} on a @code{defface} expression reinitializes
-the face according to the @code{defface} specification.
+ @kbd{M-:} (@code{eval-expression}) reads an expression using the
+minibuffer, and evaluates it. (Before evaluating the expression, the
+current buffer switches back to the buffer that was current when you
+typed @kbd{M-:}, not the minibuffer into which you typed the
+expression.)
@kindex C-x C-e
@findex eval-last-sexp
- The command @kbd{C-x C-e} (@code{eval-last-sexp}) evaluates the Lisp
-expression preceding point in the buffer, and displays the value in the
-echo area. It is available in all major modes, not just Emacs-Lisp
-mode. It does not treat @code{defvar} specially.
-
- When the result of an evaluation is an integer, you can type
-@kbd{C-x C-e} a second time to display the value of the integer result
-in additional formats (octal, hexadecimal, and character).
-
- If @kbd{C-x C-e}, or @kbd{M-:} is given a numeric argument, it
-inserts the value into the current buffer at point, rather than
-displaying it in the echo area. The argument's value does not matter.
-@kbd{C-M-x} with a numeric argument instruments the function
-definition for Edebug (@pxref{Instrumenting, Instrumenting for Edebug,, elisp, the Emacs Lisp Reference Manual}).
+ The command @kbd{C-x C-e} (@code{eval-last-sexp}) evaluates the
+Emacs Lisp expression preceding point in the buffer, and displays the
+value in the echo area. When the result of an evaluation is an
+integer, you can type @kbd{C-x C-e} a second time to display the value
+of the integer result in additional formats (octal, hexadecimal, and
+character).
+
+ If @kbd{M-:} or @kbd{C-x C-e} is given a prefix argument, it inserts
+the value into the current buffer at point, rather than displaying it
+in the echo area. The argument's value does not matter.
+
+@kindex C-M-x @r{(Emacs Lisp mode)}
+@findex eval-defun
+ The @code{eval-defun} command is bound to @kbd{C-M-x} in Emacs Lisp
+mode. It evaluates the top-level Lisp expression containing or
+following point, and prints the value in the echo area. In this
+context, a top-level expression is referred to as a ``defun'', but it
+need not be an actual @code{defun} (function definition). In
+particular, this command treats @code{defvar} expressions specially.
+Normally, evaluating a @code{defvar} expression does nothing if the
+variable it defines already has a value. But this command
+unconditionally resets the variable to the initial value specified by
+the @code{defvar}; this is convenient for debugging Emacs Lisp
+programs. @code{defcustom} and @code{defface} expressions are treated
+similarly. Note that the other commands documented in this section do
+not have this special feature.
+
+ With a prefix argument, @kbd{C-M-x} instruments the function
+definition for Edebug, the Emacs Lisp Debugger. @xref{Instrumenting,
+Instrumenting for Edebug,, elisp, the Emacs Lisp Reference Manual}.
@findex eval-region
@findex eval-buffer
- The most general command for evaluating Lisp expressions from a buffer
-is @code{eval-region}. @kbd{M-x eval-region} parses the text of the
-region as one or more Lisp expressions, evaluating them one by one.
-@kbd{M-x eval-buffer} is similar but evaluates the entire
-buffer. This is a reasonable way to install the contents of a file of
-Lisp code that you are ready to test. Later, as you find bugs and
-change individual functions, use @kbd{C-M-x} on each function that you
-change. This keeps the Lisp world in step with the source file.
+ The command @kbd{M-x eval-region} parses the text of the region as
+one or more Lisp expressions, evaluating them one by one. @kbd{M-x
+eval-buffer} is similar but evaluates the entire buffer.
@vindex eval-expression-print-level
@vindex eval-expression-print-length
@vindex eval-expression-debug-on-error
- The two customizable variables @code{eval-expression-print-level} and
-@code{eval-expression-print-length} control the maximum depth and length
-of lists to print in the result of the evaluation commands before
-abbreviating them. @code{eval-expression-debug-on-error} controls
-whether evaluation errors invoke the debugger when these commands are
-used; its default is @code{t}.
+ The customizable variables @code{eval-expression-print-level} and
+@code{eval-expression-print-length} control the maximum depth and
+length of lists to print in the result of the evaluation commands
+before abbreviating them. @code{eval-expression-debug-on-error}
+controls whether evaluation errors invoke the debugger when these
+commands are used; its default is @code{t}.
@node Lisp Interaction
@section Lisp Interaction Buffers
+@findex lisp-interaction-mode
When Emacs starts up, it contains a buffer named @samp{*scratch*},
-which is provided for evaluating Lisp expressions interactively inside
-Emacs. Its major mode is Lisp Interaction mode.
+which is provided for evaluating Emacs Lisp expressions interactively.
+Its major mode is Lisp Interaction mode. You can also enable Lisp
+Interaction mode by typing @kbd{M-x lisp-interaction-mode}.
@findex eval-print-last-sexp
@kindex C-j @r{(Lisp Interaction mode)}
- The simplest way to use the @samp{*scratch*} buffer is to insert
-Lisp expressions and type @kbd{C-j} (@code{eval-print-last-sexp})
-after each expression. This command reads the Lisp expression before
-point, evaluates it, and inserts the value in printed representation
-before point. The result is a complete typescript of the expressions
-you have evaluated and their values.
+ In the @samp{*scratch*} buffer, and other Lisp Interaction mode
+buffers, @kbd{C-j} (@code{eval-print-last-sexp}) evaluates the Lisp
+expression before point, and inserts the value at point. Thus, as you
+type expressions into the buffer followed by @kbd{C-j} after each
+expression, the buffer records a transcript of the evaluated
+expressions and their values. All other commands in Lisp Interaction
+mode are the same as in Emacs Lisp mode.
@vindex initial-scratch-message
At startup, the @samp{*scratch*} buffer contains a short message, in
the form of a Lisp comment, that explains what it is for. This
message is controlled by the variable @code{initial-scratch-message},
-which should be either a string or @code{nil}. If you set it to the
-empty string, or @code{nil}, the initial message is suppressed.
-
-@findex lisp-interaction-mode
- All other commands in Lisp Interaction mode are the same as in Emacs
-Lisp mode. You can enable Lisp Interaction mode by typing @kbd{M-x
-lisp-interaction-mode}.
+which should be either a string, or @code{nil} (which means to
+suppress the message).
@findex ielm
- An alternative way of evaluating Emacs Lisp expressions interactively
-is to use Inferior Emacs-Lisp mode, which provides an interface rather
-like Shell mode (@pxref{Shell Mode}) for evaluating Emacs Lisp
-expressions. Type @kbd{M-x ielm} to create an @samp{*ielm*} buffer
-which uses this mode. For more information see that command's
-documentation.
+ An alternative way of evaluating Emacs Lisp expressions
+interactively is to use Inferior Emacs Lisp mode, which provides an
+interface rather like Shell mode (@pxref{Shell Mode}) for evaluating
+Emacs Lisp expressions. Type @kbd{M-x ielm} to create an
+@samp{*ielm*} buffer which uses this mode. For more information, see
+that command's documentation.
@node External Lisp
@section Running an External Lisp
+@cindex Lisp mode
+@cindex mode, Lisp
+@cindex Common Lisp
- Emacs has facilities for running programs in other Lisp systems. You can
-run a Lisp process as an inferior of Emacs, and pass expressions to it to
-be evaluated. You can also pass changed function definitions directly from
-the Emacs buffers in which you edit the Lisp programs to the inferior Lisp
-process.
+ Lisp mode is the major mode for editing programs written in
+general-purpose Lisp dialects, such as Common Lisp. Its mode command
+is @kbd{M-x lisp-mode}. Emacs uses Lisp mode automatically for files
+whose names end in @file{.l}, @file{.lsp}, or @file{.lisp}.
@findex run-lisp
@vindex inferior-lisp-program
@kindex C-x C-z
- To run an inferior Lisp process, type @kbd{M-x run-lisp}. This runs
-the program named @code{lisp}, the same program you would run by typing
-@code{lisp} as a shell command, with both input and output going through
-an Emacs buffer named @samp{*lisp*}. That is to say, any ``terminal
-output'' from Lisp will go into the buffer, advancing point, and any
-``terminal input'' for Lisp comes from text in the buffer. (You can
-change the name of the Lisp executable file by setting the variable
-@code{inferior-lisp-program}.)
-
- To give input to Lisp, go to the end of the buffer and type the input,
-terminated by @key{RET}. The @samp{*lisp*} buffer is in Inferior Lisp
-mode, which combines the special characteristics of Lisp mode with most
-of the features of Shell mode (@pxref{Shell Mode}). The definition of
-@key{RET} to send a line to a subprocess is one of the features of Shell
-mode.
-
-@findex lisp-mode
- For the source files of programs to run in external Lisps, use Lisp
-mode. You can switch to this mode with @kbd{M-x lisp-mode}, and it is
-used automatically for files whose names end in @file{.l},
-@file{.lsp}, or @file{.lisp}.
+ You can run an external Lisp session as a subprocess or
+@dfn{inferior process} of Emacs, and pass expressions to it to be
+evaluated. To begin an external Lisp session, type @kbd{M-x
+run-lisp}. This runs the program named @command{lisp}, and sets it up
+so that both input and output go through an Emacs buffer named
+@samp{*inferior-lisp*}. To change the name of the Lisp program run by
+@kbd{M-x run-lisp}, change the variable @code{inferior-lisp-program}.
+
+ The major mode for the @samp{*lisp*} buffer is Inferior Lisp mode,
+which combines the characteristics of Lisp mode and Shell mode
+(@pxref{Shell Mode}). To send input to the Lisp session, go to the
+end of the @samp{*lisp*} buffer and type the input, followed by
+@key{RET}. Terminal output from the Lisp session is automatically
+inserted in the buffer.
@kindex C-M-x @r{(Lisp mode)}
@findex lisp-eval-defun
- When you edit a function in a Lisp program you are running, the easiest
-way to send the changed definition to the inferior Lisp process is the key
-@kbd{C-M-x}. In Lisp mode, this runs the function @code{lisp-eval-defun},
-which finds the defun around or following point and sends it as input to
-the Lisp process. (Emacs can send input to any inferior process regardless
-of what buffer is current.)
-
- Contrast the meanings of @kbd{C-M-x} in Lisp mode (for editing
-programs to be run in another Lisp system) and Emacs-Lisp mode (for
-editing Lisp programs to be run in Emacs; see @pxref{Lisp Eval}): in
-both modes it has the effect of installing the function definition
-that point is in, but the way of doing so is different according to
-where the relevant Lisp environment is found.
+ When you edit a Lisp program in Lisp mode, you can type @kbd{C-M-x}
+(@code{lisp-eval-defun}) to send an expression from the Lisp mode
+buffer to a Lisp session that you had started with @kbd{M-x run-lisp}.
+The expression sent is the top-level Lisp expression at or following
+point. The resulting value goes as usual into the
+@samp{*inferior-lisp*} buffer. Note that the effect of @kbd{C-M-x} in
+Lisp mode is thus very similar to its effect in Emacs Lisp mode
+(@pxref{Lisp Eval}), except that the expression is sent to a different
+Lisp environment instead of being evaluated in Emacs.
+
+@findex scheme-mode
+@findex run-scheme
+@cindex Scheme mode
+@cindex mode, Scheme
+@kindex C-M-x @r{(Scheme mode)}
+ The facilities for editing Scheme code, and for sending expressions
+to a Scheme subprocess, are very similar. Scheme source files are
+edited in Scheme mode, which can be explicitly enabled with @kbd{M-x
+scheme-mode}. You can initiate a Scheme session by typing @kbd{M-x
+run-scheme} (the buffer for interacting with Scheme is named
+@samp{*scheme*}), and send expressions to it by typing @kbd{C-M-x}.
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 8ecf0982e46..2cb02feee60 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -699,7 +699,7 @@ Compiling and Testing Programs
* Executing Lisp:: Various modes for editing Lisp programs,
with different facilities for running
the Lisp programs.
-* Lisp Libraries:: Creating Lisp programs to run in Emacs.
+* Lisp Libraries:: How Lisp programs are loaded into Emacs.
* Lisp Eval:: Executing a single Lisp expression in Emacs.
* Lisp Interaction:: Executing Lisp in an Emacs buffer.
* External Lisp:: Communicating through Emacs with a separate Lisp.
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index d620c9e3c4c..a03521d449b 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,8 @@
+2011-12-13 Martin Rudalics <rudalics@gmx.at>
+
+ * windows.texi (Splitting Windows): Use t instead of non-nil
+ when describing window-combination-resize.
+
2011-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
* text.texi (Special Properties): Warn against `intangible' properties
@@ -9754,7 +9759,7 @@
directory have been changed to reflect this.
* All instances of @indentedresultt{} have been changed to
- ` @result{}', using 5 spaces at the begining of the line.
+ ` @result{}', using 5 spaces at the beginning of the line.
1989-04-24 Robert J. Chassell (bob@rice-chex.ai.mit.edu)
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index cefa917a4e1..98eaf1f8ade 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -1381,7 +1381,7 @@ Operating System Interface
* System Environment:: Distinguish the name and kind of system.
* User Identification:: Finding the name and user id of the user.
* Time of Day:: Getting the current time.
-* Time Conversion:: Converting a time from numeric form to
+* Time Conversion:: Converting a time from numeric form to
calendrical data and vice versa.
* Time Parsing:: Converting a time from numeric form to text
and vice versa.
@@ -1438,7 +1438,7 @@ Tips and Conventions
GNU Emacs Internals
* Building Emacs:: How the dumped Emacs is made.
-* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
+* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
* Memory Usage:: Info about total size of Lisp objects made so far.
* Writing Emacs Primitives:: Writing C code for Emacs.
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index 0168c564e34..9ef4646b50b 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -13,7 +13,7 @@ internal aspects of GNU Emacs that may be of interest to C programmers.
@menu
* Building Emacs:: How the dumped Emacs is made.
-* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
+* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
* Memory Usage:: Info about total size of Lisp objects made so far.
* Writing Emacs Primitives:: Writing C code for Emacs.
@@ -196,7 +196,7 @@ function definition in pure storage. If it is non-@code{nil}, then the
function definition is copied into pure storage.
This flag is @code{t} while loading all of the basic functions for
-building Emacs initially (allowing those functions to be sharable and
+building Emacs initially (allowing those functions to be shareable and
non-collectible). Dumping Emacs as an executable always writes
@code{nil} in this variable, regardless of the value it actually has
before and after dumping.
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 298c7c3d1a8..46dbbb08e57 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1580,7 +1580,7 @@ decoding functions (@pxref{Explicit Encoding}).
Sometimes, you need to prefer several coding systems for some
operation, rather than fix a single one. Emacs lets you specify a
priority order for using coding systems. This ordering affects the
-sorting of lists of coding sysems returned by functions such as
+sorting of lists of coding systems returned by functions such as
@code{find-coding-systems-region} (@pxref{Lisp and Coding Systems}).
@defun coding-system-priority-list &optional highestp
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi
index 914ba5b1fd8..c89447fc139 100644
--- a/doc/lispref/vol1.texi
+++ b/doc/lispref/vol1.texi
@@ -44,7 +44,7 @@
@end ifset
@c per rms and peterb, use 10pt fonts for the main text, mostly to
-@c save on paper cost.
+@c save on paper cost.
@c Do this inside @tex for now, so current makeinfo does not complain.
@tex
@ifset smallbook
@@ -1402,7 +1402,7 @@ Operating System Interface
* System Environment:: Distinguish the name and kind of system.
* User Identification:: Finding the name and user id of the user.
* Time of Day:: Getting the current time.
-* Time Conversion:: Converting a time from numeric form to
+* Time Conversion:: Converting a time from numeric form to
calendrical data and vice versa.
* Time Parsing:: Converting a time from numeric form to text
and vice versa.
@@ -1458,7 +1458,7 @@ Tips and Conventions
GNU Emacs Internals
* Building Emacs:: How the dumped Emacs is made.
-* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
+* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
* Memory Usage:: Info about total size of Lisp objects made so far.
* Writing Emacs Primitives:: Writing C code for Emacs.
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi
index 1f84b267c9b..d45d23da365 100644
--- a/doc/lispref/vol2.texi
+++ b/doc/lispref/vol2.texi
@@ -1401,7 +1401,7 @@ Operating System Interface
* System Environment:: Distinguish the name and kind of system.
* User Identification:: Finding the name and user id of the user.
* Time of Day:: Getting the current time.
-* Time Conversion:: Converting a time from numeric form to
+* Time Conversion:: Converting a time from numeric form to
calendrical data and vice versa.
* Time Parsing:: Converting a time from numeric form to text
and vice versa.
@@ -1457,7 +1457,7 @@ Tips and Conventions
GNU Emacs Internals
* Building Emacs:: How the dumped Emacs is made.
-* Pure Storage:: A kludge to make preloaded Lisp functions sharable.
+* Pure Storage:: Kludge to make preloaded Lisp functions shareable.
* Garbage Collection:: Reclaiming space for Lisp objects no longer used.
* Memory Usage:: Info about total size of Lisp objects made so far.
* Writing Emacs Primitives:: Writing C code for Emacs.
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 437b6db8d58..df631158689 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -793,20 +793,20 @@ the new root window.
@defopt window-combination-resize
If this variable is @code{nil}, @code{split-window} can only split a
-window (denoted by @var{window}) if @var{window}'s screen area is
-large enough to accommodate both itself and the new window. This is
-the default.
-
-If this variable is non-@code{nil}, @code{split-window} tries to
-resize all windows that are part of the same combination as
-@var{window}, in order to accommodate the new window. In particular,
-this may allow @code{split-window} to succeed even if @var{window} is
-a fixed-size window or too small to ordinarily split. Furthermore,
-subsequently resizing or deleting @var{window} may resize all other
-windows in its combination.
-
-This variable has no effect if @code{window-combination-limit} is
-non-@code{nil} (see below).
+window (denoted by @var{window}) if @var{window}'s screen area is large
+enough to accommodate both itself and the new window.
+
+If this variable is @code{t}, @code{split-window} tries to resize all
+windows that are part of the same combination as @var{window}, in order
+to accommodate the new window. In particular, this may allow
+@code{split-window} to succeed even if @var{window} is a fixed-size
+window or too small to ordinarily split. Furthermore, subsequently
+resizing or deleting @var{window} may resize all other windows in its
+combination.
+
+The default is @code{nil}. Other values are reserved for future use.
+The value of this variable is ignored when
+@code{window-combination-limit} is non-@code{nil} (see below).
@end defopt
To illustrate the effect of @code{window-combination-resize},
@@ -857,9 +857,9 @@ If @code{window-combination-resize} is @code{nil}, splitting window
@end smallexample
@noindent
-If @code{window-combination-resize} is non-@code{nil}, splitting
-@code{W3} instead leaves all three live windows with approximately the
-same height:
+If @code{window-combination-resize} is @code{t}, splitting @code{W3}
+instead leaves all three live windows with approximately the same
+height:
@smallexample
@group
diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi
index 535efd86270..d0c15c1940e 100644
--- a/doc/misc/calc.texi
+++ b/doc/misc/calc.texi
@@ -16873,7 +16873,7 @@ The @kbd{t U} (@code{calc-unix-time}) [@code{unixtime}] command
converts a date form into a Unix time value, which is the number of
seconds since midnight on Jan 1, 1970, or vice-versa. The numeric result
will be an integer if the current precision is 12 or less; for higher
-precisions, the result may be a float with (@var{precision}@minus{}12)
+precision, the result may be a float with (@var{precision}@minus{}12)
digits after the decimal. Just as for @kbd{t J}, the numeric time
is interpreted in the GMT time zone and the date form is interpreted
in the current or specified zone. Some systems use Unix-like
@@ -16943,7 +16943,7 @@ from a date form as an integer in the range 0 to 59.
The @kbd{M-6 t P} [@code{second}] function extracts the second
from a date form. If the current precision is 12 or less,
the result is an integer in the range 0 to 59. For higher
-precisions, the result may instead be a floating-point number.
+precision, the result may instead be a floating-point number.
@tindex weekday
The @kbd{M-7 t P} [@code{weekday}] function extracts the weekday
@@ -18499,7 +18499,7 @@ counterparts, which are also available separately as @code{calc-sech}
Calc can compute a variety of less common functions that arise in
various branches of mathematics. All of the functions described in
this section allow arbitrary complex arguments and, except as noted,
-will work to arbitrarily large precisions. They can not at present
+will work to arbitrarily large precision. They can not at present
handle error forms or intervals as arguments.
NOTE: These functions are still experimental. In particular, their
diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi
index d5f403e5cdb..c36e45e60f7 100644
--- a/doc/misc/cc-mode.texi
+++ b/doc/misc/cc-mode.texi
@@ -2160,7 +2160,7 @@ A space between the function name and opening parenthesis when calling
a user function. The last character of the function name and the
opening parenthesis are highlighted. This font-locking rule will
spuriously highlight a valid concatenation expression where an
-identifier precedes a parenthesised expression. Unfortunately.
+identifier precedes a parenthesized expression. Unfortunately.
@item
Whitespace following the @samp{\} in what otherwise looks like an
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index 88b068ccd5b..06a52107d71 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -1816,7 +1816,7 @@ handled by a hook function.
@defvar dbus-event-error-hooks
This hook variable keeps a list of functions, which are called when a
D-Bus error happens in the event handler. Every function must accept
-two arguments, the event and the error variable catched in
+two arguments, the event and the error variable caught in
@code{condition-case} by @code{dbus-error}.
Such functions can be used the adapt the error signal to be raised.
diff --git a/doc/misc/ebrowse.texi b/doc/misc/ebrowse.texi
index 19ee9705484..a2a4017eb64 100644
--- a/doc/misc/ebrowse.texi
+++ b/doc/misc/ebrowse.texi
@@ -482,7 +482,7 @@ name.
@table @kbd
@item SPC
This command views the class declaration if the database
-contains informations about it. If you don't parse the entire source
+contains information about it. If you don't parse the entire source
you are working on, some classes will only be known to exist but the
location of their declarations and definitions will not be known.@refill
diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi
index c44cc1c9b09..91440dcfe8f 100644
--- a/doc/misc/emacs-mime.texi
+++ b/doc/misc/emacs-mime.texi
@@ -417,7 +417,7 @@ called with a @acronym{MIME} handle as the argument.
@vindex mm-inline-text-html-with-images
Some @acronym{HTML} mails might have the trick of spammers using
@samp{<img>} tags. It is likely to be intended to verify whether you
-have read the mail. You can prevent your personal informations from
+have read the mail. You can prevent your personal information from
leaking by setting this option to @code{nil} (which is the default).
It is currently ignored by Emacs/w3. For emacs-w3m, you may use the
command @kbd{t} on the image anchor to show an image even if it is
diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi
index ace7bb42c21..7bd3e4ac7fa 100644
--- a/doc/misc/gnus-faq.texi
+++ b/doc/misc/gnus-faq.texi
@@ -1838,7 +1838,7 @@ inconvenient since you are not displaying the found mail
in Gnus. Here comes nnir into action. Nnir is a front end
to search engines like swish-e or swish++ and
others. You index your mail with one of those search
-engines and with the help of nnir you can search trough
+engines and with the help of nnir you can search through
the indexed mail and generate a temporary group with all
messages which met your search criteria. If this sound
cool to you get nnir.el from
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 5ae86c4e631..68c7e8bbdbc 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -4622,7 +4622,7 @@ Sieve is a server-side mail filtering language. In Gnus you can use
the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
sieve rules that should apply to each group. Gnus provides two
commands to translate all these group parameters into a proper Sieve
-script that can be transfered to the server somehow.
+script that can be transferred to the server somehow.
@vindex gnus-sieve-file
@vindex gnus-sieve-region-start
@@ -8332,7 +8332,7 @@ Files with name matching this regular expression won't be viewed.
Files with a @acronym{MIME} type matching this variable won't be viewed.
Note that Gnus tries to guess what type the file is based on the name.
@code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
-kludgey.
+kludgy.
@item gnus-uu-tmp-dir
@vindex gnus-uu-tmp-dir
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index e2c2594b66e..1cea074fa2b 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -528,8 +528,8 @@ differ.
@cindex methods, inline
@cindex methods, external
Loading or saving a remote file requires that the content of the file
-be transfered between the two machines. The content of the file can
-be transfered using one of two methods: the @dfn{inline method} over
+be transferred between the two machines. The content of the file can
+be transferred using one of two methods: the @dfn{inline method} over
the same connection used to log in to the remote machine, or the
@dfn{external method} through another connection using a remote copy
program such as @command{rcp}, @command{scp} or @command{rsync}.
diff --git a/etc/NEWS b/etc/NEWS
index 7b778b64991..d778fe3e520 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -570,6 +570,7 @@ region (or with the left margin if there is no previous line).
** browse-url has a new variable `browse-url-mailto-function'
specifies how mailto: URLs are handled. The default is `browse-url-mail'.
+---
** BibTeX mode
*** BibTeX mode now supports biblatex.
@@ -625,7 +626,7 @@ view-diary-entries, list-diary-entries, show-all-diary-entries
** comint and modes derived from it use the generic completion code.
** Compilation mode
-
+---
*** Compilation mode can be used without font-lock-mode.
`compilation-parse-errors-function' is now obsolete.
diff --git a/etc/srecode/el.srt b/etc/srecode/el.srt
index 6117e72be2a..03a797bb709 100644
--- a/etc/srecode/el.srt
+++ b/etc/srecode/el.srt
@@ -109,7 +109,7 @@ $<MODEFCN:declaration:function$
'($MODESYM$-mode-font-lock-keywords
nil ;; perform string/comment fontification
nil ;; keywords are case sensitive.
- ;; This puts _ & - as a word constituant,
+ ;; This puts _ & - as a word constituent,
;; simplifying our keywords significantly
((?_ . "w") (?- . "w"))))
(run-hooks '$MODESYM$-mode-hook)
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 922a96ad194..40404828e0f 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -3137,7 +3137,7 @@
(main): Call put_entries here even in CTAGS mode.
(main, process_file): Check the return values of fclose and pclose.
(process_file): Do not call put_entries after parsing each file.
- (process_file): Canonicalise file names even for ctags.
+ (process_file): Canonicalize file names even for ctags.
(process_file): Set curfile here...
(find_entries): ... not here any more.
(add_node): In etags mode, build a linked list of entries (on
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 024131569dc..cf042ec6c82 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,98 @@
+2011-12-13 Alan Mackenzie <acm@muc.de>
+
+ Add the switch statement to AWK Mode.
+
+ * progmodes/cc-awk (awk-font-lock-keywords): Add "switch", "case",
+ "default" to the keywords regexp.
+
+ * progmodes/cc-langs (c-label-kwds): Let AWK take the same
+ expression as the rest.
+ (c-nonlabel-token-key): Allow string literals for AWK. Refactor
+ for the other modes.
+
+ Large brace-block initialisation makes CC Mode slow: Fix.
+ Tidy up and accelerate c-in-literal, etc. by using the
+ c-parse-state
+ routines. Limit backward searching in c-font-lock-enclosing.decl.
+
+ * progmodes/cc-engine.el (c-state-pp-to-literal): Return the
+ pp-state and literal type in addition to the limits.
+ (c-state-safe-place): New defun, extracted from
+ c-state-literal-at.
+ (c-state-literal-at): Use the above new defun.
+ (c-slow-in-literal, c-fast-in-literal): Removed.
+ (c-in-literal, c-literal-limits): Amended to use
+ c-state-pp-to-literal.
+
+ * progmodes/cc-fonts.el (c-font-lock-enclosing-decls): Check for
+ being in a literal. Add a limit for backward searching.
+
+ * progmodes/cc-mode.el (awk-mode): Don't alias c-in-literal to
+ c-slow-in-literal.
+
+2011-12-13 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * progmodes/pascal.el: Declare `ind' as dyn-bound (bug#10264).
+
+2011-12-13 Martin Rudalics <rudalics@gmx.at>
+
+ * window.el (delete-other-windows): Use correct frame in call to
+ window-with-parameter.
+
+2011-12-12 Daniel Pfeiffer <occitan@t-online.de>
+
+ * progmodes/make-mode.el: Bring it up to date with makepp V2.0.
+ (makefile-make-font-lock-keywords): Extend meaning of `keywords'.
+ (makefile-gmake-statements, makefile-makepp-statements):
+ Use it and add new makepp keywords.
+ (makefile-makepp-font-lock-keywords): Add new patterns.
+ (makefile-match-function-end): Match new [...] and [[...]].
+
+2011-12-11 Juanma Barranquero <lekktu@gmail.com>
+
+ * ses.el (ses-call-printer-return, ses-cell-property-get)
+ (ses-sym-rowcol, ses-printer-validate, ses-formula-record)
+ (ses-create-cell-variable, ses-reset-header-string)
+ (ses-cell-set-formula, ses-repair-cell-reference-all)
+ (ses-self-reference-early-detection, ses-in-print-area, ses-set-curcell)
+ (ses-check-curcell, ses-call-printer, ses-adjust-print-width)
+ (ses-print-cell-new-width, ses-formula-references, ses-relocate-formula)
+ (ses-aset-with-undo, ses-load, ses-truncate-cell)
+ (ses-read-column-printer, ses-read-default-printer, ses-insert-row)
+ (ses-delete-row, ses-delete-column, ses-append-row-jump-first-column)
+ (ses-kill-override, ses-yank-pop, ses-yank-cells, ses-yank-tsf)
+ (ses-yank-resize, ses-export-tab, ses-mark-row, ses-mark-column)
+ (ses-renarrow-buffer, ses-insert-range, ses-insert-ses-range)
+ (ses-safe-printer, ses-safe-formula, ses-warn-unsafe, ses--clean-!)
+ (ses--clean-_, ses-range, ses-select, ses-center, ses-center-span)
+ (ses-dashfill, ses-unsafe): Fix typos and reflow docstrings.
+
+2011-12-11 Vincent Belaïche <vincentb1@users.sourceforge.net>
+
+ * ses.el: The overall change is to add cell renaming, that is
+ setting fancy names for cell symbols other than name matching
+ "\\`[A-Z]+[0-9]+\\'" regexp .
+ (ses-create-cell-variable): New defun.
+ (ses-relocate-formula): Relocate formulas only for cells the
+ symbols of which are not renamed, i.e. symbols whose names do not
+ match regexp "\\`[A-Z]+[0-9]+\\'".
+ (ses-relocate-all): Relocate values only for cells the symbols of
+ which are not renamed.
+ (ses-load): Create cells variables as the (ses-cell ...) are read,
+ in order to check row col consistency with cell symbol name only
+ for cells that are not renamed.
+ (ses-replace-name-in-formula): New defun.
+ (ses-rename-cell): New defun.
+
+2011-12-11 Chong Yidong <cyd@gnu.org>
+
+ * progmodes/gdb-mi.el (gdb): Set comint-prompt-regexp, required
+ for completion via gud-gdb-fetch-lines-filter (Bug#10274).
+
+2011-12-11 Eric Hanchrow <eric.hanchrow@gmail.com>
+
+ * window.el (other-window): Fix docstring.
+
2011-12-10 Eli Zaretskii <eliz@gnu.org>
* mail/rmailsum.el (rmail-header-summary): RFC2047 decode the
diff --git a/lisp/ChangeLog.13 b/lisp/ChangeLog.13
index 0b96f4a36eb..558718a5a5f 100644
--- a/lisp/ChangeLog.13
+++ b/lisp/ChangeLog.13
@@ -7261,7 +7261,7 @@
* progmodes/gdb-ui.el (gdb-parent-bptno-enabled): New variable.
(gdb-breakpoint-regexp, gdb-mouse-toggle-breakpoint-margin)
(gdb-mouse-toggle-breakpoint-fringe, gdb-delete-breakpoint)
- (gdb-goto-breakpoint): Generalise for breakpoints with multiple
+ (gdb-goto-breakpoint): Generalize for breakpoints with multiple
locations.
(gdb-info-breakpoints-custom, gdb-assembler-custom)
(gdb-toggle-breakpoint): Update for new gdb-breakpoint-regexp.
diff --git a/lisp/ChangeLog.15 b/lisp/ChangeLog.15
index ab1eb3591cd..6e13c1156ce 100644
--- a/lisp/ChangeLog.15
+++ b/lisp/ChangeLog.15
@@ -8618,7 +8618,7 @@
(menu-bar-showhide-tool-bar-menu-customize-enable-right)
(menu-bar-showhide-tool-bar-menu-customize-enable-bottom)
(menu-bar-showhide-tool-bar-menu-customize-enable-top): New functions
- (menu-bar-showhide-tool-bar-menu): If tool bar is moveable,
+ (menu-bar-showhide-tool-bar-menu): If tool bar is movable,
make a menu for Options => toolbar that can move it.
2010-07-29 Chong Yidong <cyd@stupidchicken.com>
diff --git a/lisp/ChangeLog.3 b/lisp/ChangeLog.3
index b97bcea89cc..e0f9bc9ade2 100644
--- a/lisp/ChangeLog.3
+++ b/lisp/ChangeLog.3
@@ -8647,7 +8647,7 @@
* comint.el, inf-lisp.el, shell.el: Updated to meet Olin's
version 2.0 comint offerings.
* ring.el: The underlying history mechanism for comint.
- Generalised handling of a ring data type based on vectors.
+ Generalized handling of a ring data type based on vectors.
* history.el: For now, a symlink to ring.el.
* loaddefs.el: Updated shell-prompt-pattern doc string.
diff --git a/lisp/ChangeLog.7 b/lisp/ChangeLog.7
index 37387121777..b05707abe5c 100644
--- a/lisp/ChangeLog.7
+++ b/lisp/ChangeLog.7
@@ -13088,7 +13088,7 @@
1997-07-25 Simon Marshall <simon@frobnitz.gnu.ai.mit.edu>
- * complete.el: Customise; as subgroup of minibuffer.
+ * complete.el: Customize; as subgroup of minibuffer.
(partial-completion-mode): New option to toggle mode.
(partial-completion-mode): New command to toggle mode.
Add and remove hooks here, i.e., not at the top-level.
@@ -13617,7 +13617,7 @@
1997-07-15 Simon Marshall <simon@albert.gnu.ai.mit.edu>
- * mouse-sel.el: Customise; create mouse-sel as subgroup of mouse.
+ * mouse-sel.el: Customize; create mouse-sel as subgroup of mouse.
(mouse-sel-mode): New option to toggle mode.
(mouse-sel-mode): New command to toggle mode.
(mouse-sel-set-selection-function): If mouse-sel-default-bindings is
@@ -13625,7 +13625,7 @@
(mouse-sel-bindings): New function to install/restore mouse bindings.
This is called by mouse-sel-mode, i.e., not at the top-level.
- * delsel.el: Customise; as part of editing-basics group.
+ * delsel.el: Customize; as part of editing-basics group.
(delete-selection-mode): Convert to autoloaded option. Default to nil.
(delete-selection-mode): Define before option.
Modify pre-command-hook here, i.e., not at the top-level.
@@ -14943,7 +14943,7 @@
paren-matching) and put all blink-matching-paren variables in the
former (as opposed to the latter) group.
- * paren.el: Customise; paren-showing as a subgroup of paren-matching.
+ * paren.el: Customize; paren-showing as a subgroup of paren-matching.
(show-paren-style): New variable.
(show-paren-match-face)
(show-paren-mismatch-face): New faces.
@@ -18871,7 +18871,7 @@
1997-04-16 Simon Marshall <simon@wombat.gnu.ai.mit.edu>
- * font-lock.el: Customise.
+ * font-lock.el: Customize.
(font-lock-defaults-alist): Leave ~ syntax alone in C++.
(font-lock-match-c++-style-declaration-item-and-skip-to-next): Match ~
characters here.
@@ -18883,10 +18883,10 @@
(font-lock-compile-keywords): Don't set font-lock-keywords.
(font-lock-fontify-keywords-region): Set it here.
- * fast-lock.el: Customise.
+ * fast-lock.el: Customize.
(fast-lock-cache-data): Simplify calls of font-lock-compile-keywords.
- * lazy-lock.el: Customise.
+ * lazy-lock.el: Customize.
(lazy-lock-fontify-conservatively): Fontify around WINDOW's point.
* shell.el (shell-font-lock-keywords): Use EVAL form for prompt.
diff --git a/lisp/calc/calc-poly.el b/lisp/calc/calc-poly.el
index 97d955eb07d..e21a095c821 100644
--- a/lisp/calc/calc-poly.el
+++ b/lisp/calc/calc-poly.el
@@ -147,7 +147,7 @@
;;; Return only quotient to top of stack (nil if zero)
-;; calc-poly-div-remainder is a local variable for
+;; calc-poly-div-remainder is a local variable for
;; calc-poly-div (in calc-alg.el), but is used by
;; calcFunc-pdiv, which is called by calc-poly-div.
(defvar calc-poly-div-remainder)
@@ -512,7 +512,7 @@
;;; Given an expression find all variables that are polynomial bases.
;;; Return list in the form '( (var1 degree1) (var2 degree2) ... ).
-;; The variable math-poly-base-total-base is local to
+;; The variable math-poly-base-total-base is local to
;; math-total-polynomial-base, but is used by math-polynomial-p1,
;; which is called by math-total-polynomial-base.
(defvar math-poly-base-total-base)
@@ -539,19 +539,19 @@
nil)
;; The variable math-factored-vars is local to calcFunc-factors and
-;; calcFunc-factor, but is used by math-factor-expr and
+;; calcFunc-factor, but is used by math-factor-expr and
;; math-factor-expr-part, which are called (directly and indirectly) by
;; calcFunc-factor and calcFunc-factors.
(defvar math-factored-vars)
;; The variable math-fact-expr is local to calcFunc-factors,
-;; calcFunc-factor and math-factor-expr, but is used by math-factor-expr-try
+;; calcFunc-factor and math-factor-expr, but is used by math-factor-expr-try
;; and math-factor-expr-part, which are called (directly and indirectly) by
;; calcFunc-factor, calcFunc-factors and math-factor-expr.
(defvar math-fact-expr)
-;; The variable math-to-list is local to calcFunc-factors and
-;; calcFunc-factor, but is used by math-accum-factors, which is
+;; The variable math-to-list is local to calcFunc-factors and
+;; calcFunc-factor, but is used by math-accum-factors, which is
;; called (indirectly) by calcFunc-factors and calcFunc-factor.
(defvar math-to-list)
@@ -729,7 +729,7 @@
'(1)))
;; We now have a square-free polynomial with integer coefs.
- ;; For now, we use a kludgey method that finds linear and
+ ;; For now, we use a kludgy method that finds linear and
;; quadratic terms using floating-point root-finding.
(if (setq t1 (let ((calc-symbolic-mode nil))
(math-poly-all-roots nil p t)))
@@ -749,7 +749,7 @@
(math-add
(math-add
(math-mul den (math-pow math-fet-x 2))
- (math-mul (math-mul coef1 den)
+ (math-mul (math-mul coef1 den)
math-fet-x))
(math-mul coef0 den)))
(let ((den (math-lcm-denoms coef0)))
@@ -1077,7 +1077,7 @@ If no partial fraction representation can be found, return nil."
((and (eq (car-safe expr) '^)
(memq (car-safe (nth 1 expr)) '(+ -))
(integerp (nth 2 expr))
- (if (and
+ (if (and
(or (math-known-matrixp (nth 1 (nth 1 expr)))
(math-known-matrixp (nth 2 (nth 1 expr)))
(and
@@ -1090,11 +1090,11 @@ If no partial fraction representation can be found, return nil."
(math-add-or-sub (list '* (nth 1 (nth 1 expr)) (nth 1 expr))
(list '* (nth 2 (nth 1 expr)) (nth 1 expr))
nil (eq (car (nth 1 expr)) '-))
- (math-add-or-sub (list '* (nth 1 (nth 1 expr))
- (list '^ (nth 1 expr)
+ (math-add-or-sub (list '* (nth 1 (nth 1 expr))
+ (list '^ (nth 1 expr)
(1- (nth 2 expr))))
- (list '* (nth 2 (nth 1 expr))
- (list '^ (nth 1 expr)
+ (list '* (nth 2 (nth 1 expr))
+ (list '^ (nth 1 expr)
(1- (nth 2 expr))))
nil (eq (car (nth 1 expr)) '-)))
(if (> (nth 2 expr) 0)
diff --git a/lisp/cedet/semantic/bovine/el.el b/lisp/cedet/semantic/bovine/el.el
index 98f744dca6e..1a2061d01e7 100644
--- a/lisp/cedet/semantic/bovine/el.el
+++ b/lisp/cedet/semantic/bovine/el.el
@@ -497,15 +497,15 @@ used to perform the override."
Unfortunately, this requires that the tag in question has been loaded
into Emacs Lisp's memory."
(let ((obsoletethis (intern-soft (semantic-tag-name tag)))
- (obsoletor nil))
+ (obsoleter nil))
;; This asks if our tag is available in the Emacs name space for querying.
(when obsoletethis
(mapatoms (lambda (a)
(let ((oi (get a 'byte-obsolete-info)))
(if (and oi (eq (car oi) obsoletethis))
- (setq obsoletor a)))))
- (if obsoletor
- (format "\n@obsolete{%s,%s}" obsoletor (semantic-tag-name tag))
+ (setq obsoleter a)))))
+ (if obsoleter
+ (format "\n@obsolete{%s,%s}" obsoleter (semantic-tag-name tag))
""))))
(define-mode-local-override semantic-documentation-for-tag
diff --git a/lisp/cedet/semantic/find.el b/lisp/cedet/semantic/find.el
index b4d94321bc1..a6d86691206 100644
--- a/lisp/cedet/semantic/find.el
+++ b/lisp/cedet/semantic/find.el
@@ -427,7 +427,7 @@ TABLE is a tag table. See `semantic-something-to-tag-table'."
;;; Old Style Brute Force Search Routines
;;
-;; These functions will search through tags lists explicity for
+;; These functions will search through tags lists explicitly for
;; desired information.
;; The -by-name nonterminal search can use the built in fcn
diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el
index 98b1ab55c32..1a79adc650d 100644
--- a/lisp/cedet/semantic/grammar.el
+++ b/lisp/cedet/semantic/grammar.el
@@ -1290,7 +1290,7 @@ the change bounds to encompass the whole nonterminal tag."
semantic-grammar-mode-keywords-3)
nil ;; perform string/comment fontification
nil ;; keywords are case sensitive.
- ;; This puts _ & - as a word constituant,
+ ;; This puts _ & - as a word constituent,
;; simplifying our keywords significantly
((?_ . "w") (?- . "w"))))
;; Setup Semantic to parse grammar
diff --git a/lisp/cedet/semantic/wisent/comp.el b/lisp/cedet/semantic/wisent/comp.el
index f92ae88c14e..884342a1df2 100644
--- a/lisp/cedet/semantic/wisent/comp.el
+++ b/lisp/cedet/semantic/wisent/comp.el
@@ -2640,7 +2640,7 @@ there are any reduce/reduce conflicts.")
(defun wisent-print-results ()
"Print information on generated parser.
-Report detailed informations if `wisent-verbose-flag' or
+Report detailed information if `wisent-verbose-flag' or
`wisent-debug-flag' are non-nil."
(when (or wisent-verbose-flag wisent-debug-flag)
(wisent-print-useless))
diff --git a/lisp/cedet/srecode/srt-mode.el b/lisp/cedet/srecode/srt-mode.el
index 0a99b7869e8..ed2b0e2cfdb 100644
--- a/lisp/cedet/srecode/srt-mode.el
+++ b/lisp/cedet/srecode/srt-mode.el
@@ -194,7 +194,7 @@ we can tell font lock about them.")
'(srecode-font-lock-keywords
nil ;; perform string/comment fontification
nil ;; keywords are case sensitive.
- ;; This puts _ & - as a word constituant,
+ ;; This puts _ & - as a word constituent,
;; simplifying our keywords significantly
((?_ . "w") (?- . "w")))))
diff --git a/lisp/comint.el b/lisp/comint.el
index c0b02e5a230..77734b69af6 100644
--- a/lisp/comint.el
+++ b/lisp/comint.el
@@ -45,7 +45,7 @@
;; It is pretty easy to make new derived modes for other processes.
;; For documentation on the functionality provided by Comint mode, and
-;; the hooks available for customising it, see the comments below.
+;; the hooks available for customizing it, see the comments below.
;; For further information on the standard derived modes (shell,
;; inferior-lisp, inferior-scheme, ...), see the relevant source files.
diff --git a/lisp/delim-col.el b/lisp/delim-col.el
index 96a0745dd31..a0a8af80389 100644
--- a/lisp/delim-col.el
+++ b/lisp/delim-col.el
@@ -97,7 +97,7 @@
;; operates over the text rectangle selected which rectangle diagonal is
;; given by the region start and end.
;;
-;; See `delimit-columns-format' variable documentation for column formating.
+;; See `delimit-columns-format' variable documentation for column formatting.
;;
;; `delimit-columns-region' is useful when you have columns of text that
;; are not well aligned, like:
@@ -171,7 +171,7 @@ For examples below, consider:
Valid values are:
- nil no formating. That is, `delimit-columns-after' is followed by
+ nil no formatting. That is, `delimit-columns-after' is followed by
`delimit-columns-separator'.
For example, the result is: \"<ccc>:<dddd>:\"
@@ -190,9 +190,9 @@ Valid values are:
For example, the result is: \"<ccc >:<dddd >:\"
Any other value is treated as t."
- :type '(choice :menu-tag "Column Formating"
- :tag "Column Formating"
- (const :tag "No Formating" nil)
+ :type '(choice :menu-tag "Column Formatting"
+ :tag "Column Formatting"
+ (const :tag "No Formatting" nil)
(const :tag "Column Alignment" t)
(const :tag "Separator Alignment" separator)
(const :tag "Column Padding" padding))
@@ -404,7 +404,7 @@ START and END delimits the corners of text rectangle."
(re-search-forward delimit-columns-separator
delimit-columns-limit 'move))
(setq ncol (1+ ncol)))
- ;; insert first formating
+ ;; insert first formatting
(insert delimit-columns-str-before delimit-columns-before)
;; Adjust all columns but last one
(while (progn
@@ -436,7 +436,7 @@ START and END delimits the corners of text rectangle."
(setq spaces (and delimit-columns-format
(make-string (aref delimit-columns-max ncol)
?\s)))))
- ;; insert last formating
+ ;; insert last formatting
(cond ((null delimit-columns-format)
(insert delimit-columns-after delimit-columns-str-after))
((eq delimit-columns-format 'padding)
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el
index a68c4dfdf69..b17fa6b1471 100644
--- a/lisp/emulation/cua-base.el
+++ b/lisp/emulation/cua-base.el
@@ -368,7 +368,7 @@ interpreted as a register number."
(defcustom cua-check-pending-input t
"If non-nil, don't override prefix key if input pending.
-It is rumoured that `input-pending-p' is unreliable under some window
+It is rumored that `input-pending-p' is unreliable under some window
managers, so try setting this to nil, if prefix override doesn't work."
:type 'boolean
:group 'cua)
diff --git a/lisp/epa-dired.el b/lisp/epa-dired.el
index 0834a8df23a..d51045a5e37 100644
--- a/lisp/epa-dired.el
+++ b/lisp/epa-dired.el
@@ -67,7 +67,7 @@ If no one is selected, default secret key is used. "
(while file-list
(epa-encrypt-file
(expand-file-name (car file-list))
- (epa-select-keys (epg-make-context) "Select recipents for encryption.
+ (epa-select-keys (epg-make-context) "Select recipients for encryption.
If no one is selected, symmetric encryption will be performed. "))
(setq file-list (cdr file-list)))
(revert-buffer)))
diff --git a/lisp/epa-file.el b/lisp/epa-file.el
index bef67ba4f69..4d05563719d 100644
--- a/lisp/epa-file.el
+++ b/lisp/epa-file.el
@@ -235,7 +235,7 @@ encryption is used."
(current-buffer)))))
(epa-select-keys
context
- "Select recipents for encryption.
+ "Select recipients for encryption.
If no one is selected, symmetric encryption will be performed. "
recipients)
(if epa-file-encrypt-to
@@ -273,7 +273,7 @@ If no one is selected, symmetric encryption will be performed. "
(epg-sub-key-id (car (epg-key-sub-key-list key))))
(epa-select-keys
(epg-make-context)
- "Select recipents for encryption.
+ "Select recipients for encryption.
If no one is selected, symmetric encryption will be performed. "))))
;;;###autoload
diff --git a/lisp/erc/ChangeLog.03 b/lisp/erc/ChangeLog.03
index 135d8f788f8..3e687202d38 100644
--- a/lisp/erc/ChangeLog.03
+++ b/lisp/erc/ChangeLog.03
@@ -416,7 +416,7 @@
* erc-button.el: New variable erc-button-wrap-long-urls.
Modified erc-button-add-buttons:
New optional argument REGEXP.
- If we're buttonising a URL and erc-button-wrap-long-urls is
+ If we're buttonizing a URL and erc-button-wrap-long-urls is
non-nil, try and wrap them
Modified erc-button-add-buttons-1:
@@ -822,7 +822,7 @@
(define-erc-module): the enable and disable routines now update erc-modules
accordingly
erc-modules: new variable controlling the modules which erc has loaded/will
- load. when customising, it will automatically enable modules. it won't
+ load. when customizing, it will automatically enable modules. it won't
automatically disable modules which are removed, yet.
(erc-update-modules): enable all modules in `erc-modules'
@@ -1058,7 +1058,7 @@
* erc.el(erc-process-input-line):
when displaying the help for a function, if no
documentation exists, don't fall over
- (erc-cmd-SAY): new function for quoting lines begining with /
+ (erc-cmd-SAY): new function for quoting lines beginning with /
(erc-server-NICK):
- fix a bug where the "is now known as" message doesn't appear on newly
created /query buffers
@@ -1491,7 +1491,7 @@
* erc.el:
* removed duplicate do-no-parse-args properties for the defaliased defuns
(erc-process-input-line): show function signature when incorrect args
- (erc-extract-command-from-line): canonicalise defaliases before extracting
+ (erc-extract-command-from-line): canonicalize defaliases before extracting
plist
(erc-cmd-CLEAR): fixed
(erc-cmd-UNIGNORE): fixed again
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el
index 1aa2c34c395..cab84951143 100644
--- a/lisp/eshell/em-dirs.el
+++ b/lisp/eshell/em-dirs.el
@@ -160,7 +160,7 @@ it's far more automatic. `pushd' allows the user to decide which
directories gets pushed, and its size is unlimited.
`eshell-last-dir-ring' is meant for users who don't use `pushd'
-explicity very much, but every once in a while would like to return to
+explicitly very much, but every once in a while would like to return to
a previously visited directory without having to type in the whole
thing again."
:type 'integer
diff --git a/lisp/forms.el b/lisp/forms.el
index 215f3ce88f7..0d92dc3ffd9 100644
--- a/lisp/forms.el
+++ b/lisp/forms.el
@@ -709,7 +709,7 @@ Commands: Equivalent keys in read-only mode:
(forms-first-record))
)
- ;; user customising
+ ;; user customizing
;;(message "forms: proceeding setup (user hooks)...")
(run-mode-hooks 'forms-mode-hook 'forms-mode-hooks)
;;(message "forms: setting up... done.")
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 1984e014725..00b5417fa37 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -1,6 +1,6 @@
2011-12-09 Tassilo Horn <tassilo@member.fsf.org>
- * message.el (message-valid-fqdn-regexp): Udate with newly approved
+ * message.el (message-valid-fqdn-regexp): Update with newly approved
top-level domain names ".tel" and ".asia".
2011-12-08 Katsumi Yamaoka <yamaoka@jpl.org>
@@ -165,7 +165,7 @@
2011-10-17 Dave Abrahams <dave@boostpro.com> (tiny change)
- * gnus-registry.el (gnus-registry-enabled): Add new variable. (Bug#9691)
+ * gnus-registry.el (gnus-registry-enabled): Add new variable (bug#9691).
(gnus-registry-install-shortcuts): Set `gnus-registry-install' to 'ask
only while we need to find out if it should be t or nil.
(gnus-registry-initialize): Don't set `gnus-registry-install' to t.
@@ -324,7 +324,7 @@
2011-09-20 Julien Danjou <julien@danjou.info>
* auth-source.el (auth-source-netrc-create): Use default value for
- password if specified. Evaluate default.
+ password if specified. Evaluate default.
(auth-source-plstore-create): Ditto.
(auth-source-plstore-create, auth-source-netrc-create): Fix default
value evaluation.
@@ -641,8 +641,8 @@
2011-08-05 Andrew Cohen <cohen@andy.bu.edu>
- * gnus-sum.el (gnus-summary-refer-article): Warp to article. This
- allows article-referral to work from an nnir group.
+ * gnus-sum.el (gnus-summary-refer-article): Warp to article.
+ This allows article-referral to work from an nnir group.
2011-08-04 Andrew Cohen <cohen@andy.bu.edu>
@@ -658,7 +658,7 @@
2011-08-03 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el (nnir-read-server-parm): Add an argument to restrict to
- server-variables only. This should fix a bug introduced with commit
+ server-variables only. This should fix a bug introduced with commit
e1889675b7f4adf057833c5513c9374134c4e053.
(nnir-run-query): 'nnir-search-engine should not be set from the global
environment.
@@ -1858,7 +1858,7 @@
2011-03-21 Julien Danjou <julien@danjou.info>
* mm-view.el (mm-display-inline-fontify): Make mode optional, and call
- normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer
+ normal-mode if not set. Set temp buffer unmodified to avoid kill-buffer
query.
(mm-inline-text): Render normal text with fontification whenever
possible.
@@ -2702,9 +2702,9 @@
* gnus.el (gnus-summary-line-format): Mention &user-date format in
docstring.
- * gnus.el (gnus-user-date-format-alist): Change default value. Use
- defcustom, with type and group. Move from gnus-util.el. Rename to
- gnus-summary-user-date-format-alist.
+ * gnus.el (gnus-user-date-format-alist): Change default value.
+ Use defcustom, with type and group. Move from gnus-util.el.
+ Rename to gnus-summary-user-date-format-alist.
2011-02-03 Glenn Morris <rgm@gnu.org>
@@ -3231,12 +3231,12 @@
2010-12-17 Julien Danjou <julien@danjou.info>
* gnus-util.el (gnus-rescale-image): Allow to resize images even if
- they are from file. Can also scale up.
+ they are from file. Can also scale up.
2010-12-17 Andrew Cohen <cohen@andy.bu.edu>
- * gnus-sum.el (gnus-summary-refer-thread): Simplify code. Restore
- gnus-use-agent.
+ * gnus-sum.el (gnus-summary-refer-thread): Simplify code.
+ Restore gnus-use-agent.
(gnus-get-newsgroup-headers): Avoid unwanted spaces at eol.
* nnir.el (nnir-get-active): Ignore nnir-ignored-newsgroups if null.
@@ -3594,8 +3594,8 @@
* nnir.el: Update to handle the registry better.
(autoload): Silence byte-compiler.
(nnir-open-server): Add a hook for nnir groups.
- (nnir-request-move-article): Don't mangle the header. Better to use
- formating variables (which will be added in the future).
+ (nnir-request-move-article): Don't mangle the header. Better to use
+ formatting variables (which will be added in the future).
(nnir-registry-action): Update the registry using the original article
group name.
(nnir-mode): Install nnir-specific hooks for updating the registry.
@@ -4030,7 +4030,7 @@
2010-11-21 Andrew Cohen <cohen@andy.bu.edu>
* nnir.el: Fix typo in comments.
- (nnir-run-imap): Simplify code. No need to reverse artlist.
+ (nnir-run-imap): Simplify code. No need to reverse artlist.
(nnir-run-gmane): Use nnir-tmp-buffer for web results.
2010-11-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -4062,8 +4062,8 @@
2010-11-19 Katsumi Yamaoka <yamaoka@jpl.org>
- * gnus-art.el (gnus-mime-display-single)
- * gnus-html.el (gnus-html-wash-images, gnus-html-prefetch-images)
+ * gnus-art.el (gnus-mime-display-single):
+ * gnus-html.el (gnus-html-wash-images, gnus-html-prefetch-images):
* mm-decode.el (mm-shr): Assume that gnus-inhibit-images may be a group
parameter.
@@ -4418,7 +4418,7 @@
* gnus-util.el (gnus-string-match-p): New function, that is an alias to
string-match-p in Emacs >=23.
- * gnus-msg.el (gnus-configure-posting-styles)
+ * gnus-msg.el (gnus-configure-posting-styles):
* nnir.el (nnir-run-gmane): Use gnus-string-match-p.
2010-11-01 Glenn Morris <rgm@gnu.org>
@@ -5366,8 +5366,8 @@
* gnus-util.el (gnus-remove-if): Allow hash table.
(gnus-remove-if-not): New function.
- * gnus-art.el (gnus-mime-view-part-as-type)
- * gnus-score.el (gnus-summary-score-effect)
+ * gnus-art.el (gnus-mime-view-part-as-type):
+ * gnus-score.el (gnus-summary-score-effect):
* gnus-sum.el (gnus-read-move-group-name):
Replace remove-if-not with gnus-remove-if-not.
@@ -5856,8 +5856,8 @@
2010-09-29 Katsumi Yamaoka <yamaoka@jpl.org>
* mm-util.el (mm-codepage-iso-8859-list, mm-charset-eval-alist)
- (mm-mime-charset)
- * rfc2047.el (rfc2047-syntax-table)
+ (mm-mime-charset):
+ * rfc2047.el (rfc2047-syntax-table):
* utf7.el (utf7-utf-16-coding-system): Comment fix.
* nnrss.el (nnrss-read-server-data, nnrss-read-group-data): Use `load'
@@ -5872,8 +5872,8 @@
2010-09-28 Katsumi Yamaoka <yamaoka@jpl.org>
- * mail-source.el (mail-source-report-new-mail)
- * message.el (message-default-mail-headers)
+ * mail-source.el (mail-source-report-new-mail):
+ * message.el (message-default-mail-headers):
* mm-decode.el (mm-valid-image-format-p): Comment fix.
* mml2015.el (mml2015-use): Don't bind recursive-load-depth-limit.
@@ -6369,8 +6369,8 @@
(gnus-article-next-page-1): No need to adjust the number of lines.
(gnus-article-describe-bindings): Always use help-buffer.
- * gnus-audio.el (gnus-audio-inline-sound)
- * gnus-cus.el (gnus-custom-mode)
+ * gnus-audio.el (gnus-audio-inline-sound):
+ * gnus-cus.el (gnus-custom-mode):
* gnus-group.el (gnus-group-update-tool-bar): Comment fix.
* gnus-sum.el (gnus-remove-overlays): Doc fix.
@@ -6566,9 +6566,9 @@
2010-09-22 Katsumi Yamaoka <yamaoka@jpl.org>
- * mailcap.el (mailcap-parse-mailcap, mailcap-parse-mimetypes)
- * mm-util.el (mm-decompress-buffer)
- * nnir.el (nnir-run-find-grep)
+ * mailcap.el (mailcap-parse-mailcap, mailcap-parse-mimetypes):
+ * mm-util.el (mm-decompress-buffer):
+ * nnir.el (nnir-run-find-grep):
* pop3.el (pop3-list): Use 3rd arg of split-string.
2010-09-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -7434,7 +7434,7 @@
2010-09-01 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-html.el (gnus-html-cache-directory, gnus-html-cache-size)
- (gnus-html-frame-width, gnus-blocked-images)
+ (gnus-html-frame-width, gnus-blocked-images):
* message.el (message-prune-recipient-rules): Add custom version.
* gnus-sum.el (gnus-auto-expirable-marks): Bump custom version.
@@ -7484,11 +7484,11 @@
* gnus-ems.el: Provide compatibility functions for
gnus-set-process-plist.
- * gnus-sum.el (gnus-summary-stop-at-end-of-message)
- * gnus.el (gnus-valid-select-methods)
- * message.el (message-send-mail-partially-limit)
- * mm-decode.el (mm-text-html-renderer)
- * mml.el (mml-insert-mime-headers-always)
+ * gnus-sum.el (gnus-summary-stop-at-end-of-message):
+ * gnus.el (gnus-valid-select-methods):
+ * message.el (message-send-mail-partially-limit):
+ * mm-decode.el (mm-text-html-renderer):
+ * mml.el (mml-insert-mime-headers-always):
* smiley.el (smiley-regexp-alist): Bump custom version.
2010-08-31 Lars Magne Ingebrigtsen <larsi@gnus.org>
@@ -7820,7 +7820,7 @@
2010-05-13 Katsumi Yamaoka <yamaoka@jpl.org>
- * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt)
+ * mml1991.el (mml1991-mailcrypt-encrypt, mml1991-gpg-encrypt):
* mml2015.el (mml2015-gpg-encrypt): Disable multibyte in buffers
generated within the mm-with-unibyte-current-buffer macro.
@@ -7895,11 +7895,11 @@
2010-05-07 Katsumi Yamaoka <yamaoka@jpl.org>
- * nnweb.el (nnweb-gmane-search)
+ * nnweb.el (nnweb-gmane-search):
* yenc.el (yenc-decode-region): Don't run set-buffer-multibyte for
XEmacs.
- * gnus-art.el (gnus-article-browse-html-parts)
+ * gnus-art.el (gnus-article-browse-html-parts):
* gnus-group.el (gnus-read-ephemeral-gmane-group)
(gnus-read-ephemeral-bug-grou): Use mm-make-temp-file instead of
make-temp-file.
@@ -10607,10 +10607,10 @@
2007-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
- * gnus-art.el (gnus-use-idna)
- * gnus-start.el (gnus-site-init-file)
- * message.el (message-use-idna)
- * mm-uu.el (mm-uu-hide-markers)
+ * gnus-art.el (gnus-use-idna):
+ * gnus-start.el (gnus-site-init-file):
+ * message.el (message-use-idna):
+ * mm-uu.el (mm-uu-hide-markers):
* smiley.el (smiley-style): Revert changes that suppress warnings.
2007-12-05 Katsumi Yamaoka <yamaoka@jpl.org>
@@ -11912,13 +11912,13 @@
2007-05-25 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-header-from, gnus-header-subject, gnus-header-name)
- (gnus-header-content)
- * gnus-cite.el (gnus-cite-10)
- * gnus-srvr.el (gnus-server-closed)
+ (gnus-header-content):
+ * gnus-cite.el (gnus-cite-10):
+ * gnus-srvr.el (gnus-server-closed):
* gnus.el (gnus-group-mail-1, gnus-group-mail-1-empty)
(gnus-group-mail-2, gnus-group-mail-2-empty, gnus-group-mail-3)
(gnus-group-mail-3-empty, gnus-group-mail-low)
- (gnus-group-mail-low-empty, gnus-splash)
+ (gnus-group-mail-low-empty, gnus-splash):
* message.el (message-header-to, message-header-cc)
(message-header-subject, message-header-other, message-header-name)
(message-header-xheader, message-separator, message-cited-text)
@@ -21851,7 +21851,7 @@
2004-01-06 Steve Youngs <sryoungs@bigpond.net.au>
- * gnus-ems.el (gnus-mode-line-modified): Don't conditionalise on
+ * gnus-ems.el (gnus-mode-line-modified): Don't conditionalize on
XEmacs version.
* dns.el (dns-make-network-process): Use `open-network-stream'
diff --git a/lisp/gnus/plstore.el b/lisp/gnus/plstore.el
index 340c7255958..50208cc5b0b 100644
--- a/lisp/gnus/plstore.el
+++ b/lisp/gnus/plstore.el
@@ -420,7 +420,7 @@ SECRET-KEYS is a plist containing secret data."
(current-buffer)))))
(epa-select-keys
context
- "Select recipents for encryption.
+ "Select recipients for encryption.
If no one is selected, symmetric encryption will be performed. "
recipients)
(if plstore-encrypt-to
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 6c8db872c0b..a0fae8d8671 100644
--- a/lisp/ibuf-ext.el
+++ b/lisp/ibuf-ext.el
@@ -26,7 +26,7 @@
;;; Commentary:
;; These functions should be automatically loaded when called, but you
-;; can explicity (require 'ibuf-ext) in your ~/.emacs to have them
+;; can explicitly (require 'ibuf-ext) in your ~/.emacs to have them
;; preloaded.
;;; Code:
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el
index bc7dff278cc..cb511c4695e 100644
--- a/lisp/ibuffer.el
+++ b/lisp/ibuffer.el
@@ -2648,7 +2648,7 @@ will be inserted before the group at point."
;;;;;; ibuffer-backward-filter-group ibuffer-forward-filter-group
;;;;;; ibuffer-toggle-filter-group ibuffer-mouse-toggle-filter-group
;;;;;; ibuffer-interactive-filter-by-mode ibuffer-mouse-filter-by-mode
-;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "25e69a1e030791b3a3e7d91d4377173a")
+;;;;;; ibuffer-auto-mode) "ibuf-ext" "ibuf-ext.el" "897e64e4465af94b89e21fa84ae61290")
;;; Generated autoloads from ibuf-ext.el
(autoload 'ibuffer-auto-mode "ibuf-ext" "\
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el
index ef09cdda2de..f0a5ebbee40 100644
--- a/lisp/international/mule-util.el
+++ b/lisp/international/mule-util.el
@@ -314,7 +314,7 @@ Optional 5th argument NIL-FOR-TOO-LONG non-nil means return nil
(defmacro with-coding-priority (coding-systems &rest body)
"Execute BODY like `progn' with CODING-SYSTEMS at the front of priority list.
CODING-SYSTEMS is a list of coding systems. See `set-coding-system-priority'.
-This affects the implicit sorting of lists of coding sysems returned by
+This affects the implicit sorting of lists of coding systems returned by
operations such as `find-coding-systems-region'."
(let ((current (make-symbol "current")))
`(let ((,current (coding-system-priority-list)))
diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el
index 576f443c8e2..5b7601c6335 100644
--- a/lisp/mail/emacsbug.el
+++ b/lisp/mail/emacsbug.el
@@ -437,7 +437,7 @@ and send the mail again%s."
(car bug))
items))
(nreverse items))))
- (widget-insert "No bugs maching your keywords found.\n"))
+ (widget-insert "No bugs matching your keywords found.\n"))
(widget-insert "\n")
(widget-create 'push-button
:notify (lambda (&rest ignore)
diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el
index a0d2281bfe8..06d200c4e3e 100644
--- a/lisp/net/ange-ftp.el
+++ b/lisp/net/ange-ftp.el
@@ -2854,7 +2854,7 @@ NO-ERROR, if a listing for DIRECTORY cannot be obtained."
;; that a wasted listing is not done:
;; 1. When looking for a .dired file in dired-x.el.
;; 2. The syntax of FILE and DIR make it impossible that FILE could be a valid
-;; subdirectory. This is of course an OS dependent judgement.
+;; subdirectory. This is of course an OS dependent judgment.
(defvar dired-local-variables-file)
(defmacro ange-ftp-allow-child-lookup (dir file)
diff --git a/lisp/net/dbus.el b/lisp/net/dbus.el
index 8a8d9e6332f..9254fef8a7f 100644
--- a/lisp/net/dbus.el
+++ b/lisp/net/dbus.el
@@ -101,7 +101,7 @@ Otherwise, return result of last form in BODY, or all other errors."
(defvar dbus-event-error-hooks nil
"Functions to be called when a D-Bus error happens in the event handler.
Every function must accept two arguments, the event and the error variable
-catched in `condition-case' by `dbus-error'.")
+caught in `condition-case' by `dbus-error'.")
;;; Hash table of registered functions.
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ee4c8966626..da6f8a69e6d 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -44,7 +44,7 @@
(defcustom tramp-inline-compress-start-size 4096
"*The minimum size of compressing where inline transfer.
-When inline transfer, compress transfered data of file
+When inline transfer, compress transferred data of file
whose size is this value or above (up to `tramp-copy-size-limit').
If it is nil, no compression at all will be applied."
:group 'tramp
@@ -3726,7 +3726,7 @@ process to set up. VEC specifies the connection."
;; Check whether the output of "uname -sr" has been changed. If
;; yes, this is a strong indication that we must expire all
;; connection properties. We start again with
- ;; `tramp-maybe-open-connection', it will be catched there.
+ ;; `tramp-maybe-open-connection', it will be caught there.
(tramp-message vec 5 "Checking system information")
(let ((old-uname (tramp-get-connection-property vec "uname" nil))
(new-uname
@@ -4215,7 +4215,7 @@ connection if a previous connection has died for some reason."
(tramp-send-command vec "echo are you awake" t t)
(unless (and (memq (process-status p) '(run open))
(tramp-wait-for-output p 10))
- ;; The error will be catched locally.
+ ;; The error will be caught locally.
(tramp-error vec 'file-error "Awake did fail")))
(file-error
(tramp-flush-connection-property vec)
diff --git a/lisp/net/xesam.el b/lisp/net/xesam.el
index 279ea54e4cc..17b22aa03ba 100644
--- a/lisp/net/xesam.el
+++ b/lisp/net/xesam.el
@@ -172,7 +172,7 @@
(defface xesam-highlight '((t :inherit match))
"Face to highlight query entries.
-It will be overlayed by `widget-documentation-face', so it shall
+It will be overlaid by `widget-documentation-face', so it shall
be different at least in one face property not set in that face."
:group 'xesam)
diff --git a/lisp/obsolete/old-whitespace.el b/lisp/obsolete/old-whitespace.el
index c33794f668d..0c0580b55dc 100644
--- a/lisp/obsolete/old-whitespace.el
+++ b/lisp/obsolete/old-whitespace.el
@@ -515,12 +515,12 @@ See `whitespace-buffer' docstring for a summary of the problems."
(whitespace-check-whitespace-mode current-prefix-arg)
(if (and buffer-file-name whitespace-mode)
(let ((whitespace-any nil)
- (whitespace-tabwith 8)
- (whitespace-tabwith-saved tab-width))
+ (whitespace-tabwidth 8)
+ (whitespace-tabwidth-saved tab-width))
;; since all printable TABS should be 8, irrespective of how
;; they are displayed.
- (setq tab-width whitespace-tabwith)
+ (setq tab-width whitespace-tabwidth)
(if (and whitespace-check-buffer-leading
(whitespace-buffer-leading))
@@ -562,7 +562,7 @@ See `whitespace-buffer' docstring for a summary of the problems."
(message "The region is now clean")
(message "%s is now clean" buffer-file-name)))
(whitespace-update-modeline)))
- (setq tab-width whitespace-tabwith-saved))))
+ (setq tab-width whitespace-tabwidth-saved))))
;;;###autoload
(defun whitespace-cleanup-region (s e)
diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog
index 555709f1fa8..6f835c7bfa4 100644
--- a/lisp/org/ChangeLog
+++ b/lisp/org/ChangeLog
@@ -7124,7 +7124,7 @@
2010-11-11 Dan Davison <davison@stats.ox.ac.uk>
* ob.el (org-babel-get-src-block-info): Form info list correctly
- when parenthesised arguments are missing.
+ when parenthesized arguments are missing.
2010-11-11 Dan Davison <davison@stats.ox.ac.uk>
diff --git a/lisp/org/org.el b/lisp/org/org.el
index afd4ea6b4c3..8aca74e69cc 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -2580,7 +2580,7 @@ To turn this on on a per-file basis, insert anywhere in the file:
(defcustom org-time-stamp-custom-formats
'("<%m/%d/%y %a>" . "<%m/%d/%y %a %H:%M>") ; american
"Custom formats for time stamps. See `format-time-string' for the syntax.
-These are overlayed over the default ISO format if the variable
+These are overlaid over the default ISO format if the variable
`org-display-custom-times' is set. Time like %H:%M should be at the
end of the second format. The custom formats are also honored by export
commands, if custom time display is turned on at the time of export."
@@ -15109,7 +15109,7 @@ The command returns the inserted time stamp."
(org-restart-font-lock)
(setq org-table-may-need-update t)
(if org-display-custom-times
- (message "Time stamps are overlayed with custom format")
+ (message "Time stamps are overlaid with custom format")
(message "Time stamp overlays removed")))
(defun org-display-custom-time (beg end)
@@ -18961,7 +18961,7 @@ contexts are:
:target on a <<target>>
:radio-target on a <<<radio-target>>>
:latex-fragment on a LaTeX fragment
-:latex-preview on a LaTeX fragment with overlayed preview image
+:latex-preview on a LaTeX fragment with overlaid preview image
This function expects the position to be visible because it uses font-lock
faces as a help to recognize the following contexts: :table-special, :link,
diff --git a/lisp/proced.el b/lisp/proced.el
index e4987bd926c..baee7c0f6ee 100644
--- a/lisp/proced.el
+++ b/lisp/proced.el
@@ -1332,7 +1332,7 @@ Prefix ARG controls sort order, see `proced-sort-interactive'."
(proced-sort-interactive key arg)
(message "No sorter defined here."))))))
-;;; Formating
+;;; Formatting
(defun proced-format-time (time)
"Format time interval TIME."
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index 64734420a8c..17ff4bd32a6 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -499,7 +499,7 @@ Used to define `ada-*-keywords.'"))
(defvar ada-case-exception-substring '()
"Alist of substrings (entities) that have special casing.
-The substrings are detected for word constituant when the word
+The substrings are detected for word constituent when the word
is not itself in `ada-case-exception', and only for substrings that
either are at the beginning or end of the word, or start after '_'.")
@@ -1773,7 +1773,7 @@ ATTENTION: This function might take very long for big buffers!"
;; `ada-insert-paramlist'.
;; Both steps are called from `ada-format-paramlist'.
;; Note: Comments inside the parameter list are lost.
-;; The syntax has to be correct, or the reformating will fail.
+;; The syntax has to be correct, or the reformatting will fail.
;;--------------------------------------------------------------
(defun ada-format-paramlist ()
@@ -2139,7 +2139,7 @@ command like:
(while command-line-args-left
(let ((source (car command-line-args-left)))
- (message "Formating %s" source)
+ (message "Formatting %s" source)
(find-file source)
(ada-indent-region (point-min) (point-max))
(ada-adjust-case-buffer)
diff --git a/lisp/progmodes/ada-xref.el b/lisp/progmodes/ada-xref.el
index 2f6a7be393a..f30457992a3 100644
--- a/lisp/progmodes/ada-xref.el
+++ b/lisp/progmodes/ada-xref.el
@@ -30,7 +30,7 @@
;;; for lookup and completion in Ada mode.
;;;
;;; If a file *.`adp' exists in the ada-file directory, then it is
-;;; read for configuration informations. It is read only the first
+;;; read for configuration information. It is read only the first
;;; time a cross-reference is asked for, and is not read later.
;;; You need Emacs >= 20.2 to run this package
diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el
index 8213a83461b..ef67a18d807 100644
--- a/lisp/progmodes/cc-awk.el
+++ b/lisp/progmodes/cc-awk.el
@@ -545,7 +545,7 @@
(defun c-awk-vsemi-status-unknown-p ()
;; Are we unsure whether there is a virtual semicolon on the current line?
;; DO NOT under any circumstances attempt to calculate this; that would
- ;; defeat the (admittedly kludgey) purpose of this function, which is to
+ ;; defeat the (admittedly kludgy) purpose of this function, which is to
;; prevent an infinite recursion in c-beginning-of-statement-1 when point
;; starts at a `while' token.
(not (c-get-char-property (c-point 'eol) 'c-awk-NL-prop)))
@@ -894,9 +894,9 @@ std\\(err\\|in\\|out\\)\\|user\\)\\)\\>\
;; Keywords.
(concat "\\<"
(regexp-opt
- '("BEGIN" "END" "break" "continue" "delete" "do" "else"
- "exit" "for" "getline" "if" "in" "next" "nextfile"
- "return" "while")
+ '("BEGIN" "END" "break" "case" "continue" "default" "delete"
+ "do" "else" "exit" "for" "getline" "if" "in" "next"
+ "nextfile" "return" "switch" "while")
t) "\\>")
;; Builtins.
diff --git a/lisp/progmodes/cc-cmds.el b/lisp/progmodes/cc-cmds.el
index 4981bbfd2bc..686695bc838 100644
--- a/lisp/progmodes/cc-cmds.el
+++ b/lisp/progmodes/cc-cmds.el
@@ -1360,7 +1360,7 @@ No indentation or other \"electric\" behavior is performed."
;; Determine where we are with respect to functions (or other brace
;; constructs, included in the term "function" in the rest of this comment).
;; Point is assumed to be outside any macro or literal.
- ;; This is used by c-\(begining\|end\)-of-defun.
+ ;; This is used by c-\(beginning\|end\)-of-defun.
;;
;; Return one of these symbols:
;; at-header : we're at the start of a function's header.
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index cd483d20f2f..0865ddfed69 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -195,9 +195,6 @@
(not prevstate)
(> arg 0)))
-;; Dynamically bound cache for `c-in-literal'.
-(defvar c-in-literal-cache t)
-
;; Basic handling of preprocessor directives.
@@ -2093,28 +2090,35 @@ comment at the start of cc-engine.el for more info."
;; `c-state-literal-at'.
(defsubst c-state-pp-to-literal (from to)
- ;; Do a parse-partial-sexp from FROM to TO, returning the bounds of any
- ;; literal at TO as a cons, otherwise NIL.
- ;; FROM must not be in a literal, and the buffer should already be wide
- ;; enough.
+ ;; Do a parse-partial-sexp from FROM to TO, returning either
+ ;; (STATE TYPE (BEG . END)) if TO is in a literal; or
+ ;; (STATE) otherwise,
+ ;; where STATE is the parsing state at TO, TYPE is the type of the literal
+ ;; (one of 'c, 'c++, 'string) and (BEG . END) is the boundaries of the literal.
+ ;;
+ ;; Only elements 3 (in a string), 4 (in a comment), 5 (following a quote),
+ ;; 7 (comment type) and 8 (start of comment/string) (and possibly 9) of
+ ;; STATE are valid.
(save-excursion
- (let ((s (parse-partial-sexp from to)))
+ (let ((s (parse-partial-sexp from to))
+ ty)
(when (or (nth 3 s) (nth 4 s)) ; in a string or comment
+ (setq ty (cond
+ ((nth 3 s) 'string)
+ ((eq (nth 7 s) t) 'c++)
+ (t 'c)))
(parse-partial-sexp (point) (point-max)
nil ; TARGETDEPTH
nil ; STOPBEFORE
s ; OLDSTATE
- 'syntax-table) ; stop at end of literal
- (cons (nth 8 s) (point))))))
+ 'syntax-table)) ; stop at end of literal
+ (if ty
+ `(,s ,ty (,(nth 8 s) . ,(point)))
+ `(,s)))))
-(defun c-state-literal-at (here)
- ;; If position HERE is inside a literal, return (START . END), the
- ;; boundaries of the literal (which may be outside the accessible bit of the
- ;; buffer). Otherwise, return nil.
- ;;
- ;; This function is almost the same as `c-literal-limits'. It differs in
- ;; that it is a lower level function, and that it rigourously follows the
- ;; syntax from BOB, whereas `c-literal-limits' uses a "local" safe position.
+(defun c-state-safe-place (here)
+ ;; Return a buffer position before HERE which is "safe", i.e. outside any
+ ;; string, comment, or macro.
;;
;; NOTE: This function manipulates `c-state-nonlit-pos-cache'. This cache
;; MAY NOT contain any positions within macros, since macros are frequently
@@ -2137,7 +2141,7 @@ comment at the start of cc-engine.el for more info."
(while (<= (setq npos (+ pos c-state-nonlit-pos-interval))
here)
- (setq lit (c-state-pp-to-literal pos npos))
+ (setq lit (car (cddr (c-state-pp-to-literal pos npos))))
(setq pos (or (cdr lit) npos)) ; end of literal containing npos.
(goto-char pos)
(when (and (c-beginning-of-macro) (/= (point) pos))
@@ -2148,9 +2152,22 @@ comment at the start of cc-engine.el for more info."
(if (> pos c-state-nonlit-pos-cache-limit)
(setq c-state-nonlit-pos-cache-limit pos))
- (if (< pos here)
- (setq lit (c-state-pp-to-literal pos here)))
- lit))))
+ pos))))
+
+(defun c-state-literal-at (here)
+ ;; If position HERE is inside a literal, return (START . END), the
+ ;; boundaries of the literal (which may be outside the accessible bit of the
+ ;; buffer). Otherwise, return nil.
+ ;;
+ ;; This function is almost the same as `c-literal-limits'. Previously, it
+ ;; differed in that it was a lower level function, and that it rigourously
+ ;; followed the syntax from BOB. `c-literal-limits' is now (2011-12)
+ ;; virtually identical to this function.
+ (save-restriction
+ (widen)
+ (save-excursion
+ (let ((pos (c-state-safe-place here)))
+ (car (cddr (c-state-pp-to-literal pos here)))))))
(defsubst c-state-lit-beg (pos)
;; Return the start of the literal containing POS, or POS itself.
@@ -4181,7 +4198,7 @@ comment at the start of cc-engine.el for more info."
;; Tools for handling comments and string literals.
-(defun c-slow-in-literal (&optional lim detect-cpp)
+(defun c-in-literal (&optional lim detect-cpp)
"Return the type of literal point is in, if any.
The return value is `c' if in a C-style comment, `c++' if in a C++
style comment, `string' if in a string literal, `pound' if DETECT-CPP
@@ -4194,67 +4211,12 @@ The last point calculated is cached if the cache is enabled, i.e. if
Note that this function might do hidden buffer changes. See the
comment at the start of cc-engine.el for more info."
-
- (if (and (vectorp c-in-literal-cache)
- (= (point) (aref c-in-literal-cache 0)))
- (aref c-in-literal-cache 1)
- (let ((rtn (save-excursion
- (let* ((pos (point))
- (lim (or lim (progn
- (c-beginning-of-syntax)
- (point))))
- (state (parse-partial-sexp lim pos)))
- (cond
- ((elt state 3) 'string)
- ((elt state 4) (if (elt state 7) 'c++ 'c))
- ((and detect-cpp (c-beginning-of-macro lim)) 'pound)
- (t nil))))))
- ;; cache this result if the cache is enabled
- (if (not c-in-literal-cache)
- (setq c-in-literal-cache (vector (point) rtn)))
- rtn)))
-
-;; XEmacs has a built-in function that should make this much quicker.
-;; I don't think we even need the cache, which makes our lives more
-;; complicated anyway. In this case, lim is only used to detect
-;; cpp directives.
-;;
-;; Note that there is a bug in XEmacs's buffer-syntactic-context when used in
-;; conjunction with syntax-table-properties. The bug is present in, e.g.,
-;; XEmacs 21.4.4. It manifested itself thus:
-;;
-;; Starting with an empty AWK Mode buffer, type
-;; /regexp/ {<C-j>
-;; Point gets wrongly left at column 0, rather than being indented to tab-width.
-;;
-;; AWK Mode is designed such that when the first / is typed, it gets the
-;; syntax-table property "string fence". When the second / is typed, BOTH /s
-;; are given the s-t property "string". However, buffer-syntactic-context
-;; fails to take account of the change of the s-t property on the opening / to
-;; "string", and reports that the { is within a string started by the second /.
-;;
-;; The workaround for this is for the AWK Mode initialization to switch the
-;; defalias for c-in-literal to c-slow-in-literal. This will slow down other
-;; cc-modes in XEmacs whenever an awk-buffer has been initialized.
-;;
-;; (Alan Mackenzie, 2003/4/30).
-
-(defun c-fast-in-literal (&optional lim detect-cpp)
- ;; This function might do hidden buffer changes.
- (let ((context (buffer-syntactic-context)))
- (cond
- ((eq context 'string) 'string)
- ((eq context 'comment) 'c++)
- ((eq context 'block-comment) 'c)
- ((and detect-cpp (save-excursion (c-beginning-of-macro lim))) 'pound))))
-
-(defalias 'c-in-literal
- (if (fboundp 'buffer-syntactic-context)
- 'c-fast-in-literal ; XEmacs
- 'c-slow-in-literal)) ; GNU Emacs
-
-;; The defalias above isn't enough to shut up the byte compiler.
-(cc-bytecomp-defun c-in-literal)
+ (let* ((safe-place (c-state-safe-place (point)))
+ (lit (c-state-pp-to-literal safe-place (point))))
+ (or (cadr lit)
+ (and detect-cpp
+ (save-excursion (c-beginning-of-macro))
+ 'pound))))
(defun c-literal-limits (&optional lim near not-in-delimiter)
"Return a cons of the beginning and end positions of the comment or
@@ -4273,64 +4235,56 @@ comment at the start of cc-engine.el for more info."
(save-excursion
(let* ((pos (point))
- (lim (or lim (progn
- (c-beginning-of-syntax)
- (point))))
- (state (parse-partial-sexp lim pos)))
-
- (cond ((elt state 3) ; String.
- (goto-char (elt state 8))
- (cons (point) (or (c-safe (c-forward-sexp 1) (point))
- (point-max))))
-
- ((elt state 4) ; Comment.
- (goto-char (elt state 8))
- (cons (point) (progn (c-forward-single-comment) (point))))
-
- ((and (not not-in-delimiter)
- (not (elt state 5))
- (eq (char-before) ?/)
- (looking-at "[/*]"))
- ;; We're standing in a comment starter.
- (backward-char 1)
- (cons (point) (progn (c-forward-single-comment) (point))))
-
- (near
- (goto-char pos)
-
- ;; Search forward for a literal.
- (skip-chars-forward " \t")
+ (lim (or lim (c-state-safe-place pos)))
+ (pp-to-lit (c-state-pp-to-literal lim pos))
+ (state (car pp-to-lit))
+ (lit-type (cadr pp-to-lit))
+ (lit-limits (car (cddr pp-to-lit))))
- (cond
- ((looking-at c-string-limit-regexp) ; String.
- (cons (point) (or (c-safe (c-forward-sexp 1) (point))
- (point-max))))
+ (cond
+ (lit-limits)
+ ((and (not not-in-delimiter)
+ (not (elt state 5))
+ (eq (char-before) ?/)
+ (looking-at "[/*]")) ; FIXME!!! use c-line/block-comment-starter. 2008-09-28.
+ ;; We're standing in a comment starter.
+ (backward-char 1)
+ (cons (point) (progn (c-forward-single-comment) (point))))
+
+ (near
+ (goto-char pos)
+ ;; Search forward for a literal.
+ (skip-chars-forward " \t")
+ (cond
+ ((looking-at c-string-limit-regexp) ; String.
+ (cons (point) (or (c-safe (c-forward-sexp 1) (point))
+ (point-max))))
- ((looking-at c-comment-start-regexp) ; Line or block comment.
- (cons (point) (progn (c-forward-single-comment) (point))))
+ ((looking-at c-comment-start-regexp) ; Line or block comment.
+ (cons (point) (progn (c-forward-single-comment) (point))))
- (t
- ;; Search backward.
- (skip-chars-backward " \t")
+ (t
+ ;; Search backward.
+ (skip-chars-backward " \t")
- (let ((end (point)) beg)
- (cond
- ((save-excursion
- (< (skip-syntax-backward c-string-syntax) 0)) ; String.
- (setq beg (c-safe (c-backward-sexp 1) (point))))
-
- ((and (c-safe (forward-char -2) t)
- (looking-at "*/"))
- ;; Block comment. Due to the nature of line
- ;; comments, they will always be covered by the
- ;; normal case above.
- (goto-char end)
- (c-backward-single-comment)
- ;; If LIM is bogus, beg will be bogus.
- (setq beg (point))))
-
- (if beg (cons beg end))))))
- ))))
+ (let ((end (point)) beg)
+ (cond
+ ((save-excursion
+ (< (skip-syntax-backward c-string-syntax) 0)) ; String.
+ (setq beg (c-safe (c-backward-sexp 1) (point))))
+
+ ((and (c-safe (forward-char -2) t)
+ (looking-at "*/"))
+ ;; Block comment. Due to the nature of line
+ ;; comments, they will always be covered by the
+ ;; normal case above.
+ (goto-char end)
+ (c-backward-single-comment)
+ ;; If LIM is bogus, beg will be bogus.
+ (setq beg (point))))
+
+ (if beg (cons beg end))))))
+ ))))
;; In case external callers use this; it did have a docstring.
(defalias 'c-literal-limits-fast 'c-literal-limits)
diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el
index ac4d1bf9e57..c6c8bd107f6 100644
--- a/lisp/progmodes/cc-fonts.el
+++ b/lisp/progmodes/cc-fonts.el
@@ -1211,7 +1211,7 @@ casts and declarations are fontified. Used on level 2 and higher."
;; o - '<> if the arglist is of angle bracket type;
;; o - 'arglist if it's some other arglist;
;; o - nil, if not in an arglist at all. This includes the
- ;; parenthesised condition which follows "if", "while", etc.
+ ;; parenthesized condition which follows "if", "while", etc.
context
;; The position of the next token after the closing paren of
;; the last detected cast.
@@ -1539,10 +1539,11 @@ casts and declarations are fontified. Used on level 2 and higher."
;; Fontification".
(let* ((paren-state (c-parse-state))
(start (point))
+ (bod-lim (max (- (point) 500) (point-min)))
decl-context bo-decl in-typedef type-type ps-elt)
;; First, are we actually in a "local" declaration?
- (setq decl-context (c-beginning-of-decl-1)
+ (setq decl-context (c-beginning-of-decl-1 bod-lim)
bo-decl (point)
in-typedef (looking-at c-typedef-key))
(if in-typedef (c-forward-token-2))
diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el
index 37818638d41..96f0887eec0 100644
--- a/lisp/progmodes/cc-langs.el
+++ b/lisp/progmodes/cc-langs.el
@@ -522,7 +522,7 @@ don't have EOL terminated statements. "
(c-lang-defconst c-vsemi-status-unknown-p-fn
"Contains a function \"are we unsure whether there is a virtual semicolon on this line?\".
-The (admittedly kludgey) purpose of such a function is to prevent an infinite
+The (admittedly kludgy) purpose of such a function is to prevent an infinite
recursion in c-beginning-of-statement-1 when point starts at a `while' token.
The function MUST NOT UNDER ANY CIRCUMSTANCES call c-beginning-of-statement-1,
even indirectly. This variable contains nil for languages which don't have
@@ -2242,8 +2242,7 @@ This construct is \"<keyword> <expression> :\"."
(c-lang-defconst c-label-kwds
"Keywords introducing colon terminated labels in blocks."
- t '("case" "default")
- awk nil)
+ t '("case" "default"))
(c-lang-defconst c-label-kwds-regexp
;; Adorned regexp matching any keyword that introduces a label.
@@ -2998,18 +2997,19 @@ neither in a statement nor in a declaration context. The regexp is
tested at the beginning of every sexp in a suspected label,
i.e. before \":\". Only used if `c-recognize-colon-labels' is set."
t (concat
- ;; Don't allow string literals.
- "\"\\|"
;; All keywords except `c-label-kwds' and `c-protection-kwds'.
(c-make-keywords-re t
(set-difference (c-lang-const c-keywords)
(append (c-lang-const c-label-kwds)
(c-lang-const c-protection-kwds))
:test 'string-equal)))
+ ;; Don't allow string literals, except in AWK. Character constants are OK.
+ (c objc java pike idl) (concat "\"\\|"
+ (c-lang-const c-nonlabel-token-key))
;; Also check for open parens in C++, to catch member init lists in
;; constructors. We normally allow it so that macros with arguments
;; work in labels.
- c++ (concat "\\s\(\\|" (c-lang-const c-nonlabel-token-key)))
+ c++ (concat "\\s\(\\|\"\\|" (c-lang-const c-nonlabel-token-key)))
(c-lang-defvar c-nonlabel-token-key (c-lang-const c-nonlabel-token-key))
(c-lang-defconst c-nonlabel-token-2-key
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index cc5a5236255..36b95f4b3f5 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -943,7 +943,7 @@ Note that the style variables are always made local to the buffer."
;; Note that this function must be FAST rather than accurate. Note
;; also that it only has any effect when font locking is enabled.
;; We exploit this by checking for font-lock-*-face instead of doing
- ;; rigourous syntactic analysis.
+ ;; rigorous syntactic analysis.
;; If either change boundary is wholly inside an identifier, delete
;; it/them from the cache. Don't worry about being inside a string
@@ -1562,10 +1562,6 @@ Key bindings:
(c-common-init 'awk-mode)
(c-awk-unstick-NL-prop)
- ;; Prevent XEmacs's buffer-syntactic-context being used. See the comment
- ;; in cc-engine.el, just before (defun c-fast-in-literal ...
- (defalias 'c-in-literal 'c-slow-in-literal)
-
(c-run-mode-hooks 'c-mode-common-hook 'awk-mode-hook)
(c-update-modeline))
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index ab40dff24f1..86d4a72f408 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -811,6 +811,9 @@ detailed description of this mode.
(define-key gud-minor-mode-map [left-margin C-mouse-3]
'gdb-mouse-jump)
+ (set (make-local-variable 'comint-prompt-regexp)
+ "^(.*gdb[+]?) *")
+
(add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point
nil 'local)
(local-set-key "\C-i" 'completion-at-point)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 75d71d2d8a9..b379ce67fd7 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -108,7 +108,7 @@ To change the default value, use Customize or call the function
Setting it causes the grep commands to put point at the end of their
output window so that the end of the output is always visible rather
-than the begining."
+than the beginning."
:type 'boolean
:version "22.1"
:group 'grep)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 406db76487d..de8da09768d 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -1919,7 +1919,7 @@ extension EXTN. Normally EXTN is given as the regular expression
;; in petticoat junction.
(defun gud-jdb-skip-block ()
- ;; Find the begining of the block.
+ ;; Find the beginning of the block.
(while
(not (eq (following-char) ?{))
@@ -1936,7 +1936,7 @@ extension EXTN. Normally EXTN is given as the regular expression
(gud-jdb-skip-character-literal))
(t (forward-char))))
- ;; Now at the begining of the block.
+ ;; Now at the beginning of the block.
(forward-char)
;; Skip over the body of the block as well as the final brace.
diff --git a/lisp/progmodes/hideif.el b/lisp/progmodes/hideif.el
index 374a45acec6..82961376669 100644
--- a/lisp/progmodes/hideif.el
+++ b/lisp/progmodes/hideif.el
@@ -822,7 +822,7 @@ Point is left unchanged."
(defun hif-possibly-hide ()
"Called at #ifX expression, this hides those parts that should be hidden.
-It uses the judgement of `hide-ifdef-evaluator'."
+It uses the judgment of `hide-ifdef-evaluator'."
;; (message "hif-possibly-hide") (sit-for 1)
(let ((test (hif-canonicalize))
(range (hif-find-range)))
diff --git a/lisp/progmodes/inf-lisp.el b/lisp/progmodes/inf-lisp.el
index 1328e303d45..dd24aeea9a3 100644
--- a/lisp/progmodes/inf-lisp.el
+++ b/lisp/progmodes/inf-lisp.el
@@ -36,7 +36,7 @@
;; This makes these modes easier to use.
;; For documentation on the functionality provided by comint mode, and
-;; the hooks available for customising it, see the file comint.el.
+;; the hooks available for customizing it, see the file comint.el.
;; For further information on inferior-lisp mode, see the comments below.
;; Needs fixin:
diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index c1a87a9d033..024744957c6 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -315,25 +315,32 @@ not be enclosed in { } or ( )."
"List of keywords understood by automake.")
(defconst makefile-gmake-statements
- `("-sinclude" "sinclude" "vpath" ; makefile-makepp-statements takes rest
+ `("-sinclude" "sinclude" ; makefile-makepp-statements takes rest
"ifdef" "ifndef" "ifeq" "ifneq" "-include" "define" "endef" "export"
- "override define" "override" "unexport"
+ "override define" "override" "unexport" "vpath"
,@(cdr makefile-automake-statements))
"List of keywords understood by gmake.")
-;; These are even more silly, because you can have more spaces in between.
(defconst makefile-makepp-statements
- `("and ifdef" "and ifndef" "and ifeq" "and ifneq" "and ifperl"
- "and ifmakeperl" "and ifsys" "and ifnsys" "build_cache" "build_check"
+ `(t ; - alternately means _
+ ;; todo: take if* out of these lists, and let the negation regexp do it all
+ "ifperl" "ifmakeperl" "ifsys" "ifnsys" "iftrue" "ifntrue"
+ "and ifdef" "and ifndef" "and ifeq" "and ifneq" "and ifperl"
+ "and ifmakeperl" "and ifsys" "and ifnsys" "and iftrue" "and ifntrue"
"else ifdef" "else ifndef" "else ifeq" "else ifneq" "else ifperl"
- "else ifmakeperl" "else ifsys" "else ifnsys" "enddef" "global"
- "load_makefile" "ifperl" "ifmakeperl" "ifsys" "ifnsys" "_include"
- "makeperl" "makesub" "no_implicit_load" "perl" "perl-begin" "perl_begin"
- "perl-end" "perl_end" "prebuild" "or ifdef" "or ifndef" "or ifeq"
- "or ifneq" "or ifperl" "or ifmakeperl" "or ifsys" "or ifnsys"
- "override export" "override global" "register_command_parser"
- "register_scanner" "repository" "runtime" "signature" "sub"
- ,@(nthcdr 3 makefile-gmake-statements))
+ "else ifmakeperl" "else ifsys" "else ifnsys" "else iftrue" "else ifntrue"
+ "or ifdef" "or ifndef" "or ifeq" "or ifneq" "or ifperl"
+ "or ifmakeperl" "or ifsys" "or ifnsys" "or iftrue" "or ifntrue"
+
+ "autoload" "build-cache" "build-check" "enddef" "export define"
+ "global" "global build-cache" "global build-check" "global define"
+ "global signature" "global override signature" "load-makefile"
+ "make" "makeperl" "makesub" "no-implicit-load" "perl" "perl-begin"
+ "perl-end" "prebuild" "override export" "override global" "register-parser"
+ "register-command-parser" "register-input-suffix"
+ "register-scanner" "repository" "runtime" "signature" "sub"
+
+ ,@(nthcdr 2 makefile-gmake-statements))
"List of keywords understood by gmake.")
(defconst makefile-bsdmake-statements
@@ -372,7 +379,12 @@ not be enclosed in { } or ( )."
;; Fontify conditionals and includes.
(,(concat "^\\(?: [ \t]*\\)?"
- (regexp-opt keywords t)
+ (replace-regexp-in-string
+ " " "[ \t]+"
+ (if (eq (car keywords) t)
+ (replace-regexp-in-string "-" "[_-]"
+ (regexp-opt (cdr keywords) t))
+ (regexp-opt keywords t)))
"\\>[ \t]*\\([^: \t\n#]*\\)")
(1 font-lock-keyword-face) (2 font-lock-variable-name-face))
@@ -436,7 +448,7 @@ not be enclosed in { } or ( )."
makefile-var-use-regex
makefile-makepp-statements
nil
- "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\)\\>"
+ "^\\(?: [ \t]*\\)?\\(?:and[ \t]+\\|else[ \t]+\\|or[ \t]+\\)?if\\(n\\)\\(?:def\\|eq\\|sys\\|true\\)\\>"
'("[^$]\\(\\$[({]\\(?:output\\|stem\\|target\\)s?\\_>.*?[})]\\)"
1 'makefile-targets append)
@@ -447,17 +459,17 @@ not be enclosed in { } or ( )."
(2 font-lock-keyword-face t)
(3 font-lock-variable-name-face t))
- ;; $(function ...) $((function ...)) ${function ...} ${{function ...}}
- '("[^$]\\$\\(?:((?\\|{{?\\)\\([-a-zA-Z0-9_.]+\\s \\)"
+ ;; $(function ...) $((function ...)) ${...} ${{...}} $[...] $[[...]]
+ '("[^$]\\$\\(?:((?\\|{{?\\|\\[\\[?\\)\\([-a-zA-Z0-9_.]+\\s \\)"
1 font-lock-function-name-face prepend)
- ;; $(shell ...) $((shell ...)) ${shell ...} ${{shell ...}}
- '("[^$]\\$\\(((?\\|{{?\\)shell\\(?:[-_]\\(?:global[-_]\\)?once\\)?[ \t]+"
+ ;; $(shell ...) $((shell ...)) ${...} ${{...}} $[...] $[[...]]
+ '("[^$]\\$\\(((?\\|{{?\\|\\[\\[?\\)shell\\(?:[-_]\\(?:global[-_]\\)?once\\)?[ \t]+"
makefile-match-function-end nil nil
(1 'makefile-shell prepend t))
- ;; $(perl ...) $((perl ...)) ${perl ...} ${{perl ...}}
- '("[^$]\\$\\(((?\\|{{?\\)makeperl[ \t]+"
+ ;; $(perl ...) $((perl ...)) ${...} ${{...}} $[...] $[[...]]
+ '("[^$]\\$\\(((?\\|{{?\\|\\[\\[?\\)makeperl[ \t]+"
makefile-match-function-end nil nil
(1 'makefile-makepp-perl prepend t))
'("[^$]\\$\\(((?\\|{{?\\)perl[ \t]+"
@@ -1688,8 +1700,10 @@ The anchor must have matched the opening parens in the first group."
;; FIXME forward-sexp or somesuch would be better?
(if (setq s (cond ((string= s "(") ")")
((string= s "{") "}")
+ ((string= s "[") "]")
((string= s "((") "))")
- ((string= s "{{") "}}")))
+ ((string= s "{{") "}}")
+ ((string= s "[[") "]]")))
(re-search-forward (concat "\\(.*\\)[ \t]*" s) (line-end-position) t))))
(defun makefile-match-dependency (bound)
diff --git a/lisp/progmodes/pascal.el b/lisp/progmodes/pascal.el
index b1502adbeb1..2db4309d9e0 100644
--- a/lisp/progmodes/pascal.el
+++ b/lisp/progmodes/pascal.el
@@ -786,6 +786,7 @@ on the line which ends a function or procedure named NAME."
(if (looking-at "[ \t]+$")
(skip-chars-forward " \t"))))
+(defvar ind) ;Used via `eval' in pascal-indent-alist.
(defun pascal-indent-line ()
"Indent current line as a Pascal statement."
(let* ((indent-str (pascal-calculate-indent))
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index a81cc107ce3..deac85581d2 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -10812,7 +10812,7 @@ but not if inside a comment or quote."
(defvar vhdl-port-list nil
"Variable to hold last port map parsed.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (ent-name
;; ((generic-names) generic-type generic-init generic-comment group-comment)
;; ((port-names) port-object port-direct port-type port-comment group-comment)
@@ -11660,7 +11660,7 @@ reflected in a subsequent paste operation."
(defvar vhdl-subprog-list nil
"Variable to hold last subprogram interface parsed.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (subprog-name kind
;; ((names) object direct type init comment group-comment)
;; return-type return-comment group-comment)
@@ -12971,7 +12971,7 @@ This does background highlighting of translate-off regions.")
(defvar vhdl-entity-alist nil
"Cache with entities and corresponding architectures for each
project/directory.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key
;; (ent-key ent-name ent-file ent-line
;; (arch-key arch-name arch-file arch-line
@@ -12982,7 +12982,7 @@ project/directory.")
(defvar vhdl-config-alist nil
"Cache with configurations for each project/directory.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key
;; (conf-key conf-name conf-file conf-line ent-key arch-key
;; (inst-key inst-comp-name inst-ent-key inst-arch-key
@@ -12991,7 +12991,7 @@ project/directory.")
(defvar vhdl-package-alist nil
"Cache with packages for each project/directory.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key
;; (pack-key pack-name pack-file pack-line
;; (comp-key comp-name comp-file comp-line)
@@ -13003,19 +13003,19 @@ project/directory.")
(defvar vhdl-ent-inst-alist nil
"Cache with instantiated entities for each project/directory.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key (inst-ent-key))
(defvar vhdl-file-alist nil
"Cache with design units in each file for each project/directory.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key
;; (file-name (ent-list) (arch-list) (arch-ent-list) (conf-list)
;; (pack-list) (pack-body-list) (inst-list) (inst-ent-list))
(defvar vhdl-directory-alist nil
"Cache with source directories for each project.")
-;; structure: (parenthesised expression means list of such entries)
+;; structure: (parenthesized expression means list of such entries)
;; (cache-key (directory))
(defvar vhdl-speedbar-shown-unit-alist nil
@@ -13655,7 +13655,7 @@ of PROJECT."
(vhdl-speedbar-update-current-unit)
(when updated (message "Updating hierarchy...done")))))
-;; structure (parenthesised expression means list of such entries)
+;; structure (parenthesized expression means list of such entries)
;; (inst-key inst-file-marker comp-ent-key comp-ent-file-marker
;; comp-arch-key comp-arch-file-marker comp-conf-key comp-conf-file-marker
;; comp-lib-name level)
diff --git a/lisp/ses.el b/lisp/ses.el
index cceccde3346..403651695a8 100644
--- a/lisp/ses.el
+++ b/lisp/ses.el
@@ -327,7 +327,7 @@ need to be recalculated.")
(defvar ses-call-printer-return nil
"Set to t if last cell printer invoked by `ses-call-printer' requested
-left-justification of the result. Set to error-signal if ses-call-printer
+left-justification of the result. Set to error-signal if `ses-call-printer'
encountered an error during printing. Otherwise nil.")
(defvar ses-start-time nil
@@ -394,7 +394,7 @@ functions refer to its value."
val)))))
(defmacro ses-cell-property-get (property-name row &optional col)
- "Get property named PROPERTY-NAME From a CELL or a pair (ROW,COL).
+ "Get property named PROPERTY-NAME from a CELL or a pair (ROW,COL).
When COL is omitted, CELL=ROW is a cell object. When COL is
present ROW and COL are the integer coordinates of the cell of
@@ -490,8 +490,8 @@ PROPERTY-NAME."
`(aref ses--col-printers ,col))
(defmacro ses-sym-rowcol (sym)
- "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0). Result
-is nil if SYM is not a symbol that names a cell."
+ "From a cell-symbol SYM, gets the cons (row . col). A1 => (0 . 0).
+Result is nil if SYM is not a symbol that names a cell."
`(and (symbolp ,sym) (get ,sym 'ses-cell)))
(defmacro ses-cell (sym value formula printer references)
@@ -625,7 +625,7 @@ is a vector--if a symbol, the new vector is assigned as the symbol's value."
(delete-region pos (point))))
(defun ses-printer-validate (printer)
- "Signals an error if PRINTER is not a valid SES cell printer."
+ "Signal an error if PRINTER is not a valid SES cell printer."
(or (not printer)
(stringp printer)
(functionp printer)
@@ -642,7 +642,7 @@ checking that it is a valid printer function."
(add-to-list 'ses-read-printer-history (prin1-to-string printer))))
(defun ses-formula-record (formula)
- "If FORMULA is of the form 'symbol, adds it to the list of symbolic formulas
+ "If FORMULA is of the form 'symbol, add it to the list of symbolic formulas
for this spreadsheet."
(when (and (eq (car-safe formula) 'quote)
(symbolp (cadr formula)))
@@ -674,6 +674,13 @@ for this spreadsheet."
(put sym 'ses-cell (cons xrow xcol))
(make-local-variable sym)))))
+(defun ses-create-cell-variable (sym row col)
+ "Create a buffer-local variable for cell with symbol
+SYM at position ROW COL. Return nil in case of failure."
+ (unless (local-variable-p sym)
+ (make-local-variable sym)
+ (put sym 'ses-cell (cons row col))))
+
;; We do not delete the ses-cell properties for the cell-variables, in
;; case a formula that refers to this cell is in the kill-ring and is
;; later pasted back in.
@@ -691,7 +698,7 @@ for this spreadsheet."
buffer-undo-list))
(defun ses-reset-header-string ()
- "Flags the header string for update. Upon undo, the header string will be
+ "Flag the header string for update. Upon undo, the header string will be
updated again."
(push '(apply ses-reset-header-string) buffer-undo-list)
(setq ses--header-hscroll -1))
@@ -727,7 +734,7 @@ cell (ROW,COL). This is undoable. The cell's data will be updated through
nil) ; Make coverage-tester happy.
(defun ses-cell-set-formula (row col formula)
- "Store a new formula for (ROW . COL) and enqueues the cell for
+ "Store a new formula for (ROW . COL) and enqueue the cell for
recalculation via `post-command-hook'. Updates the reference lists for the
cells that this cell refers to. Does not update cell value or reprint the
cell. To avoid inconsistencies, this function is not interruptible, which
@@ -812,9 +819,9 @@ means Emacs will crash if FORMULA contains a circular list."
errors)))))
(if errors
(warn "----------------------------------------------------------------
-Some reference where corrupted.
+Some references were corrupted.
-The following is a list of where each element ELT is such
+The following is a list where each element ELT is such
that (car ELT) is the reference of cell CELL with corruption,
and (cdr ELT) is a property list where
@@ -922,8 +929,7 @@ the old and FORCE is nil."
(ses-cell-set-formula row col nil))
(defcustom ses-self-reference-early-detection nil
- "True if cycle detection is early for cells that refer to
-themselves."
+ "True if cycle detection is early for cells that refer to themselves."
:type 'boolean
:group 'ses)
@@ -989,7 +995,7 @@ if the cell's value is unchanged and FORCE is nil."
;;----------------------------------------------------------------------------
(defun ses-in-print-area ()
- "Returns t if point is in print area of spreadsheet."
+ "Return t if point is in print area of spreadsheet."
(<= (point) ses--data-marker))
;; We turn off point-motion-hooks and explicitly position the cursor, in case
@@ -1011,7 +1017,7 @@ if the cell's value is unchanged and FORCE is nil."
(forward-char))))
(defun ses-set-curcell ()
- "Sets `ses--curcell' to the current cell symbol, or a cons (BEG,END) for a
+ "Set `ses--curcell' to the current cell symbol, or a cons (BEG,END) for a
region, or nil if cursor is not at a cell."
(if (or (not mark-active)
deactivate-mark
@@ -1030,10 +1036,10 @@ region, or nil if cursor is not at a cell."
nil)
(defun ses-check-curcell (&rest args)
- "Signal an error if ses--curcell is inappropriate. The end marker is
-appropriate if some argument is 'end. A range is appropriate if some
-argument is 'range. A single cell is appropriate unless some argument is
-'needrange."
+ "Signal an error if `ses--curcell' is inappropriate.
+The end marker is appropriate if some argument is 'end.
+A range is appropriate if some argument is 'range.
+A single cell is appropriate unless some argument is 'needrange."
(if (eq ses--curcell t)
;; curcell recalculation was postponed, but user typed ahead.
(ses-set-curcell))
@@ -1168,7 +1174,7 @@ preceding cell has spilled over."
sig)))
(defun ses-call-printer (printer &optional value)
- "Invokes PRINTER (a string or parenthesized string or function-symbol or
+ "Invoke PRINTER (a string or parenthesized string or function-symbol or
lambda of one argument) on VALUE. Result is the printed cell as a string.
The variable `ses-call-printer-return' is set to t if the printer used
parenthesis to request left-justification, or the error-signal if the
@@ -1200,7 +1206,7 @@ printer signaled one (and \"%s\" is used as the default printer), else nil."
(defun ses-adjust-print-width (col change)
"Insert CHANGE spaces in front of column COL, or at end of line if
COL=NUMCOLS. Deletes characters if CHANGE < 0. Caller should bind
-inhibit-quit to t."
+`inhibit-quit' to t."
(let ((inhibit-read-only t)
(blank (if (> change 0) (make-string change ?\s)))
(at-end (= col ses--numcols)))
@@ -1219,9 +1225,9 @@ inhibit-quit to t."
(delete-char (- change))))))
(defun ses-print-cell-new-width (row col)
- "Same as ses-print-cell, except if the cell's value is *skip*, the preceding
-nonskipped cell is reprinted. This function is used when the width of
-cell (ROW,COL) has changed."
+ "Same as `ses-print-cell', except if the cell's value is *skip*,
+the preceding nonskipped cell is reprinted. This function is used
+when the width of cell (ROW,COL) has changed."
(if (not (eq (ses-cell-value row col) '*skip*))
(ses-print-cell row col)
;;Cell was skipped over - reprint previous
@@ -1344,7 +1350,7 @@ Newlines in the data are escaped."
;;----------------------------------------------------------------------------
(defun ses-formula-references (formula &optional result-so-far)
- "Produce a list of symbols for cells that this formula's value
+ "Produce a list of symbols for cells that this FORMULA's value
refers to. For recursive calls, RESULT-SO-FAR is the list being
constructed, or t to get a wrong-type-argument error when the
first reference is found."
@@ -1389,8 +1395,8 @@ by (ROWINCR,COLINCR)."
(defun ses-relocate-formula (formula startrow startcol rowincr colincr)
"Produce a copy of FORMULA where all symbols that refer to cells in row
-STARTROW or above and col STARTCOL or above are altered by adding ROWINCR
-and COLINCR. STARTROW and STARTCOL are 0-based. Example:
+STARTROW or above, and col STARTCOL or above, are altered by adding ROWINCR
+and COLINCR. STARTROW and STARTCOL are 0-based. Example:
(ses-relocate-formula '(+ A1 B2 D3) 1 2 1 -1)
=> (+ A1 B2 C4)
If ROWINCR or COLINCR is negative, references to cells being deleted are
@@ -1400,7 +1406,8 @@ removed. Example:
Sets `ses-relocate-return' to 'delete if cell-references were removed."
(let (rowcol result)
(if (or (atom formula) (eq (car formula) 'quote))
- (if (setq rowcol (ses-sym-rowcol formula))
+ (if (and (setq rowcol (ses-sym-rowcol formula))
+ (string-match "\\`[A-Z]+[0-9]+\\'" (symbol-name formula)))
(ses-relocate-symbol formula rowcol
startrow startcol rowincr colincr)
formula) ; Pass through as-is.
@@ -1508,14 +1515,15 @@ if the range was altered."
the rectangle (MINROW,MINCOL)..(NUMROWS,NUMCOLS) by adding ROWINCR and COLINCR
to each symbol."
(let (reform)
- (let (mycell newval)
+ (let (mycell newval xrow)
(dotimes-with-progress-reporter
(row ses--numrows) "Relocating formulas..."
(dotimes (col ses--numcols)
(setq ses-relocate-return nil
mycell (ses-get-cell row col)
newval (ses-relocate-formula (ses-cell-formula mycell)
- minrow mincol rowincr colincr))
+ minrow mincol rowincr colincr)
+ xrow (- row rowincr))
(ses-set-cell row col 'formula newval)
(if (eq ses-relocate-return 'range)
;; This cell contains a (ses-range X Y) where a cell has been
@@ -1531,8 +1539,22 @@ to each symbol."
minrow mincol rowincr colincr))
(ses-set-cell row col 'references newval)
(and (>= row minrow) (>= col mincol)
- (ses-set-cell row col 'symbol
- (ses-create-cell-symbol row col))))))
+ (let ((sym (ses-cell-symbol row col))
+ (xcol (- col colincr)))
+ (if (and
+ sym
+ (>= xrow 0)
+ (>= xcol 0)
+ (null (eq sym
+ (ses-create-cell-symbol xrow xcol))))
+ ;; This is a renamed cell, do not update the cell
+ ;; name, but just update the coordinate property.
+ (put sym 'ses-cell (cons row col))
+ (ses-set-cell row col 'symbol
+ (setq sym (ses-create-cell-symbol row col)))
+ (unless (and (boundp sym) (local-variable-p sym))
+ (set (make-local-variable sym) nil)
+ (put sym 'ses-cell (cons row col)))))) )))
;; Relocate the cell values.
(let (oldval myrow mycol xrow xcol)
(cond
@@ -1545,11 +1567,17 @@ to each symbol."
(setq mycol (+ col mincol)
xrow (- myrow rowincr)
xcol (- mycol colincr))
- (if (and (< xrow ses--numrows) (< xcol ses--numcols))
- (setq oldval (ses-cell-value xrow xcol))
- ;; Cell is off the end of the array.
- (setq oldval (symbol-value (ses-create-cell-symbol xrow xcol))))
- (ses-set-cell myrow mycol 'value oldval))))
+ (let ((sym (ses-cell-symbol myrow mycol))
+ (xsym (ses-create-cell-symbol xrow xcol)))
+ ;; Make the value relocation only when if the cell is not
+ ;; a renamed cell. Otherwise this is not needed.
+ (and (eq sym xsym)
+ (ses-set-cell myrow mycol 'value
+ (if (and (< xrow ses--numrows) (< xcol ses--numcols))
+ (ses-cell-value xrow xcol)
+ ;;Cell is off the end of the array
+ (symbol-value xsym))))))))
+
((and (wholenump rowincr) (wholenump colincr))
;; Insertion of rows and/or columns. Run the loop backwards.
(let ((disty (1- ses--numrows))
@@ -1618,7 +1646,8 @@ to each symbol."
(makunbound sym)))
(defun ses-aset-with-undo (array idx newval)
- "Like aset, but undoable. Result is t if element has changed"
+ "Like `aset', but undoable.
+Result is t if element has changed."
(unless (equal (aref array idx) newval)
(push `(apply ses-aset-with-undo ,array ,idx
,(aref array idx)) buffer-undo-list)
@@ -1631,8 +1660,8 @@ to each symbol."
;;----------------------------------------------------------------------------
(defun ses-load ()
- "Parse the current buffer and sets up buffer-local variables. Does not
-execute cell formulas or print functions."
+ "Parse the current buffer and set up buffer-local variables.
+Does not execute cell formulas or print functions."
(widen)
;; Read our global parameters, which should be a 3-element list.
(goto-char (point-max))
@@ -1658,7 +1687,6 @@ execute cell formulas or print functions."
(message "Upgrading from SES-1 file format")))
(or (= ses--file-format 2)
(error "This file needs a newer version of the SES library code"))
- (ses-create-cell-variable-range 0 (1- ses--numrows) 0 (1- ses--numcols))
;; Initialize cell array.
(setq ses--cells (make-vector ses--numrows nil))
(dotimes (row ses--numrows)
@@ -1678,11 +1706,10 @@ execute cell formulas or print functions."
(dotimes (row ses--numrows)
(dotimes (col ses--numcols)
(let* ((x (read (current-buffer)))
- (rowcol (ses-sym-rowcol (car-safe (cdr-safe x)))))
+ (sym (car-safe (cdr-safe x))))
(or (and (looking-at "\n")
(eq (car-safe x) 'ses-cell)
- (eq row (car rowcol))
- (eq col (cdr rowcol)))
+ (ses-create-cell-variable sym row col))
(error "Cell-def error"))
(eval x)))
(or (looking-at "\n\n")
@@ -2082,8 +2109,7 @@ to are recalculated first."
(ses-jump-safe startcell)))
(defun ses-truncate-cell ()
- "Reprint current cell, but without spillover into any following blank
-cells."
+ "Reprint current cell, but without spillover into any following blank cells."
(interactive "*")
(ses-check-curcell)
(let* ((rowcol (ses-sym-rowcol ses--curcell))
@@ -2331,8 +2357,8 @@ right-justified) or a list of one string (will be left-justified)."
(ses-print-cell row col))))
(defun ses-read-column-printer (col newval)
- "Set the printer function for the current column. See
-`ses-read-cell-printer' for input forms."
+ "Set the printer function for the current column.
+See `ses-read-cell-printer' for input forms."
(interactive
(let ((col (cdr (ses-sym-rowcol ses--curcell))))
(ses-check-curcell)
@@ -2348,8 +2374,8 @@ right-justified) or a list of one string (will be left-justified)."
(ses-print-cell row col)))))
(defun ses-read-default-printer (newval)
- "Set the default printer function for cells that have no other. See
-`ses-read-cell-printer' for input forms."
+ "Set the default printer function for cells that have no other.
+See `ses-read-cell-printer' for input forms."
(interactive
(list (ses-read-printer "Default printer: " ses--default-printer)))
(unless (eq newval t)
@@ -2363,8 +2389,8 @@ right-justified) or a list of one string (will be left-justified)."
;;----------------------------------------------------------------------------
(defun ses-insert-row (count)
- "Insert a new row before the current one. With prefix, insert COUNT rows
-before current one."
+ "Insert a new row before the current one.
+With prefix, insert COUNT rows before current one."
(interactive "*p")
(ses-check-curcell 'end)
(or (> count 0) (signal 'args-out-of-range nil))
@@ -2416,8 +2442,8 @@ before current one."
(ses-goto-print (1- ses--numrows) 0)))
(defun ses-delete-row (count)
- "Delete the current row. With prefix, Deletes COUNT rows starting from the
-current one."
+ "Delete the current row.
+With prefix, deletes COUNT rows starting from the current one."
(interactive "*p")
(ses-check-curcell)
(or (> count 0) (signal 'args-out-of-range nil))
@@ -2509,8 +2535,8 @@ If COL is specified, the new column(s) get the specified WIDTH and PRINTER
(ses-jump-safe ses--curcell))
(defun ses-delete-column (count)
- "Delete the current column. With prefix, Deletes COUNT columns starting
-from the current one."
+ "Delete the current column.
+With prefix, deletes COUNT columns starting from the current one."
(interactive "*p")
(ses-check-curcell)
(or (> count 0) (signal 'args-out-of-range nil))
@@ -2584,7 +2610,7 @@ inserts a new row if at bottom of print area. Repeat COUNT times."
(forward-char)))
(defun ses-append-row-jump-first-column ()
- "Insert a new row after current one and jumps to its first column."
+ "Insert a new row after current one and jump to its first column."
(interactive "*")
(ses-check-curcell)
(ses-begin-change)
@@ -2687,8 +2713,8 @@ the corresponding data cell."
line)
(defun ses-kill-override (beg end)
- "Generic override for any commands that kill text. We clear the killed
-cells instead of deleting them."
+ "Generic override for any commands that kill text.
+We clear the killed cells instead of deleting them."
(interactive "r")
(ses-check-curcell 'needrange)
;; For some reason, the text-read-only error is not caught by `delete-region',
@@ -2749,9 +2775,9 @@ as symbols."
(defun ses-yank-pop (arg)
"Replace just-yanked stretch of killed text with a different stretch.
-This command is allowed only immediately after a `yank' or a `yank-pop', when
-the region contains a stretch of reinserted previously-killed text. We
-replace it with a different stretch of killed text.
+This command is allowed only immediately after a `yank' or a `yank-pop',
+when the region contains a stretch of reinserted previously-killed text.
+We replace it with a different stretch of killed text.
Unlike standard `yank-pop', this function uses `undo' to delete the
previous insertion."
(interactive "*p")
@@ -2765,7 +2791,7 @@ previous insertion."
(setq this-command 'yank))
(defun ses-yank-cells (text arg)
- "If the TEXT has a proper set of 'ses attributes, inserts the text as
+ "If the TEXT has a proper set of 'ses attributes, insert the text as
cells, else return nil. The cells are reprinted--the supplied text is
ignored because the column widths, default printer, etc. at yank time might
be different from those at kill-time. ARG is a list to indicate that
@@ -2848,8 +2874,8 @@ cons of ROW and COL). Treat plain symbols as strings unless ARG is a list."
(ses-cell-set-formula row col val))))
(defun ses-yank-tsf (text arg)
- "If TEXT contains tabs and/or newlines, treats the tabs as
-column-separators and the newlines as row-separators and inserts the text as
+ "If TEXT contains tabs and/or newlines, treat the tabs as
+column-separators and the newlines as row-separators and insert the text as
cell formulas--else return nil. Treat plain symbols as strings unless ARG
is a list. Ignore a final newline."
(if (or (not (string-match "[\t\n]" text))
@@ -2887,8 +2913,8 @@ is a list. Ignore a final newline."
t)))
(defun ses-yank-resize (needrows needcols)
- "If this yank will require inserting rows and/or columns, asks for
-confirmation and then inserts them. Result is (row,col) for top left of yank
+ "If this yank will require inserting rows and/or columns, ask for
+confirmation and then insert them. Result is (row,col) for top left of yank
spot, or error signal if user requests cancel."
(ses-begin-change)
(let ((rowcol (if ses--curcell
@@ -2931,9 +2957,9 @@ newlines between rows. Result is placed in kill ring."
(ses-export-tab t))
(defun ses-export-tab (want-formulas)
- "Export the current range with tabs between columns and newlines between
-rows. Result is placed in kill ring. The export is values unless
-WANT-FORMULAS is non-nil. Newlines and tabs in the export text are escaped."
+ "Export the current range with tabs between columns and newlines between rows.
+Result is placed in kill ring. The export is values unless WANT-FORMULAS
+is non-nil. Newlines and tabs in the export text are escaped."
(ses-check-curcell 'needrange)
(let ((print-escape-newlines t)
result item)
@@ -2992,7 +3018,7 @@ The top row is row 1. Selecting row 0 displays the default header row."
(ses-reset-header-string))
(defun ses-mark-row ()
- "Marks the entirety of current row as a range."
+ "Mark the entirety of current row as a range."
(interactive)
(ses-check-curcell 'range)
(let ((row (car (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell)))))
@@ -3002,7 +3028,7 @@ The top row is row 1. Selecting row 0 displays the default header row."
(ses-goto-print row 0)))
(defun ses-mark-column ()
- "Marks the entirety of current column as a range."
+ "Mark the entirety of current column as a range."
(interactive)
(ses-check-curcell 'range)
(let ((col (cdr (ses-sym-rowcol (or (car-safe ses--curcell) ses--curcell))))
@@ -3046,13 +3072,14 @@ The top row is row 1. Selecting row 0 displays the default header row."
(ses-goto-print row col)))))
(defun ses-renarrow-buffer ()
- "Narrow the buffer so only the print area is visible. Use after \\[widen]."
+ "Narrow the buffer so only the print area is visible.
+Use after \\[widen]."
(interactive)
(setq ses--deferred-narrow t))
(defun ses-sort-column (sorter &optional reverse)
- "Sorts the range by a specified column. With prefix, sorts in
-REVERSE order."
+ "Sort the range by a specified column.
+With prefix, sorts in REVERSE order."
(interactive "*sSort column: \nP")
(ses-check-curcell 'needrange)
(let ((min (ses-sym-rowcol (car ses--curcell)))
@@ -3103,7 +3130,7 @@ REVERSE order."
(ses-sort-column (ses-column-letter col) reverse))))
(defun ses-insert-range ()
- "Inserts into minibuffer the list of cells currently highlighted in the
+ "Insert into minibuffer the list of cells currently highlighted in the
spreadsheet."
(interactive "*")
(let (x)
@@ -3115,7 +3142,7 @@ spreadsheet."
(insert (substring (prin1-to-string (nreverse x)) 1 -1))))
(defun ses-insert-ses-range ()
- "Inserts \"(ses-range x y)\" in the minibuffer to represent the currently
+ "Insert \"(ses-range x y)\" in the minibuffer to represent the currently
highlighted range in the spreadsheet."
(interactive "*")
(let (x)
@@ -3139,13 +3166,67 @@ highlighted range in the spreadsheet."
(mouse-set-point event)
(ses-insert-ses-range))
+(defun ses-replace-name-in-formula (formula old-name new-name)
+ (let ((new-formula formula))
+ (unless (and (consp formula)
+ (eq (car-safe formula) 'quote))
+ (while formula
+ (let ((elt (car-safe formula)))
+ (cond
+ ((consp elt)
+ (setcar formula (ses-replace-name-in-formula elt old-name new-name)))
+ ((and (symbolp elt)
+ (eq (car-safe formula) old-name))
+ (setcar formula new-name))))
+ (setq formula (cdr formula))))
+ new-formula))
+
+(defun ses-rename-cell (new-name)
+ "Rename current cell."
+ (interactive "*SEnter new name: ")
+ (ses-check-curcell)
+ (or
+ (and (local-variable-p new-name)
+ (ses-sym-rowcol new-name)
+ (error "Already a cell name"))
+ (and (boundp new-name)
+ (null (yes-or-no-p (format "`%S' is already bound outside this buffer, continue? "
+ new-name)))
+ (error "Already a bound cell name")))
+ (let* ((rowcol (ses-sym-rowcol ses--curcell))
+ (cell (ses-get-cell (car rowcol) (cdr rowcol))))
+ (dolist (reference (ses-cell-references (car rowcol) (cdr rowcol)))
+ (let* ((rowcol (ses-sym-rowcol reference))
+ (cell (ses-get-cell (car rowcol) (cdr rowcol))))
+ (ses-cell-set-formula (car rowcol)
+ (cdr rowcol)
+ (ses-replace-name-in-formula
+ (ses-cell-formula cell)
+ ses--curcell
+ new-name))))
+ (put new-name 'ses-cell rowcol)
+ (set new-name (symbol-value ses--curcell))
+ (aset cell 0 new-name)
+ (put ses--curcell 'ses-cell nil)
+ (makunbound ses--curcell)
+ (setq ses--curcell new-name)
+ (let* ((pos (point))
+ (inhibit-read-only t)
+ (col (current-column))
+ (end (save-excursion
+ (move-to-column (1+ col))
+ (if (eolp)
+ (+ pos (ses-col-width col) 1)
+ (point)))))
+ (put-text-property pos end 'intangible new-name))) )
+
;;----------------------------------------------------------------------------
;; Checking formulas for safety
;;----------------------------------------------------------------------------
(defun ses-safe-printer (printer)
- "Returns PRINTER if safe, or the substitute printer `ses-unsafe' otherwise."
+ "Return PRINTER if safe, or the substitute printer `ses-unsafe' otherwise."
(if (or (stringp printer)
(stringp (car-safe printer))
(not printer)
@@ -3154,16 +3235,16 @@ highlighted range in the spreadsheet."
'ses-unsafe))
(defun ses-safe-formula (formula)
- "Returns FORMULA if safe, or the substitute formula *unsafe* otherwise."
+ "Return FORMULA if safe, or the substitute formula *unsafe* otherwise."
(if (ses-warn-unsafe formula 'unsafep)
formula
`(ses-unsafe ',formula)))
(defun ses-warn-unsafe (formula checker)
- "Applies CHECKER to FORMULA. If result is non-nil, asks user for
-confirmation about FORMULA, which might be unsafe. Returns t if formula
-is safe or user allows execution anyway. Always returns t if
-`safe-functions' is t."
+ "Apply CHECKER to FORMULA.
+If result is non-nil, asks user for confirmation about FORMULA,
+which might be unsafe. Returns t if formula is safe or user allows
+execution anyway. Always returns t if `safe-functions' is t."
(if (eq safe-functions t)
t
(setq checker (funcall checker formula))
@@ -3178,13 +3259,13 @@ is safe or user allows execution anyway. Always returns t if
;;----------------------------------------------------------------------------
(defun ses--clean-! (&rest x)
- "Clean by delq list X from any occurrence of `nil' or `*skip*'."
+ "Clean by `delq' list X from any occurrence of `nil' or `*skip*'."
(delq nil (delq '*skip* x)))
(defun ses--clean-_ (x y)
"Clean list X by replacing by Y any occurrence of `nil' or `*skip*'.
-This will change X by making setcar on its cons cells."
+This will change X by making `setcar' on its cons cells."
(let ((ret x) ret-elt)
(while ret
(setq ret-elt (car ret))
@@ -3194,7 +3275,7 @@ This will change X by making setcar on its cons cells."
x)
(defmacro ses-range (from to &rest rest)
- "Expands to a list of cell-symbols for the range going from
+ "Expand to a list of cell-symbols for the range going from
FROM up to TO. The range automatically expands to include any
new row or column inserted into its middle. The SES library code
specifically looks for the symbol `ses-range', so don't create an
@@ -3207,8 +3288,8 @@ In the sequel we assume that cells A1, B1, A2 B2 have respective values
1 2 3 and 4.
Readout direction is specified by a `>v', '`>^', `<v', `<^',
-`v>', `v<', `^>', `^<' flag. For historical reasons, in absence
-of such a flag, a default direction of `^<' is assumed. This
+`v>', `v<', `^>', `^<' flag. For historical reasons, in absence
+of such a flag, a default direction of `^<' is assumed. This
way `(ses-range A1 B2 ^>)' will evaluate to `(1 3 2 4)',
while `(ses-range A1 B2 >^)' will evaluate to (3 4 1 2).
@@ -3221,18 +3302,18 @@ If the range is one column, then `v' can be used as a shorthand to
A `!' flag will remove all cells whose value is nil or `*skip*'.
A `_' flag will replace nil or `*skip*' by the value following
-the `_' flag. If the `_' flag is the last argument, then they are
+the `_' flag. If the `_' flag is the last argument, then they are
replaced by integer 0.
A `*', `*1' or `*2' flag will vectorize the range in the sense of
-Calc. See info node `(Calc) Top'. Flag `*' will output either a
+Calc. See info node `(Calc) Top'. Flag `*' will output either a
vector or a matrix depending on the number of rows, `*1' will
flatten the result to a one row vector, and `*2' will make a
matrix whatever the number of rows.
Warning: interaction with Calc is experimental and may produce
-confusing results if you are not aware of Calc data format. Use
-`math-format-value' as a printer for Calc objects."
+confusing results if you are not aware of Calc data format.
+Use `math-format-value' as a printer for Calc objects."
(let (result-row
result
(prev-row -1)
@@ -3319,10 +3400,10 @@ are ignored. Result is always floating-point, even if all args are integers."
(/ (float (apply '+ list)) (length list)))
(defmacro ses-select (fromrange test torange)
- "Select cells in FROMRANGE that are `equal' to TEST. For each match, return
-the corresponding cell from TORANGE. The ranges are macroexpanded but not
-evaluated so they should be either (ses-range BEG END) or (list ...). The
-TEST is evaluated."
+ "Select cells in FROMRANGE that are `equal' to TEST.
+For each match, return the corresponding cell from TORANGE.
+The ranges are macroexpanded but not evaluated so they should be
+either (ses-range BEG END) or (list ...). The TEST is evaluated."
(setq fromrange (cdr (macroexpand fromrange))
torange (cdr (macroexpand torange))
test (eval test))
@@ -3352,9 +3433,10 @@ TEST is evaluated."
(defvar col)
(defun ses-center (value &optional span fill)
- "Print VALUE, centered within column. FILL is the fill character for
-centering (default = space). SPAN indicates how many additional rightward
-columns to include in width (default = 0)."
+ "Print VALUE, centered within column.
+FILL is the fill character for centering (default = space).
+SPAN indicates how many additional rightward columns to include
+in width (default = 0)."
(let ((printer (or (ses-col-printer col) ses--default-printer))
(width (ses-col-width col))
half)
@@ -3373,8 +3455,8 @@ columns to include in width (default = 0)."
(defun ses-center-span (value &optional fill)
"Print VALUE, centered within the span that starts in the current column
-and continues until the next nonblank column. FILL specifies the fill
-character (default = space)."
+and continues until the next nonblank column.
+FILL specifies the fill character (default = space)."
(let ((end (1+ col)))
(while (and (< end ses--numcols)
(memq (ses-cell-value row end) '(nil *skip*)))
@@ -3382,8 +3464,8 @@ character (default = space)."
(ses-center value (- end col 1) fill)))
(defun ses-dashfill (value &optional span)
- "Print VALUE centered using dashes. SPAN indicates how many rightward
-columns to include in width (default = 0)."
+ "Print VALUE centered using dashes.
+SPAN indicates how many rightward columns to include in width (default = 0)."
(ses-center value span ?-))
(defun ses-dashfill-span (value)
@@ -3397,7 +3479,7 @@ current column and continues until the next nonblank column."
(ses-center-span value ?~))
(defun ses-unsafe (value)
- "Substitute for an unsafe formula or printer"
+ "Substitute for an unsafe formula or printer."
(error "Unsafe formula or printer"))
;;All standard printers are safe, including ses-unsafe!
diff --git a/lisp/shell.el b/lisp/shell.el
index 47119e6769c..fdfc8b3cf19 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -35,7 +35,7 @@
;; This makes these modes easier to use.
;; For documentation on the functionality provided by comint mode, and
-;; the hooks available for customising it, see the file comint.el.
+;; the hooks available for customizing it, see the file comint.el.
;; For further information on shell mode, see the comments below.
;; Needs fixin:
diff --git a/lisp/url/url-cookie.el b/lisp/url/url-cookie.el
index f8417791ce5..746a4dc77b5 100644
--- a/lisp/url/url-cookie.el
+++ b/lisp/url/url-cookie.el
@@ -316,7 +316,7 @@ telling Microsoft that."
(set (if (> trusted untrusted) 'untrusted 'trusted) nil))
(cond
(untrusted
- ;; The site was explicity marked as untrusted by the user.
+ ;; The site was explicitly marked as untrusted by the user.
nil)
((or (eq url-privacy-level 'paranoid)
(and (listp url-privacy-level) (memq 'cookies url-privacy-level)))
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index cfb98c6937e..19e0b621d87 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -62,7 +62,6 @@
(mapc 'make-variable-buffer-local
'(
url-current-object
- url-current-referer
url-current-mime-headers
))
diff --git a/lisp/window.el b/lisp/window.el
index 138fb7bcb2a..dcf7394b204 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -2204,9 +2204,9 @@ skip -COUNT windows backwards. COUNT zero means do not skip any
window, so select the selected window. In an interactive call,
COUNT is the numeric prefix argument. Return nil.
-If the `other-window' parameter of WINDOW is a function and
-`ignore-window-parameters' is nil, call that function with the
-arguments COUNT and ALL-FRAMES.
+If the `other-window' parameter of the selected window is a
+function and `ignore-window-parameters' is nil, call that
+function with the arguments COUNT and ALL-FRAMES.
This function does not select a window whose `no-other-window'
window parameter is non-nil.
@@ -2455,7 +2455,7 @@ window signal an error."
(throw 'done (delete-other-windows atom-root)))
((eq window-side 'none)
;; Set side-main to the major non-side window.
- (setq side-main (window-with-parameter 'window-side 'none nil t)))
+ (setq side-main (window-with-parameter 'window-side 'none frame t)))
((memq window-side window-sides)
(error "Cannot make side window the only window")))
;; If WINDOW is the main non-side window, do nothing.
diff --git a/src/ChangeLog b/src/ChangeLog
index f525535e4d8..e2c579459a2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,4 +1,4 @@
-2011-12-11 Paul Eggert <eggert@cs.ucla.edu>
+2011-12-14 Paul Eggert <eggert@cs.ucla.edu>
Fix integer width and related bugs (Bug#9874).
* alloc.c (pure_bytes_used_lisp, pure_bytes_used_non_lisp):
@@ -788,6 +788,20 @@
rather than rolling our own approximation.
(SCROLL_BAR_VEC_SIZE): Remove; not used.
+2011-12-13 Martin Rudalics <rudalics@gmx.at>
+
+ * window.c (Vwindow_combination_resize)
+ (Vwindow_combination_limit): Use t instead of non-nil in
+ doc-strings.
+ (Vrecenter_redisplay): Add first sentence of doc-string on
+ separate line.
+ (Frecenter): Fix doc-string typo.
+
+2011-12-11 Kenichi Handa <handa@m17n.org>
+
+ * coding.c (Funencodable_char_position): Pay attention to the
+ buffer text relocation (Bug#9389).
+
2011-12-10 Jan Djärv <jan.h.d@swipnet.se>
* xterm.c (x_term_init): Move call to gdk_window_add_filter before
diff --git a/src/ChangeLog.10 b/src/ChangeLog.10
index e759183724e..53f7a016654 100644
--- a/src/ChangeLog.10
+++ b/src/ChangeLog.10
@@ -15816,14 +15816,14 @@
Add prototypes.
* macterm.c (mac_draw_bitmap): Add overlay_p arg.
- (x_draw_fringe_bitmap): Handle overlayed fringe bitmaps;
+ (x_draw_fringe_bitmap): Handle overlaid fringe bitmaps;
thanks to YAMAMOTO Mitsuharu for advice on how to do this.
Use cursor color for displaying cursor in fringe.
(x_redisplay_interface): Add null handlers for
define_fringe_bitmap and destroy_fringe_bitmap functions.
* w32term.c (w32_draw_fringe_bitmap): Copy unadapted code from
- xterm.c to handle overlayed fringe bitmaps and to use cursor color
+ xterm.c to handle overlaid fringe bitmaps and to use cursor color
for displaying cursor in fringe.
(w32_define_fringe_bitmap, w32_destroy_fringe_bitmap): New W32
specific functions to define and destroy fringe bitmaps in fringe_bmp.
@@ -15849,7 +15849,7 @@
(display_line): Handle cursor in fringe at eob.
(display_line): Set row user fringe bitmaps from iterator.
- * xterm.c (x_draw_fringe_bitmap): Handle overlayed fringe bitmaps.
+ * xterm.c (x_draw_fringe_bitmap): Handle overlaid fringe bitmaps.
Use cursor color for displaying cursor in fringe.
(x_redisplay_interface): Add null handlers for
define_fringe_bitmap and destroy_fringe_bitmap functions.
diff --git a/src/ChangeLog.2 b/src/ChangeLog.2
index ba61c337efc..d3be0064610 100644
--- a/src/ChangeLog.2
+++ b/src/ChangeLog.2
@@ -2254,7 +2254,7 @@
Initialize save_color.
* fileio.c, search.c, sysdep.c, filelock.c, editfns.c, process.c:
- Delete/replace unused/conditionalised variables
+ Delete/replace unused/conditionalized variables
1987-01-15 Richard M. Stallman (rms@prep)
@@ -2632,7 +2632,7 @@
* fns.c: Fding requires an arg; pass Qnil.
* m-alliant.h: define TEXT_START as 0x1000.
- Don't define LIBS_STANDARD; the default (sharable) library
+ Don't define LIBS_STANDARD; the default (shareable) library
is said to work now.
* alloc.c (mark_object): Now pass address of slot being marked.
@@ -4220,7 +4220,7 @@
Increase PURESIZE again (sigh)
* unexec.c (write_segment):
- Kludgey coercions ("(int)") to get this line to compile:
+ Kludgy coercions ("(int)") to get this line to compile:
nwrite = (((int) ptr + 128) & ~127) - (int) ptr;
Also changed incorrect ~128 to ~127.
diff --git a/src/alloc.c b/src/alloc.c
index 84a84df3597..05b681cdafb 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6400,7 +6400,7 @@ If this portion is smaller than `gc-cons-threshold', this is ignored. */);
Vgc_cons_percentage = make_float (0.1);
DEFVAR_INT ("pure-bytes-used", pure_bytes_used,
- doc: /* Number of bytes of sharable Lisp data allocated so far. */);
+ doc: /* Number of bytes of shareable Lisp data allocated so far. */);
DEFVAR_INT ("cons-cells-consed", cons_cells_consed,
doc: /* Number of cons cells that have been consed so far. */);
diff --git a/src/coding.c b/src/coding.c
index 74cf232cfb2..a2ea9b302cf 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -8755,6 +8755,7 @@ to the string. */)
}
positions = Qnil;
+ charset_map_loaded = 0;
while (1)
{
int c;
@@ -8782,6 +8783,16 @@ to the string. */)
}
from++;
+ if (charset_map_loaded && NILP (string))
+ {
+ p = CHAR_POS_ADDR (from);
+ pend = CHAR_POS_ADDR (to);
+ if (from < GPT && to >= GPT)
+ stop = GPT_ADDR;
+ else
+ stop = pend;
+ charset_map_loaded = 0;
+ }
}
return (NILP (count) ? Fcar (positions) : Fnreverse (positions));
diff --git a/src/editfns.c b/src/editfns.c
index 16e552afe1d..2a096db727d 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -3859,7 +3859,7 @@ usage: (format STRING &rest OBJECTS) */)
enum
{
/* Maximum precision for a %f conversion such that the
- trailing output digit might be nonzero. Any precisions
+ trailing output digit might be nonzero. Any precision
larger than this will not yield useful information. */
USEFUL_PRECISION_MAX =
((1 - DBL_MIN_EXP)
diff --git a/src/emacs.c b/src/emacs.c
index 4c8d3298495..6c96f7eb5e3 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -951,7 +951,7 @@ main (int argc, char **argv)
}
/* Command line option --no-windows is deprecated and thus not mentioned
- in the manual and usage informations. */
+ in the manual and usage information. */
if (argmatch (argv, argc, "-nw", "--no-window-system", 6, NULL, &skip_args)
|| argmatch (argv, argc, "-nw", "--no-windows", 6, NULL, &skip_args))
inhibit_window_system = 1;
diff --git a/src/fontset.c b/src/fontset.c
index b5b36822a2d..7d2cbcafa70 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -645,7 +645,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face, int id, int fa
if (font_has_char (f, font_object, c))
goto found;
- /* Find a font already opened, maching with the current spec,
+ /* Find a font already opened, matching with the current spec,
and supporting C. */
font_def = RFONT_DEF_FONT_DEF (rfont_def);
for (; found_index + 1 < ASIZE (vec); found_index++)
diff --git a/src/ftfont.c b/src/ftfont.c
index 2f0643a31e0..31f3372af5c 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -960,7 +960,7 @@ ftfont_list (Lisp_Object frame, Lisp_Object spec)
/* Need fix because this finds any fonts. */
if (fontset->nfont == 0 && ! NILP (family))
{
- /* Try maching with configuration. For instance, the
+ /* Try matching with configuration. For instance, the
configuration may specify "Nimbus Mono L" as an alias of
"Courier". */
FcPattern *pat = FcPatternBuild (0, FC_FAMILY, FcTypeString,
diff --git a/src/lastfile.c b/src/lastfile.c
index d348e4ebb07..ab07e748930 100644
--- a/src/lastfile.c
+++ b/src/lastfile.c
@@ -23,7 +23,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
The files of Emacs are written so as to have no initialized
data that can ever need to be altered except at the first startup.
- This is so that those words can be dumped as sharable text.
+ This is so that those words can be dumped as shareable text.
It is not possible to exercise such control over library files.
So it is necessary to refrain from making their data areas shared.
@@ -47,4 +47,3 @@ char my_endbss[1];
of the bss area used by Emacs. */
static char _my_endbss[1];
char * my_endbss_static = _my_endbss;
-
diff --git a/src/lread.c b/src/lread.c
index 90bc8c11b96..d38fb515bff 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -2828,7 +2828,7 @@ read1 (register Lisp_Object readcharfun, int *pch, int first_in_list)
So we now use the same heuristic as for backquote: old-style
unquotes are only recognized when first on a list, and when
followed by a space.
- Because it's more difficult to peak 2 chars ahead, a new-style
+ Because it's more difficult to peek 2 chars ahead, a new-style
,@ can still not be used outside of a `, unless it's in the middle
of a list. */
if (new_backquote_flag
diff --git a/src/nsfont.m b/src/nsfont.m
index 7dfb995dd27..44c427ce0cc 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -630,7 +630,7 @@ nsfont_list (Lisp_Object frame, Lisp_Object font_spec)
}
-/* Return a font entity most closely maching with FONT_SPEC on
+/* Return a font entity most closely matching with FONT_SPEC on
FRAME. The closeness is determined by the font backend, thus
`face-font-selection-order' is ignored here.
Properties to be considered are same as for list(). */
diff --git a/src/region-cache.c b/src/region-cache.c
index ed7a07a6709..054374eb688 100644
--- a/src/region-cache.c
+++ b/src/region-cache.c
@@ -699,7 +699,7 @@ know_region_cache (struct buffer *buf, struct region_cache *c,
/* Return true if the text immediately after POS in BUF is known, for
the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
- position after POS where the knownness changes. */
+ position after POS where the knowledge changes. */
int
region_cache_forward (struct buffer *buf, struct region_cache *c,
ptrdiff_t pos, ptrdiff_t *next)
@@ -736,7 +736,7 @@ region_cache_forward (struct buffer *buf, struct region_cache *c,
/* Return true if the text immediately before POS in BUF is known, for
the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
- position before POS where the knownness changes. */
+ position before POS where the knowledge changes. */
int region_cache_backward (struct buffer *buf, struct region_cache *c,
ptrdiff_t pos, ptrdiff_t *next)
{
diff --git a/src/region-cache.h b/src/region-cache.h
index 8e1be716776..6758f8bcd08 100644
--- a/src/region-cache.h
+++ b/src/region-cache.h
@@ -97,7 +97,7 @@ extern void invalidate_region_cache (struct buffer *BUF,
/* Return true if the text immediately after POS in BUF is known, for
the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
- position after POS where the knownness changes. */
+ position after POS where the knowledge changes. */
extern int region_cache_forward (struct buffer *BUF,
struct region_cache *CACHE,
ptrdiff_t POS,
@@ -105,7 +105,7 @@ extern int region_cache_forward (struct buffer *BUF,
/* Return true if the text immediately before POS in BUF is known, for
the purposes of CACHE. If NEXT is non-zero, set *NEXT to the nearest
- position before POS where the knownness changes. */
+ position before POS where the knowledge changes. */
extern int region_cache_backward (struct buffer *BUF,
struct region_cache *CACHE,
ptrdiff_t POS,
diff --git a/src/termhooks.h b/src/termhooks.h
index ddcbf53eb6f..c8e3f4566cd 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -553,7 +553,7 @@ struct terminal
/* Arrange for all scroll bars on FRAME to be removed at the next call
to `*judge_scroll_bars_hook'. A scroll bar may be spared if
- `*redeem_scroll_bar_hook' is applied to its window before the judgement.
+ `*redeem_scroll_bar_hook' is applied to its window before the judgment.
This should be applied to each frame each time its window tree is
redisplayed, even if it is not displaying scroll bars at the moment;
@@ -565,7 +565,7 @@ struct terminal
currently displaying them. */
void (*condemn_scroll_bars_hook) (struct frame *frame);
- /* Unmark WINDOW's scroll bar for deletion in this judgement cycle.
+ /* Unmark WINDOW's scroll bar for deletion in this judgment cycle.
Note that it's okay to redeem a scroll bar that is not condemned. */
void (*redeem_scroll_bar_hook) (struct window *window);
diff --git a/src/window.c b/src/window.c
index 3b9705444f9..8337ede50d1 100644
--- a/src/window.c
+++ b/src/window.c
@@ -4997,7 +4997,7 @@ the selected window; if the variable `recenter-redisplay' is non-nil,
also erase the entire frame and redraw it (when `auto-resize-tool-bars'
is set to `grow-only', this resets the tool-bar's height to the minimum
height needed); if `recenter-redisplay' has the special value `tty',
-then only tty frame are redrawn.
+then only tty frames are redrawn.
Just C-u as prefix means put point in the center of the window
and redisplay normally--don't erase and redraw the frame. */)
@@ -6502,28 +6502,31 @@ with the relevant frame selected. */);
Vwindow_configuration_change_hook = Qnil;
DEFVAR_LISP ("recenter-redisplay", Vrecenter_redisplay,
- doc: /* If non-nil, then the `recenter' command with a nil argument
-will redraw the entire frame; the special value `tty' causes the
-frame to be redrawn only if it is a tty frame. */);
+ doc: /* Non-nil means `recenter' redraws entire frame.
+If this option is non-nil, then the `recenter' command with a nil
+argument will redraw the entire frame; the special value `tty' causes
+the frame to be redrawn only if it is a tty frame. */);
Vrecenter_redisplay = Qtty;
DEFVAR_LISP ("window-combination-resize", Vwindow_combination_resize,
- doc: /* Non-nil means resize window combinations proportionally.
+ doc: /* If t, resize window combinations proportionally.
If this variable is nil, splitting a window gets the entire screen space
for displaying the new window from the window to split. Deleting and
resizing a window preferably resizes one adjacent window only.
-If this variable is non-nil, splitting a window tries to get the space
+If this variable is t, splitting a window tries to get the space
proportionally from all windows in the same combination. This also
allows to split a window that is otherwise too small or of fixed size.
Resizing and deleting a window proportionally resize all windows in the
same combination.
+Other values are reserved for future use.
+
This variable takes no effect if `window-combination-limit' is non-nil. */);
Vwindow_combination_resize = Qnil;
DEFVAR_LISP ("window-combination-limit", Vwindow_combination_limit,
- doc: /* Non-nil means splitting a window makes a new parent window.
+ doc: /* If t, splitting a window makes a new parent window.
If this variable is nil, splitting a window will create a new parent
window only if the window has no parent window or the window shall
become a combination orthogonal to the one it is part of.
diff --git a/src/xfns.c b/src/xfns.c
index 9bbaea37583..642b3602833 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1877,7 +1877,7 @@ static XIMStyle supported_xim_styles[] =
#if defined HAVE_X_WINDOWS && defined USE_X_TOOLKIT
/* Create an X fontset on frame F with base font name BASE_FONTNAME. */
-static const char xic_defaut_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*";
+static const char xic_default_fontset[] = "-*-*-*-r-normal--14-*-*-*-*-*-*-*";
/* Create an Xt fontset spec from the name of a base font.
If `motif' is True use the Motif syntax. */
@@ -1888,7 +1888,7 @@ xic_create_fontsetname (const char *base_fontname, int motif)
char *fontsetname;
/* Make a fontset name from the base font name. */
- if (xic_defaut_fontset == base_fontname)
+ if (xic_default_fontset == base_fontname)
{ /* There is no base font name, use the default. */
ptrdiff_t len = strlen (base_fontname) + 2;
fontsetname = xmalloc (len);
@@ -1912,12 +1912,12 @@ xic_create_fontsetname (const char *base_fontname, int motif)
modify it to generalize it to allcs and allfamilies.
Use the specified font plus the default. */
ptrdiff_t len =
- strlen (base_fontname) + strlen (xic_defaut_fontset) + 3;
+ strlen (base_fontname) + strlen (xic_default_fontset) + 3;
fontsetname = xmalloc (len);
memset (fontsetname, 0, len);
strcpy (fontsetname, base_fontname);
strcat (fontsetname, sep);
- strcat (fontsetname, xic_defaut_fontset);
+ strcat (fontsetname, xic_default_fontset);
}
else
{
diff --git a/test/indent/pascal.pas b/test/indent/pascal.pas
new file mode 100644
index 00000000000..07a21f23c3c
--- /dev/null
+++ b/test/indent/pascal.pas
@@ -0,0 +1,1088 @@
+{ GPC demo program for the CRT unit.
+
+Copyright (C) 1999-2006 Free Software Foundation, Inc.
+
+Author: Frank Heckenbach <frank@pascal.gnu.de>
+
+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, version 2.
+
+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; see the file COPYING. If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+
+As a special exception, if you incorporate even large parts of the
+code of this demo program into another program with substantially
+different functionality, this does not cause the other program to
+be covered by the GNU General Public License. This exception does
+not however invalidate any other reasons why it might be covered
+by the GNU General Public License. }
+
+{$gnu-pascal,I+}
+
+program CRTDemo;
+
+uses GPC, CRT;
+
+type
+ TFrameChars = array [1 .. 8] of Char;
+ TSimulateBlockCursorKind = (bc_None, bc_Blink, bc_Static);
+
+const
+ SingleFrame: TFrameChars = (chCornerTLS, chLineHS, chCornerTRS, chLineVS, chLineVS, chCornerBLS, chLineHS, chCornerBRS);
+ DoubleFrame: TFrameChars = (chCornerTLD, chLineHD, chCornerTRD, chLineVD, chLineVD, chCornerBLD, chLineHD, chCornerBRD);
+
+var
+ ScrollState: Boolean = True;
+ SimulateBlockCursorKind: TSimulateBlockCursorKind = bc_None;
+ CursorShape: TCursorShape = CursorNormal;
+ MainPanel: TPanel;
+ OrigScreenSize: TPoint;
+
+procedure FrameWin (const Title: String; const Frame: TFrameChars; TitleInverse: Boolean);
+var
+ w, h, y, Color: Integer;
+ Attr: TTextAttr;
+begin
+ HideCursor;
+ SetPCCharSet (True);
+ ClrScr;
+ w := GetXMax;
+ h := GetYMax;
+ WriteCharAt (1, 1, 1, Frame[1], TextAttr);
+ WriteCharAt (2, 1, w - 2, Frame[2], TextAttr);
+ WriteCharAt (w, 1, 1, Frame[3], TextAttr);
+ for y := 2 to h - 1 do
+ begin
+ WriteCharAt (1, y, 1, Frame[4], TextAttr);
+ WriteCharAt (w, y, 1, Frame[5], TextAttr)
+ end;
+ WriteCharAt (1, h, 1, Frame[6], TextAttr);
+ WriteCharAt (2, h, w - 2, Frame[7], TextAttr);
+ WriteCharAt (w, h, 1, Frame[8], TextAttr);
+ SetPCCharSet (False);
+ Attr := TextAttr;
+ if TitleInverse then
+ begin
+ Color := GetTextColor;
+ TextColor (GetTextBackground);
+ TextBackground (Color)
+ end;
+ WriteStrAt ((w - Length (Title)) div 2 + 1, 1, Title, TextAttr);
+ TextAttr := Attr
+end;
+
+function GetKey (TimeOut: Integer) = Key: TKey; forward;
+
+procedure ClosePopUpWindow;
+begin
+ PanelDelete (GetActivePanel);
+ PanelDelete (GetActivePanel)
+end;
+
+function PopUpConfirm (XSize, YSize: Integer; const Msg: String): Boolean;
+var
+ ax, ay: Integer;
+ Key: TKey;
+ SSize: TPoint;
+begin
+ repeat
+ SSize := ScreenSize;
+ ax := (SSize.x - XSize - 4) div 2 + 1;
+ ay := (SSize.y - YSize - 4) div 2 + 1;
+ PanelNew (ax, ay, ax + XSize + 3, ay + YSize + 1, False);
+ TextBackground (Black);
+ TextColor (Yellow);
+ SetControlChars (True);
+ FrameWin ('', DoubleFrame, False);
+ NormalCursor;
+ PanelNew (ax + 2, ay + 1, ax + XSize + 2, ay + YSize, False);
+ ClrScr;
+ Write (Msg);
+ Key := GetKey (-1);
+ if Key = kbScreenSizeChanged then ClosePopUpWindow
+ until Key <> kbScreenSizeChanged;
+ PopUpConfirm := not (Key in [kbEsc, kbAltEsc])
+end;
+
+procedure MainDraw;
+begin
+ WriteLn ('3, F3 : Open a window');
+ WriteLn ('4, F4 : Close window');
+ WriteLn ('5, F5 : Previous window');
+ WriteLn ('6, F6 : Next window');
+ WriteLn ('7, F7 : Move window');
+ WriteLn ('8, F8 : Resize window');
+ Write ('q, Esc: Quit')
+end;
+
+procedure StatusDraw;
+const
+ YesNo: array [Boolean] of String [3] = ('No', 'Yes');
+ SimulateBlockCursorIDs: array [TSimulateBlockCursorKind] of String [8] = ('Off', 'Blinking', 'Static');
+ CursorShapeIDs: array [TCursorShape] of String [7] = ('Ignored', 'Hidden', 'Normal', 'Fat', 'Block');
+var
+ SSize: TPoint;
+begin
+ WriteLn ('You can change some of the following');
+ WriteLn ('settings by pressing the key shown');
+ WriteLn ('in parentheses. Naturally, color and');
+ WriteLn ('changing the cursor shape or screen');
+ WriteLn ('size does not work on all terminals.');
+ WriteLn;
+ WriteLn ('XCurses version: ', YesNo[XCRT]);
+ WriteLn ('CRTSavePreviousScreen: ', YesNo[CRTSavePreviousScreenWorks]);
+ WriteLn ('(M)onochrome: ', YesNo[IsMonochrome]);
+ SSize := ScreenSize;
+ WriteLn ('Screen (C)olumns: ', SSize.x);
+ WriteLn ('Screen (L)ines: ', SSize.y);
+ WriteLn ('(R)estore screen size');
+ WriteLn ('(B)reak checking: ', YesNo[CheckBreak]);
+ WriteLn ('(S)crolling: ', YesNo[ScrollState]);
+ WriteLn ('S(i)mulated block cursor: ', SimulateBlockCursorIDs[SimulateBlockCursorKind]);
+ Write ('C(u)rsor shape: ', CursorShapeIDs[CursorShape]);
+ GotoXY (36, WhereY)
+end;
+
+procedure RedrawAll; forward;
+procedure CheckScreenSize; forward;
+
+procedure StatusKey (Key: TKey);
+var SSize, NewSize: TPoint;
+begin
+ case LoCase (Key2Char (Key)) of
+ 'm': begin
+ SetMonochrome (not IsMonochrome);
+ RedrawAll
+ end;
+ 'c': begin
+ SSize := ScreenSize;
+ if SSize.x > 40 then
+ NewSize.x := 40
+ else
+ NewSize.x := 80;
+ if SSize.y > 25 then
+ NewSize.y := 50
+ else
+ NewSize.y := 25;
+ SetScreenSize (NewSize.x, NewSize.y);
+ CheckScreenSize
+ end;
+ 'l': begin
+ SSize := ScreenSize;
+ if SSize.x > 40 then
+ NewSize.x := 80
+ else
+ NewSize.x := 40;
+ if SSize.y > 25 then
+ NewSize.y := 25
+ else
+ NewSize.y := 50;
+ SetScreenSize (NewSize.x, NewSize.y);
+ CheckScreenSize
+ end;
+ 'r': begin
+ SetScreenSize (OrigScreenSize.x, OrigScreenSize.y);
+ CheckScreenSize
+ end;
+ 'b': CheckBreak := not CheckBreak;
+ 's': ScrollState := not ScrollState;
+ 'i': if SimulateBlockCursorKind = High (SimulateBlockCursorKind) then
+ SimulateBlockCursorKind := Low (SimulateBlockCursorKind)
+ else
+ Inc (SimulateBlockCursorKind);
+ 'u': case CursorShape of
+ CursorNormal: CursorShape := CursorBlock;
+ CursorFat,
+ CursorBlock : CursorShape := CursorHidden;
+ else CursorShape := CursorNormal
+ end;
+ end;
+ ClrScr;
+ StatusDraw
+end;
+
+procedure TextAttrDemo;
+var f, b, y, x1, y1, x2, y2, Fill, n1, n2, n3: Integer;
+begin
+ GetWindow (x1, y1, x2, y2);
+ Window (x1 - 1, y1, x2, y2);
+ TextColor (White);
+ TextBackground (Blue);
+ ClrScr;
+ SetScroll (False);
+ Fill := GetXMax - 32;
+ for y := 1 to GetYMax do
+ begin
+ GotoXY (1, y);
+ b := (y - 1) mod 16;
+ n1 := 0;
+ for f := 0 to 15 do
+ begin
+ TextAttr := f + 16 * b;
+ n2 := (Fill * (1 + 2 * f) + 16) div 32;
+ n3 := (Fill * (2 + 2 * f) + 16) div 32;
+ Write ('' : n2 - n1, NumericBaseDigitsUpper[b], NumericBaseDigitsUpper[f], '' : n3 - n2);
+ n1 := n3
+ end
+ end
+end;
+
+procedure CharSetDemo (UsePCCharSet: Boolean);
+var h, l, y, x1, y1, x2, y2, Fill, n1, n2: Integer;
+begin
+ GetWindow (x1, y1, x2, y2);
+ Window (x1 - 1, y1, x2, y2);
+ ClrScr;
+ SetScroll (False);
+ SetPCCharSet (UsePCCharSet);
+ SetControlChars (False);
+ Fill := GetXMax - 35;
+ for y := 1 to GetYMax do
+ begin
+ GotoXY (1, y);
+ h := (y - 2) mod 16;
+ n1 := (Fill + 9) div 18;
+ if y = 1 then
+ Write ('' : 3 + n1)
+ else
+ Write (16 * h : 3 + n1);
+ for l := 0 to 15 do
+ begin
+ n2 := (Fill * (2 + l) + 9) div 18;
+ if y = 1 then
+ Write ('' : n2 - n1, l : 2)
+ else
+ Write ('' : n2 - n1 + 1, Chr (16 * h + l));
+ n1 := n2
+ end
+ end
+end;
+
+procedure NormalCharSetDemo;
+begin
+ CharSetDemo (False)
+end;
+
+procedure PCCharSetDemo;
+begin
+ CharSetDemo (True)
+end;
+
+procedure FKeyDemoDraw;
+var x1, y1, x2, y2: Integer;
+begin
+ GetWindow (x1, y1, x2, y2);
+ Window (x1, y1, x2 - 1, y2);
+ ClrScr;
+ SetScroll (False);
+ WriteLn ('You can type the following keys');
+ WriteLn ('(function keys if present on the');
+ WriteLn ('terminal, letters as alternatives):');
+ GotoXY (1, 4);
+ WriteLn ('S, Left : left (wrap-around)');
+ WriteLn ('D, Right : right (wrap-around)');
+ WriteLn ('E, Up : up (wrap-around)');
+ WriteLn ('X, Down : down (wrap-around)');
+ WriteLn ('A, Home : go to first column');
+ WriteLn ('F, End : go to last column');
+ WriteLn ('R, Page Up : go to first line');
+ WriteLn ('C, Page Down: go to last line');
+ WriteLn ('Y, Ctrl-PgUp: first column and line');
+ GotoXY (1, 13);
+ WriteLn ('B, Ctrl-PgDn: last column and line');
+ WriteLn ('Z, Ctrl-Home: clear screen');
+ WriteLn ('N, Ctrl-End : clear to end of line');
+ WriteLn ('V, Insert : insert a line');
+ WriteLn ('T, Delete : delete a line');
+ WriteLn ('# : beep');
+ WriteLn ('* : flash');
+ WriteLn ('Tab, Enter, Backspace, other');
+ WriteLn (' normal characters: write text')
+end;
+
+procedure FKeyDemoKey (Key: TKey);
+const TabSize = 8;
+var
+ ch: Char;
+ NewX: Integer;
+begin
+ case LoCaseKey (Key) of
+ Ord ('s'), kbLeft : if WhereX = 1 then GotoXY (GetXMax, WhereY) else GotoXY (WhereX - 1, WhereY);
+ Ord ('d'), kbRight : if WhereX = GetXMax then GotoXY (1, WhereY) else GotoXY (WhereX + 1, WhereY);
+ Ord ('e'), kbUp : if WhereY = 1 then GotoXY (WhereX, GetYMax) else GotoXY (WhereX, WhereY - 1);
+ Ord ('x'), kbDown : if WhereY = GetYMax then GotoXY (WhereX, 1) else GotoXY (WhereX, WhereY + 1);
+ Ord ('a'), kbHome : Write (chCR);
+ Ord ('f'), kbEnd : GotoXY (GetXMax, WhereY);
+ Ord ('r'), kbPgUp : GotoXY (WhereX, 1);
+ Ord ('c'), kbPgDn : GotoXY (WhereX, GetYMax);
+ Ord ('y'), kbCtrlPgUp: GotoXY (1, 1);
+ Ord ('b'), kbCtrlPgDn: GotoXY (GetXMax, GetYMax);
+ Ord ('z'), kbCtrlHome: ClrScr;
+ Ord ('n'), kbCtrlEnd : ClrEOL;
+ Ord ('v'), kbIns : InsLine;
+ Ord ('t'), kbDel : DelLine;
+ Ord ('#') : Beep;
+ Ord ('*') : Flash;
+ kbTab : begin
+ NewX := ((WhereX - 1) div TabSize + 1) * TabSize + 1;
+ if NewX <= GetXMax then GotoXY (NewX, WhereY) else WriteLn
+ end;
+ kbCR : WriteLn;
+ kbBkSp : Write (chBkSp, ' ', chBkSp);
+ else ch := Key2Char (Key);
+ if ch <> #0 then Write (ch)
+ end
+end;
+
+procedure KeyDemoDraw;
+begin
+ WriteLn ('Press some keys ...')
+end;
+
+procedure KeyDemoKey (Key: TKey);
+var ch: Char;
+begin
+ ch := Key2Char (Key);
+ if ch <> #0 then
+ begin
+ Write ('Normal key');
+ if IsPrintable (ch) then Write (' `', ch, '''');
+ WriteLn (', ASCII #', Ord (ch))
+ end
+ else
+ WriteLn ('Special key ', Ord (Key2Scan (Key)))
+end;
+
+procedure IOSelectPeriodical;
+var
+ CurrentTime: TimeStamp;
+ s: String (8);
+ i: Integer;
+begin
+ GetTimeStamp (CurrentTime);
+ with CurrentTime do
+ WriteStr (s, Hour : 2, ':', Minute : 2, ':', Second : 2);
+ for i := 1 to Length (s) do
+ if s[i] = ' ' then s[i] := '0';
+ GotoXY (1, 12);
+ Write ('The time is: ', s)
+end;
+
+procedure IOSelectDraw;
+begin
+ WriteLn ('IOSelect is a way to handle I/O from');
+ WriteLn ('or to several places simultaneously,');
+ WriteLn ('without having to use threads or');
+ WriteLn ('signal/interrupt handlers or waste');
+ WriteLn ('CPU time with busy waiting.');
+ WriteLn;
+ WriteLn ('This demo shows how IOSelect works');
+ WriteLn ('in connection with CRT. It displays');
+ WriteLn ('a clock, but still reacts to user');
+ WriteLn ('input immediately.');
+ IOSelectPeriodical
+end;
+
+procedure ModifierPeriodical;
+const
+ Pressed: array [Boolean] of String [8] = ('Released', 'Pressed');
+ ModifierNames: array [1 .. 7] of record
+ Modifier: Integer;
+ Name: String (17)
+ end =
+ ((shLeftShift, 'Left Shift'),
+ (shRightShift, 'Right Shift'),
+ (shLeftCtrl, 'Left Control'),
+ (shRightCtrl, 'Right Control'),
+ (shAlt, 'Alt (left)'),
+ (shAltGr, 'AltGr (right Alt)'),
+ (shExtra, 'Extra'));
+var
+ ShiftState, i: Integer;
+begin
+ ShiftState := GetShiftState;
+ for i := 1 to 7 do
+ with ModifierNames[i] do
+ begin
+ GotoXY (1, 4 + i);
+ ClrEOL;
+ Write (Name, ':');
+ GotoXY (20, WhereY);
+ Write (Pressed[(ShiftState and Modifier) <> 0])
+ end
+end;
+
+procedure ModifierDraw;
+begin
+ WriteLn ('Modifier keys (NOTE: only');
+ WriteLn ('available on some systems;');
+ WriteLn ('X11: only after key press):');
+ ModifierPeriodical
+end;
+
+procedure ChecksDraw;
+begin
+ WriteLn ('(O)S shell');
+ WriteLn ('OS shell with (C)learing');
+ WriteLn ('(R)efresh check');
+ Write ('(S)ound check')
+end;
+
+procedure ChecksKey (Key: TKey);
+var
+ i, j: Integer;
+ WasteTime: Real; attribute (volatile);
+
+ procedure DoOSShell;
+ var
+ Result: Integer;
+ Shell: TString;
+ begin
+ Shell := GetShellPath (Null);
+ {$I-}
+ Result := Execute (Shell);
+ {$I+}
+ if (InOutRes <> 0) or (Result <> 0) then
+ begin
+ ClrScr;
+ if InOutRes <> 0 then
+ WriteLn (GetIOErrorMessage, ' while trying to execute `', Shell, '''.')
+ else
+ WriteLn ('`', Shell, ''' returned status ', Result, '.');
+ Write ('Any key to continue.');
+ BlockCursor;
+ Discard (GetKey (-1))
+ end
+ end;
+
+begin
+ case LoCase (Key2Char (Key)) of
+ 'o': begin
+ if PopUpConfirm (36, 12, 'You will now get an OS shell. Unless' + NewLine +
+ 'CRTDemo is running in its own (GUI)' + NewLine +
+ 'window, the shell will run on the' + NewLine +
+ 'same screen as CRTDemo which is not' + NewLine +
+ 'cleared before the shell is started.' + NewLine +
+ 'If possible, the screen contents are' + NewLine +
+ 'restored to the state before CRTDemo' + NewLine +
+ 'was started. After leaving the shell' + NewLine +
+ 'in the usual way (usually by enter-' + NewLine +
+ 'ing `exit''), you will get back to' + NewLine +
+ 'the demo. <ESC> to abort, any other' + NewLine +
+ 'key to start.') then
+ begin
+ RestoreTerminal (True);
+ DoOSShell
+ end;
+ ClosePopUpWindow
+ end;
+ 'c': begin
+ if PopUpConfirm (36, 9, 'You will now get an OS shell. Unless' + NewLine +
+ 'CRTDemo is running in its own (GUI)' + NewLine +
+ 'window, the screen will be cleared,' + NewLine +
+ 'and the cursor will be moved to the' + NewLine +
+ 'top before the shell is started.' + NewLine +
+ 'After leaving the shell in the usual' + NewLine +
+ 'way (usually by entering `exit''),' + NewLine +
+ 'you will get back to the demo. <ESC>' + NewLine +
+ 'to abort, any other key to start.') then
+ begin
+ RestoreTerminalClearCRT;
+ DoOSShell
+ end;
+ ClosePopUpWindow
+ end;
+ 'r': begin
+ if PopUpConfirm (36, 11, 'The program will now get busy with' + NewLine +
+ 'some dummy computations. However,' + NewLine +
+ 'CRT output in the form of dots will' + NewLine +
+ 'still appear continuously one by one' + NewLine +
+ '(rather than the whole line at once' + NewLine +
+ 'in the end). While running, the test' + NewLine +
+ 'cannot be interrupted. <ESC> to' + NewLine +
+ 'abort, any other key to start.') then
+ begin
+ SetCRTUpdate (UpdateRegularly);
+ BlockCursor;
+ WriteLn;
+ WriteLn;
+ for i := 1 to GetXMax - 2 do
+ begin
+ Write ('.');
+ for j := 1 to 400000 do WasteTime := Random
+ end;
+ SetCRTUpdate (UpdateInput);
+ WriteLn;
+ Write ('Press any key.');
+ Discard (GetKey (-1))
+ end;
+ ClosePopUpWindow
+ end;
+ 's': begin
+ if PopUpConfirm (32, 4, 'You will now hear some sounds if' + NewLine +
+ 'supported (otherwise there will' + NewLine +
+ 'just be a short pause). <ESC> to' + NewLine +
+ 'abort, any other key to start.') then
+ begin
+ BlockCursor;
+ for i := 0 to 7 do
+ begin
+ Sound (Round (440 * 2 ** (Round (i * 12 / 7 + 0.3) / 12)));
+ if GetKey (400000) in [kbEsc, kbAltEsc] then Break
+ end;
+ NoSound
+ end;
+ ClosePopUpWindow
+ end;
+ end
+end;
+
+type
+ PWindowList = ^TWindowList;
+ TWindowList = record
+ Next, Prev: PWindowList;
+ Panel, FramePanel: TPanel;
+ WindowType: Integer;
+ x1, y1, xs, ys: Integer;
+ State: (ws_None, ws_Moving, ws_Resizing);
+ end;
+
+TKeyProc = procedure (Key: TKey);
+TProcedure = procedure;
+
+const
+ MenuNameLength = 16;
+ WindowTypes: array [0 .. 9] of record
+ DrawProc,
+ PeriodicalProc: procedure;
+ KeyProc : TKeyProc;
+ Name : String (MenuNameLength);
+ Color,
+ Background,
+ MinSizeX,
+ MinSizeY,
+ PrefSizeX,
+ PrefSizeY : Integer;
+ RedrawAlways,
+ WantCursor : Boolean
+ end =
+((MainDraw , nil , nil , 'CRT Demo' , LightGreen, Blue , 26, 7, 0, 0, False, False),
+ (StatusDraw , nil , StatusKey , 'Status' , White , Red , 38, 16, 0, 0, True, True),
+ (TextAttrDemo , nil , nil , 'Text Attributes' , White , Blue , 32, 16, 64, 16, False, False),
+ (NormalCharSetDemo, nil , nil , 'Character Set' , Black , Green , 35, 17, 53, 17, False, False),
+ (PCCharSetDemo , nil , nil , 'PC Character Set', Black , Brown , 35, 17, 53, 17, False, False),
+ (KeyDemoDraw , nil , KeyDemoKey , 'Keys' , Blue , LightGray, 29, 5, -1, -1, False, True),
+ (FKeyDemoDraw , nil , FKeyDemoKey, 'Function Keys' , Blue , LightGray, 37, 22, -1, -1, False, True),
+ (ModifierDraw , ModifierPeriodical, nil , 'Modifier Keys' , Black , Cyan , 29, 11, 0, 0, True, False),
+ (IOSelectDraw , IOSelectPeriodical, nil , 'IOSelect Demo' , White , Magenta , 38, 12, 0, 0, False, False),
+ (ChecksDraw , nil , ChecksKey , 'Various Checks' , Black , Red , 26, 4, 0, 0, False, False));
+
+MenuMax = High (WindowTypes);
+MenuXSize = MenuNameLength + 4;
+MenuYSize = MenuMax + 2;
+
+var
+ WindowList: PWindowList = nil;
+
+ procedure RedrawFrame (p: PWindowList);
+ begin
+ with p^, WindowTypes[WindowType] do
+ begin
+ PanelActivate (FramePanel);
+ Window (x1, y1, x1 + xs - 1, y1 + ys - 1);
+ ClrScr;
+ case State of
+ ws_None : if p = WindowList then
+ FrameWin (' ' + Name + ' ', DoubleFrame, True)
+ else
+ FrameWin (' ' + Name + ' ', SingleFrame, False);
+ ws_Moving : FrameWin (' Move Window ', SingleFrame, True);
+ ws_Resizing: FrameWin (' Resize Window ', SingleFrame, True);
+ end
+ end
+ end;
+
+ procedure DrawWindow (p: PWindowList);
+ begin
+ with p^, WindowTypes[WindowType] do
+ begin
+ RedrawFrame (p);
+ PanelActivate (Panel);
+ Window (x1 + 2, y1 + 1, x1 + xs - 2, y1 + ys - 2);
+ ClrScr;
+ DrawProc
+ end
+ end;
+
+ procedure RedrawAll;
+ var
+ LastPanel: TPanel;
+ p: PWindowList;
+ x2, y2: Integer;
+ begin
+ LastPanel := GetActivePanel;
+ PanelActivate (MainPanel);
+ TextBackground (Blue);
+ ClrScr;
+ p := WindowList;
+ if p <> nil then
+ repeat
+ with p^ do
+ begin
+ PanelActivate (FramePanel);
+ GetWindow (x1, y1, x2, y2); { updated automatically by CRT }
+ xs := x2 - x1 + 1;
+ ys := y2 - y1 + 1
+ end;
+ DrawWindow (p);
+ p := p^.Next
+ until p = WindowList;
+ PanelActivate (LastPanel)
+ end;
+
+ procedure CheckScreenSize;
+ var
+ LastPanel: TPanel;
+ MinScreenSizeX, MinScreenSizeY, i: Integer;
+ SSize: TPoint;
+ begin
+ LastPanel := GetActivePanel;
+ PanelActivate (MainPanel);
+ HideCursor;
+ MinScreenSizeX := MenuXSize;
+ MinScreenSizeY := MenuYSize;
+ for i := Low (WindowTypes) to High (WindowTypes) do
+ with WindowTypes[i] do
+ begin
+ MinScreenSizeX := Max (MinScreenSizeX, MinSizeX + 2);
+ MinScreenSizeY := Max (MinScreenSizeY, MinSizeY + 2)
+ end;
+ SSize := ScreenSize;
+ Window (1, 1, SSize.x, SSize.y);
+ if (SSize.x < MinScreenSizeX) or (SSize.y < MinScreenSizeY) then
+ begin
+ NormVideo;
+ ClrScr;
+ RestoreTerminal (True);
+ WriteLn (StdErr, 'Sorry, your screen is too small for this demo (', SSize.x, 'x', SSize.y, ').');
+ WriteLn (StdErr, 'You need at least ', MinScreenSizeX, 'x', MinScreenSizeY, ' characters.');
+ Halt (2)
+ end;
+ PanelActivate (LastPanel);
+ RedrawAll
+ end;
+
+ procedure Die; attribute (noreturn);
+ begin
+ NoSound;
+ RestoreTerminalClearCRT;
+ WriteLn (StdErr, 'You''re trying to kill me. Since I have break checking turned off,');
+ WriteLn (StdErr, 'I''m not dying, but I''ll do you a favour and terminate now.');
+ Halt (3)
+ end;
+
+ function GetKey (TimeOut: Integer) = Key: TKey;
+ var
+ NeedSelect, SelectValue: Integer;
+ SimulateBlockCursorCurrent: TSimulateBlockCursorKind;
+ SelectInput: array [1 .. 1] of PAnyFile = (@Input);
+ NextSelectTime: MicroSecondTimeType = 0; attribute (static);
+ TimeOutTime: MicroSecondTimeType;
+ LastPanel: TPanel;
+ p: PWindowList;
+ begin
+ LastPanel := GetActivePanel;
+ if TimeOut < 0 then
+ TimeOutTime := High (TimeOutTime)
+ else
+ TimeOutTime := GetMicroSecondTime + TimeOut;
+ NeedSelect := 0;
+ if TimeOut >= 0 then
+ Inc (NeedSelect);
+ SimulateBlockCursorCurrent := SimulateBlockCursorKind;
+ if SimulateBlockCursorCurrent <> bc_None then
+ Inc (NeedSelect);
+ p := WindowList;
+ repeat
+ if @WindowTypes[p^.WindowType].PeriodicalProc <> nil then
+ Inc (NeedSelect);
+ p := p^.Next
+ until p = WindowList;
+ p := WindowList;
+ repeat
+ with p^, WindowTypes[WindowType] do
+ if RedrawAlways then
+ begin
+ PanelActivate (Panel);
+ ClrScr;
+ DrawProc
+ end;
+ p := p^.Next
+ until p = WindowList;
+ if NeedSelect <> 0 then
+ repeat
+ CRTUpdate;
+ SelectValue := IOSelectRead (SelectInput, Max (0, Min (NextSelectTime, TimeOutTime) - GetMicroSecondTime));
+ if SelectValue = 0 then
+ begin
+ case SimulateBlockCursorCurrent of
+ bc_None : ;
+ bc_Blink : SimulateBlockCursor;
+ bc_Static: begin
+ SimulateBlockCursor;
+ SimulateBlockCursorCurrent := bc_None;
+ Dec (NeedSelect)
+ end
+ end;
+ NextSelectTime := GetMicroSecondTime + 120000;
+ p := WindowList;
+ repeat
+ with p^, WindowTypes[WindowType] do
+ if @PeriodicalProc <> nil then
+ begin
+ PanelActivate (Panel);
+ PeriodicalProc
+ end;
+ p := p^.Next
+ until p = WindowList
+ end;
+ until (NeedSelect = 0) or (SelectValue <> 0) or ((TimeOut >= 0) and (GetMicroSecondTime >= TimeOutTime));
+ if NeedSelect = 0 then
+ SelectValue := 1;
+ if SelectValue = 0 then
+ Key := 0
+ else
+ Key := ReadKeyWord;
+ if SimulateBlockCursorKind <> bc_None then
+ SimulateBlockCursorOff;
+ if IsDeadlySignal (Key) then Die;
+ if Key = kbScreenSizeChanged then CheckScreenSize;
+ PanelActivate (LastPanel)
+ end;
+
+ function Menu = n: Integer;
+ var
+ i, ax, ay: Integer;
+ Key: TKey;
+ Done: Boolean;
+ SSize: TPoint;
+ begin
+ n := 1;
+ repeat
+ SSize := ScreenSize;
+ ax := (SSize.x - MenuXSize) div 2 + 1;
+ ay := (SSize.y - MenuYSize) div 2 + 1;
+ PanelNew (ax, ay, ax + MenuXSize - 1, ay + MenuYSize - 1, False);
+ SetControlChars (True);
+ TextColor (Blue);
+ TextBackground (LightGray);
+ FrameWin (' Select Window ', DoubleFrame, True);
+ IgnoreCursor;
+ PanelNew (ax + 1, ay + 1, ax + MenuXSize - 2, ay + MenuYSize - 2, False);
+ ClrScr;
+ TextColor (Black);
+ SetScroll (False);
+ Done := False;
+ repeat
+ for i := 1 to MenuMax do
+ begin
+ GotoXY (1, i);
+ if i = n then
+ TextBackground (Green)
+ else
+ TextBackground (LightGray);
+ ClrEOL;
+ Write (' ', WindowTypes[i].Name);
+ ChangeTextAttr (2, i, 1, Red + $10 * GetTextBackground)
+ end;
+ Key := GetKey (-1);
+ case LoCaseKey (Key) of
+ kbUp : if n = 1 then n := MenuMax else Dec (n);
+ kbDown : if n = MenuMax then n := 1 else Inc (n);
+ kbHome,
+ kbPgUp,
+ kbCtrlPgUp,
+ kbCtrlHome : n := 1;
+ kbEnd,
+ kbPgDn,
+ kbCtrlPgDn,
+ kbCtrlEnd : n := MenuMax;
+ kbCR : Done := True;
+ kbEsc, kbAltEsc : begin
+ n := -1;
+ Done := True
+ end;
+ Ord ('a') .. Ord ('z'): begin
+ i := MenuMax;
+ while (i > 0) and (LoCase (Key2Char (Key)) <> LoCase (WindowTypes[i].Name[1])) do Dec (i);
+ if i > 0 then
+ begin
+ n := i;
+ Done := True
+ end
+ end;
+ end
+ until Done or (Key = kbScreenSizeChanged);
+ ClosePopUpWindow
+ until Key <> kbScreenSizeChanged
+ end;
+
+ procedure NewWindow (WindowType, ax, ay: Integer);
+ var
+ p, LastWindow: PWindowList;
+ MaxX1, MaxY1: Integer;
+ SSize: TPoint;
+ begin
+ New (p);
+ if WindowList = nil then
+ begin
+ p^.Prev := p;
+ p^.Next := p
+ end
+ else
+ begin
+ p^.Prev := WindowList;
+ p^.Next := WindowList^.Next;
+ p^.Prev^.Next := p;
+ p^.Next^.Prev := p;
+ end;
+ p^.WindowType := WindowType;
+ with p^, WindowTypes[WindowType] do
+ begin
+ SSize := ScreenSize;
+ if PrefSizeX > 0 then xs := PrefSizeX else xs := MinSizeX;
+ if PrefSizeY > 0 then ys := PrefSizeY else ys := MinSizeY;
+ xs := Min (xs + 2, SSize.x);
+ ys := Min (ys + 2, SSize.y);
+ MaxX1 := SSize.x - xs + 1;
+ MaxY1 := SSize.y - ys + 1;
+ if ax = 0 then x1 := Random (MaxX1) + 1 else x1 := Min (ax, MaxX1);
+ if ay = 0 then y1 := Random (MaxY1) + 1 else y1 := Min (ay, MaxY1);
+ if (ax = 0) and (PrefSizeX < 0) then Inc (xs, Random (SSize.x - x1 - xs + 2));
+ if (ax = 0) and (PrefSizeY < 0) then Inc (ys, Random (SSize.y - y1 - ys + 2));
+ State := ws_None;
+ PanelNew (1, 1, 1, 1, False);
+ FramePanel := GetActivePanel;
+ SetControlChars (True);
+ TextColor (Color);
+ TextBackground (Background);
+ PanelNew (1, 1, 1, 1, False);
+ SetPCCharSet (False);
+ Panel := GetActivePanel;
+ end;
+ LastWindow := WindowList;
+ WindowList := p;
+ if LastWindow <> nil then RedrawFrame (LastWindow);
+ DrawWindow (p)
+ end;
+
+ procedure OpenWindow;
+ var WindowType: Integer;
+ begin
+ WindowType := Menu;
+ if WindowType >= 0 then NewWindow (WindowType, 0, 0)
+ end;
+
+ procedure NextWindow;
+ var LastWindow: PWindowList;
+ begin
+ LastWindow := WindowList;
+ WindowList := WindowList^.Next;
+ PanelTop (WindowList^.FramePanel);
+ PanelTop (WindowList^.Panel);
+ RedrawFrame (LastWindow);
+ RedrawFrame (WindowList)
+ end;
+
+ procedure PreviousWindow;
+ var LastWindow: PWindowList;
+ begin
+ PanelMoveAbove (WindowList^.Panel, MainPanel);
+ PanelMoveAbove (WindowList^.FramePanel, MainPanel);
+ LastWindow := WindowList;
+ WindowList := WindowList^.Prev;
+ RedrawFrame (LastWindow);
+ RedrawFrame (WindowList)
+ end;
+
+ procedure CloseWindow;
+ var p: PWindowList;
+ begin
+ if WindowList^.WindowType <> 0 then
+ begin
+ p := WindowList;
+ NextWindow;
+ PanelDelete (p^.FramePanel);
+ PanelDelete (p^.Panel);
+ p^.Next^.Prev := p^.Prev;
+ p^.Prev^.Next := p^.Next;
+ Dispose (p)
+ end
+ end;
+
+ procedure MoveWindow;
+ var
+ Done, Changed: Boolean;
+ SSize: TPoint;
+ begin
+ with WindowList^ do
+ begin
+ Done := False;
+ Changed := True;
+ State := ws_Moving;
+ repeat
+ if Changed then DrawWindow (WindowList);
+ Changed := True;
+ case LoCaseKey (GetKey (-1)) of
+ Ord ('s'), kbLeft : if x1 > 1 then Dec (x1);
+ Ord ('d'), kbRight : if x1 + xs - 1 < ScreenSize.x then Inc (x1);
+ Ord ('e'), kbUp : if y1 > 1 then Dec (y1);
+ Ord ('x'), kbDown : if y1 + ys - 1 < ScreenSize.y then Inc (y1);
+ Ord ('a'), kbHome : x1 := 1;
+ Ord ('f'), kbEnd : x1 := ScreenSize.x - xs + 1;
+ Ord ('r'), kbPgUp : y1 := 1;
+ Ord ('c'), kbPgDn : y1 := ScreenSize.y - ys + 1;
+ Ord ('y'), kbCtrlPgUp: begin
+ x1 := 1;
+ y1 := 1
+ end;
+ Ord ('b'), kbCtrlPgDn: begin
+ SSize := ScreenSize;
+ x1 := SSize.x - xs + 1;
+ y1 := SSize.y - ys + 1
+ end;
+ kbCR,
+ kbEsc, kbAltEsc : Done := True;
+ else Changed := False
+ end
+ until Done;
+ State := ws_None;
+ DrawWindow (WindowList)
+ end
+ end;
+
+ procedure ResizeWindow;
+ var
+ Done, Changed: Boolean;
+ SSize: TPoint;
+ begin
+ with WindowList^, WindowTypes[WindowType] do
+ begin
+ Done := False;
+ Changed := True;
+ State := ws_Resizing;
+ repeat
+ if Changed then DrawWindow (WindowList);
+ Changed := True;
+ case LoCaseKey (GetKey (-1)) of
+ Ord ('s'), kbLeft : if xs > MinSizeX + 2 then Dec (xs);
+ Ord ('d'), kbRight : if x1 + xs - 1 < ScreenSize.x then Inc (xs);
+ Ord ('e'), kbUp : if ys > MinSizeY + 2 then Dec (ys);
+ Ord ('x'), kbDown : if y1 + ys - 1 < ScreenSize.y then Inc (ys);
+ Ord ('a'), kbHome : xs := MinSizeX + 2;
+ Ord ('f'), kbEnd : xs := ScreenSize.x - x1 + 1;
+ Ord ('r'), kbPgUp : ys := MinSizeY + 2;
+ Ord ('c'), kbPgDn : ys := ScreenSize.y - y1 + 1;
+ Ord ('y'), kbCtrlPgUp: begin
+ xs := MinSizeX + 2;
+ ys := MinSizeY + 2
+ end;
+ Ord ('b'), kbCtrlPgDn: begin
+ SSize := ScreenSize;
+ xs := SSize.x - x1 + 1;
+ ys := SSize.y - y1 + 1
+ end;
+ kbCR,
+ kbEsc, kbAltEsc : Done := True;
+ else Changed := False
+ end
+ until Done;
+ State := ws_None;
+ DrawWindow (WindowList)
+ end
+ end;
+
+ procedure ActivateCursor;
+ begin
+ with WindowList^, WindowTypes[WindowType] do
+ begin
+ PanelActivate (Panel);
+ if WantCursor then
+ SetCursorShape (CursorShape)
+ else
+ HideCursor
+ end;
+ SetScroll (ScrollState)
+ end;
+
+var
+ Key: TKey;
+ ScreenShot, Done: Boolean;
+
+begin
+ ScreenShot := ParamStr (1) = '--screenshot';
+ if ParamCount <> Ord (ScreenShot) then
+ begin
+ RestoreTerminal (True);
+ WriteLn (StdErr, ParamStr (0), ': invalid argument `', ParamStr (Ord (ScreenShot) + 1), '''');
+ Halt (1)
+ end;
+ CRTSavePreviousScreen (True);
+ SetCRTUpdate (UpdateInput);
+ MainPanel := GetActivePanel;
+ CheckScreenSize;
+ OrigScreenSize := ScreenSize;
+ if ScreenShot then
+ begin
+ CursorShape := CursorBlock;
+ NewWindow (6, 1, 1);
+ NewWindow (2, 1, MaxInt);
+ NewWindow (8, MaxInt, 1);
+ NewWindow (5, 1, 27);
+ KeyDemoKey (Ord ('f'));
+ KeyDemoKey (246);
+ KeyDemoKey (kbDown);
+ NewWindow (3, MaxInt, 13);
+ NewWindow (4, MaxInt, 31);
+ NewWindow (7, MaxInt, MaxInt);
+ NewWindow (9, MaxInt, 33);
+ NewWindow (0, 1, 2);
+ NewWindow (1, 1, 14);
+ ActivateCursor;
+ OpenWindow
+ end
+ else
+ NewWindow (0, 3, 2);
+ Done := False;
+ repeat
+ ActivateCursor;
+ Key := GetKey (-1);
+ case LoCaseKey (Key) of
+ Ord ('3'), kbF3 : OpenWindow;
+ Ord ('4'), kbF4 : CloseWindow;
+ Ord ('5'), kbF5 : PreviousWindow;
+ Ord ('6'), kbF6 : NextWindow;
+ Ord ('7'), kbF7 : MoveWindow;
+ Ord ('8'), kbF8 : ResizeWindow;
+ Ord ('q'), kbEsc,
+ kbAltEsc: Done := True;
+ else
+ if WindowList <> nil then
+ with WindowList^, WindowTypes[WindowType] do
+ if @KeyProc <> nil then
+ begin
+ TextColor (Color);
+ TextBackground (Background);
+ KeyProc (Key)
+ end
+ end
+ until Done
+end.