From: Paul Eggert Date: Fri, 5 Aug 2016 20:31:10 +0000 (-0700) Subject: Spelling and minor grammar fixes X-Git-Tag: emacs-26.0.90~1801 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=92e5b41c7c5898820356fc66456804a45bbe7852;p=emacs.git Spelling and minor grammar fixes * test/file-organization.org: Rename from test/file-organisation.org. --- diff --git a/ChangeLog.2 b/ChangeLog.2 index cd29f92e998..72ba385f6a2 100644 --- a/ChangeLog.2 +++ b/ChangeLog.2 @@ -1444,7 +1444,7 @@ Link from (emacs)Exiting to (lisp)Killing Emacs * doc/emacs/entering.texi (Exiting): Link to the lispref - manual for further customisations (bug#15445). + manual for further customizations (bug#15445). (cherry picked from commit bc5f27aa099cdde02ca66e71501b89300685ab28) @@ -8592,7 +8592,7 @@ * lisp/files-x.el (modify-dir-local-variable): Small rewrite Change a variable name to be more meaningful, and reorder some of - the code with no change in behaviour. + the code with no change in behavior. 2016-01-25 Artur Malabarba @@ -16655,7 +16655,7 @@ make check unconditional, check-maybe top-level. * Makefile.in: Add check-maybe target. - * test/Makefile.in: Restore unconditional behaviour to make check. + * test/Makefile.in: Restore unconditional behavior to make check. 2015-12-01 Phillip Lord @@ -18368,7 +18368,7 @@ * lisp/files.el: Don't allow customization of dir-locals sorting. In retrospect, this is not a good idea for the same reason that `dir-locals-file' is a defconst, because it is important that this - behaviour be "uniform across different environments and users". + behavior be "uniform across different environments and users". Sure, the user can still change the sorting with a hack, but we shouldn't encourage them to change it. (dir-locals--all-files): Return list in the order returned by diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 015c557ef6d..ad0c3237e69 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -2426,7 +2426,7 @@ If @var{alist} contains a @code{mode} entry, its value is a major mode window is a candidate if it displays a buffer that derives from one of the given modes. -The behaviour is also controlled by entries for +The behavior is also controlled by entries for @code{inhibit-same-window}, @code{reusable-frames} and @code{inhibit-switch-frame} as is done in the function @code{display-buffer-reuse-window}. diff --git a/doc/misc/ses.texi b/doc/misc/ses.texi index 1c5070b38a9..84d2cc77c0c 100644 --- a/doc/misc/ses.texi +++ b/doc/misc/ses.texi @@ -567,10 +567,10 @@ s-expression (using @code{ses-prin1}), centered and surrounded by @code{#} filling. @end itemize -Another precaution to take is to avoid stack-overflow (due to a -printer function indefintely recursively re-calling itself). This can -happen mistakenly when you use a local printer as a column printer, -and this local printer implicitely call the current column printer, so +Another precaution to take is to avoid stack overflow due to a +printer function calling itself indefinitely. This mistake can +happen when you use a local printer as a column printer, +and this local printer implicitly calls the current column printer, so it will call itself recursively. Imagine for instance that you want to create some local printer @code{=fill} that would center the content of a cell and surround it by equal signs @code{=}, and you do it this @@ -583,12 +583,12 @@ way: (t (ses-center x 0 ?=)))) @end lisp -Because @code{=fill} uses standard printer @code{ses-center} without -passing explicitely any printer to it, @code{ses-center} will call the -current column printer if any or the spreadsheet default printer -otherwise. So using @code{=fill} as a column printer will result in a -stack overflow in this column. SES does not make any check for that, -you just have to be careful. For instance re-write @code{=fill} like +Because @code{=fill} uses the standard printer @code{ses-center} without +explicitly passing any printer to it, @code{ses-center} will call the +current column printer if any, or the spreadsheet default printer +otherwise. So using @code{=fill} as a column printer will result in a +stack overflow in this column. SES does not check for that; +you just have to be careful. For instance, re-write @code{=fill} like this: @lisp @@ -599,11 +599,11 @@ this: (t (ses-center-span x ?# 'ses-prin1)))) @end lisp -The code above applies the @code{=} filling only to strings, it also +The code above applies the @code{=} filling only to strings; it also surrounds the string by one space on each side before filling with -@code{=} signs. So string @samp{Foo} will be displayed like @samp{@w{=== -Foo ===}} in an 11 character wide column. Anything else than empty cell -or non string is displayed like errouneous by using @code{#} filling. +@code{=} signs. So the string @samp{Foo} will be displayed like @samp{@w{=== +Foo ===}} in an 11 character wide column. Anything other than an empty cell +or a non-string is displayed as an error by using @code{#} filling. @node Clearing cells @section Clearing cells diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index e8c181b2292..2c41dddd1bf 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -970,7 +970,7 @@ be populated in your @command{Online Accounts} application outside Emacs. Since Google Drive uses cryptic blob file names internally, @value{tramp} works with the @code{display-name} of the files. This -could produce unexpected behaviour in case two files in the same +could produce unexpected behavior in case two files in the same directory have the same @code{display-name}, such a situation must be avoided. @item @option{obex} diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 85968c85b1c..2ce97377362 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -6241,7 +6241,7 @@ When point is at the first header line, moves it after the colon and spaces separating header name and header value. When point is in a continuation line of a folded header (i.e. the -line starts with a space), the behaviour depends on HANDLE-FOLDED +line starts with a space), the behavior depends on HANDLE-FOLDED argument. If it’s nil, function moves the point to the start of the header continuation; otherwise, function locates the beginning of the header and moves point past the colon as is the diff --git a/lisp/isearch.el b/lisp/isearch.el index 721f2fc3181..25261d8d4a8 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -558,7 +558,7 @@ The symbol property `isearch-message-prefix' put on this function specifies the prefix string displayed in the search message. This variable is set and changed during isearch. To change the -default behaviour used for searches, see `search-default-mode' +default behavior used for searches, see `search-default-mode' instead.") ;; We still support setting this to t for backwards compatibility. (define-obsolete-variable-alias 'isearch-word diff --git a/lisp/ses.el b/lisp/ses.el index 9d278b6d222..ad3c39e93ea 100644 --- a/lisp/ses.el +++ b/lisp/ses.el @@ -3625,9 +3625,8 @@ function is redefined." that the definition occurs only when the local printer does not already exists. -Function `ses-define-if-new-local-printer' is not interactive, it -is intended for mode hooks to programatically automatically add -local printers." +Function `ses-define-if-new-local-printer' is not interactive; it +is intended for mode hooks to add local printers automatically." (unless (gethash name ses--local-printer-hashmap) (ses-define-local-printer name def))) @@ -3891,7 +3890,7 @@ current column and continues until the next nonblank column." (defun ses-prin1 (value) "Shorthand for '(prin1-to-string VALUE t)'. -Usefull to handle the default behaviour in custom lambda based +Useful to handle the default behavior in custom lambda based printer functions." (prin1-to-string value t)) diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index ed2075caca0..029139e572e 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -623,7 +623,7 @@ After interpretation of ARGS the results are concatenated as for ;; ;; In addition a reStructuredText section header in the buffer is called ;; "section". -;; +;; ;; For lists a "s" is added to the name of the concepts. @@ -856,10 +856,10 @@ Return ADO if so or signal an error otherwise." (let ((pos (rst-Ado-position (rst-Hdr-ado self) (rst-Hdr-ado-map hdrs)))) (and pos (nthcdr pos hdrs)))) -(defun rst-Hdr-ado-map (selfs) +(defun rst-Hdr-ado-map (selves) ;; testcover: ok. - "Return `rst-Ado' list extracted from elements of SELFS." - (mapcar 'rst-Hdr-ado selfs)) + "Return `rst-Ado' list extracted from elements of SELVES." + (mapcar 'rst-Hdr-ado selves)) (defun rst-Hdr-get-char (self) ;; testcover: ok. @@ -2583,7 +2583,7 @@ If PREFER-ROMAN roman numbering is preferred over using letters." (1+ (string-to-char (match-string 0 curitem)))) nil nil curitem))))) -;; FIXME: At least the contiunation may be fold into +;; FIXME: At least the continuation may be folded into ;; `newline-and-indent`. However, this may not be wanted by everyone so ;; it should be possible to switch this off. (defun rst-insert-list (&optional prefer-roman) diff --git a/lisp/window.el b/lisp/window.el index faefbd38e82..bf1f13e7766 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -6754,7 +6754,7 @@ displays a buffer that derives from one of the given modes. When ALIST contains no `mode' entry, the current major mode of BUFFER is used. -The behaviour is also controlled by entries for +The behavior is also controlled by entries for `inhibit-same-window', `reusable-frames' and `inhibit-switch-frame' as is done in the function `display-buffer-reuse-window'." diff --git a/src/emacs.c b/src/emacs.c index 85fb22bc977..9b2300989fa 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -684,7 +684,7 @@ main (int argc, char **argv) dumping = !initialized && (strcmp (argv[argc - 1], "dump") == 0 || strcmp (argv[argc - 1], "bootstrap") == 0); - /* True if address randomization interferes with memory allocaiton. */ + /* True if address randomization interferes with memory allocation. */ # ifdef __PPC64__ bool disable_aslr = true; # else diff --git a/src/regex.c b/src/regex.c index f0129241cfe..c191f2462ad 100644 --- a/src/regex.c +++ b/src/regex.c @@ -1988,7 +1988,7 @@ re_wctype_parse (const unsigned char **strp, unsigned limit) *strp = (const unsigned char *)(it + 2); - /* Sort tests in the length=five case by frequency the classes to minimise + /* Sort tests in the length=five case by frequency the classes to minimize number of times we fail the comparison. The frequencies of character class names used in Emacs sources as of 2016-07-27: @@ -4651,7 +4651,7 @@ skip_noops (const_re_char *p, const_re_char *pend) return p; } -/* Test if C matches charset op. *PP points to the charset or chraset_not +/* Test if C matches charset op. *PP points to the charset or charset_not opcode. When the function finishes, *PP will be advanced past that opcode. C is character to test (possibly after translations) and CORIG is original character (i.e. without any translations). UNIBYTE denotes whether c is diff --git a/test/file-organisation.org b/test/file-organisation.org deleted file mode 100644 index 226e12d5330..00000000000 --- a/test/file-organisation.org +++ /dev/null @@ -1,54 +0,0 @@ -#+TITLE: The Location of Emacs-Lisp Tests - - - -* The Main Emacs Repository - -The Emacs repository contains a very large number of Emacs-Lisp files, many of -which pre-date both formal package support for Emacs and automated unit -testing. - -All paths are relative to the Emacs root directory. - -** Source - -Lisp files are stored in the ~lisp~ directory or its sub-directories. -Sub-directories are in many cases themed after packages (~gnus~, ~org~, -~calc~), related functionality (~net~, ~emacs-lisp~, ~progmodes~) or status -(~obsolete~). - -C source is stored in the ~src~ directory, which is flat. - -** Test Files - -Automated tests should be stored in the ~test/automated/lisp~ directory. Tests -should reflect the directory structure of the source tree; so tests for files -in the ~emacs-lisp~ source directory should reside in the -~test/lisp/emacs-lisp~ directory. - -Tests should normally reside in a file with ~-tests~ added to the name of -the tested source file; hence ~ert.el~ is tested in ~ert-tests.el~, or -~pcase.el~ is tested in ~pcase-tests.el~. Exceptionally, tests for a -single feature may be placed into multiple files of any name which are -themselves placed in a directory named after the feature with ~-tests~ -appended, such as ~/test/lisp/emacs-lisp/eieio-tests~ - -Where features of the C source are tested using Emacs-Lisp test files, these -should reside in ~/test/src~ and be named after the C file. - -A few test suites which predate this scheme and do not fit cleanly -into it are placed in ~/test/lisp/legacy~. - -There are also some test materials that cannot be run automatically -(i.e. via ert). These should be placed in ~/test/manual~ - -** Resource Files - -Resource files for tests (containing test data) should reside in a directory -named after the feature with a ~-resources~ suffix, and located in the same -directory as the feature. Hence, the lisp file ~flymake.el~ should have test -files in ~/test/automated/lisp/progmodes/flymake-tests.el~ should reside in a -directory called ~/test/automated/lisp/progmodes/flymake-resources~. - -No guidance is given for the organization of resource files inside the -~-resource~ directory; files can be organized at the author's discretion. diff --git a/test/file-organization.org b/test/file-organization.org new file mode 100644 index 00000000000..226e12d5330 --- /dev/null +++ b/test/file-organization.org @@ -0,0 +1,54 @@ +#+TITLE: The Location of Emacs-Lisp Tests + + + +* The Main Emacs Repository + +The Emacs repository contains a very large number of Emacs-Lisp files, many of +which pre-date both formal package support for Emacs and automated unit +testing. + +All paths are relative to the Emacs root directory. + +** Source + +Lisp files are stored in the ~lisp~ directory or its sub-directories. +Sub-directories are in many cases themed after packages (~gnus~, ~org~, +~calc~), related functionality (~net~, ~emacs-lisp~, ~progmodes~) or status +(~obsolete~). + +C source is stored in the ~src~ directory, which is flat. + +** Test Files + +Automated tests should be stored in the ~test/automated/lisp~ directory. Tests +should reflect the directory structure of the source tree; so tests for files +in the ~emacs-lisp~ source directory should reside in the +~test/lisp/emacs-lisp~ directory. + +Tests should normally reside in a file with ~-tests~ added to the name of +the tested source file; hence ~ert.el~ is tested in ~ert-tests.el~, or +~pcase.el~ is tested in ~pcase-tests.el~. Exceptionally, tests for a +single feature may be placed into multiple files of any name which are +themselves placed in a directory named after the feature with ~-tests~ +appended, such as ~/test/lisp/emacs-lisp/eieio-tests~ + +Where features of the C source are tested using Emacs-Lisp test files, these +should reside in ~/test/src~ and be named after the C file. + +A few test suites which predate this scheme and do not fit cleanly +into it are placed in ~/test/lisp/legacy~. + +There are also some test materials that cannot be run automatically +(i.e. via ert). These should be placed in ~/test/manual~ + +** Resource Files + +Resource files for tests (containing test data) should reside in a directory +named after the feature with a ~-resources~ suffix, and located in the same +directory as the feature. Hence, the lisp file ~flymake.el~ should have test +files in ~/test/automated/lisp/progmodes/flymake-tests.el~ should reside in a +directory called ~/test/automated/lisp/progmodes/flymake-resources~. + +No guidance is given for the organization of resource files inside the +~-resource~ directory; files can be organized at the author's discretion. diff --git a/test/lisp/emulation/viper-tests.el b/test/lisp/emulation/viper-tests.el index 0d6095b2c92..2c63b24fae0 100644 --- a/test/lisp/emulation/viper-tests.el +++ b/test/lisp/emulation/viper-tests.el @@ -78,7 +78,7 @@ after itself, although it will leave a buffer called (viper-test-undo-kmacro []))) (ert-deftest viper-test-undo-1 () - "Test for VI like undo behaviour. + "Test for VI like undo behavior. Insert 1, then 2 on consecutive lines, followed by undo. This should leave just 1 in the buffer. @@ -100,7 +100,7 @@ Test for Bug #22295" )))) (ert-deftest viper-test-undo-2 () - "Test for VI like undo behaviour. + "Test for VI like undo behavior. Insert \"1 2 3 4 5\" then delete the 2, then the 4, and undo. Should restore the 4, but leave the 2 deleted. @@ -120,7 +120,7 @@ Test for Bug #22295" ])))) (ert-deftest viper-test-undo-3 () - "Test for VI like undo behaviour. + "Test for VI like undo behavior. Insert \"1 2 3 4 5 6\", delete the 2, then the 3 4 and 5. Should restore the 3 4 and 5 but not the 2. diff --git a/test/src/regex-tests.el b/test/src/regex-tests.el index 85addcab537..6e21088114e 100644 --- a/test/src/regex-tests.el +++ b/test/src/regex-tests.el @@ -285,10 +285,10 @@ on success" (defun regex-tests-unextend (pattern) - "Basic conversion from extended regexen to emacs ones. This is + "Basic conversion from extended regexes to emacs ones. This is mostly a hack that adds \\ to () and | and {}, and removes it if it already exists. We also change \\S (and \\s) to \\S- (and -\\s-) because extended regexen see the former as whitespace, but +\\s-) because extended regexes see the former as whitespace, but emacs requires an extra symbol character" (with-temp-buffer @@ -364,7 +364,7 @@ pattern)" (defconst regex-tests-BOOST-whitelist [ - ;; emacs is more stringent with regexen involving unbalanced ) + ;; emacs is more stringent with regexes involving unbalanced ) 63 65 69 ;; in emacs, regex . doesn't match \n @@ -374,7 +374,7 @@ pattern)" ;; characters 107 108 109 122 123 124 140 141 142 - ;; emacs accepts regexen with {} + ;; emacs accepts regexes with {} 161 ;; emacs doesn't fail on bogus ranges such as [3-1] or [1-3-5] @@ -616,7 +616,7 @@ differences in behavior.") ;; characters 57 58 59 60 - ;; emacs is more stringent with regexen involving unbalanced ) + ;; emacs is more stringent with regexes involving unbalanced ) 67 ] "Line numbers in the TESTS test that should be skipped. These