commit c9415ccbf84fce152e0f4b98ac2ed60680272a47 (HEAD, refs/remotes/origin/master) Author: Fabián Ezequiel Gallina Date: Thu Apr 9 01:41:55 2015 -0300 python.el: Indent docstring lines to base-indent Fixes: debbugs:19595 Thanks to immerrr for reporting and providing an initial patch. * lisp/progmodes/python.el (python-indent-context): Add :inside-docstring context. (python-indent--calculate-indentation): Handle :inside-docstring. (python-indent-region): Re-indent docstrings. * test/automated/python-tests.el (python-indent-region-5) (python-indent-inside-string-2): Fix tests. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index da38152..856ed32 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -844,7 +844,9 @@ keyword ;; Inside a string. ((let ((start (python-syntax-context 'string ppss))) (when start - (cons :inside-string start)))) + (cons (if (python-info-docstring-p) + :inside-docstring + :inside-string) start)))) ;; Inside a paren. ((let* ((start (python-syntax-context 'paren ppss)) (starts-in-newline @@ -989,6 +991,12 @@ possibilities can be narrowed to specific indentation points." ;; Copy previous indentation. (goto-char start) (current-indentation)) + (`(:inside-docstring . ,start) + (let* ((line-indentation (current-indentation)) + (base-indent (progn + (goto-char start) + (current-indentation)))) + (max line-indentation base-indent))) (`(,(or :after-block-start :after-backslash-first-line :inside-paren-newline-start) . ,start) @@ -1138,14 +1146,15 @@ Called from a program, START and END specify the region to indent." (not line-is-comment-p)) (python-info-current-line-empty-p))))) ;; Don't mess with strings, unless it's the - ;; enclosing set of quotes. + ;; enclosing set of quotes or a docstring. (or (not (python-syntax-context 'string)) (eq (syntax-after (+ (1- (point)) (current-indentation) (python-syntax-count-quotes (char-after) (point)))) - (string-to-syntax "|"))) + (string-to-syntax "|")) + (python-info-docstring-p)) ;; Skip if current line is a block start, a ;; dedenter or block ender. (save-excursion diff --git a/test/automated/python-tests.el b/test/automated/python-tests.el index 22c111f..47264c3 100644 --- a/test/automated/python-tests.el +++ b/test/automated/python-tests.el @@ -1014,7 +1014,7 @@ lines def fn(a, b, c=True): '''docstring bunch - of + of lines ''' " @@ -1022,16 +1022,17 @@ def fn(a, b, c=True): (should (eq (car (python-indent-context)) :after-block-start)) (should (= (python-indent-calculate-indentation) 4)) (python-tests-look-at "bunch") - (should (eq (car (python-indent-context)) :inside-string)) + (should (eq (car (python-indent-context)) :inside-docstring)) (should (= (python-indent-calculate-indentation) 4)) (python-tests-look-at "of") - (should (eq (car (python-indent-context)) :inside-string)) - (should (= (python-indent-calculate-indentation) 4)) + (should (eq (car (python-indent-context)) :inside-docstring)) + ;; Any indentation deeper than the base-indent must remain unmodified. + (should (= (python-indent-calculate-indentation) 8)) (python-tests-look-at "lines") - (should (eq (car (python-indent-context)) :inside-string)) + (should (eq (car (python-indent-context)) :inside-docstring)) (should (= (python-indent-calculate-indentation) 4)) (python-tests-look-at "'''") - (should (eq (car (python-indent-context)) :inside-string)) + (should (eq (car (python-indent-context)) :inside-docstring)) (should (= (python-indent-calculate-indentation) 4)))) (ert-deftest python-indent-inside-string-3 () @@ -1189,21 +1190,33 @@ def f(): expected))))) (ert-deftest python-indent-region-5 () - "Test region indentation leaves strings untouched (start delimiter)." + "Test region indentation for docstrings." (let ((contents " def f(): ''' this is -a multiline + a multiline string ''' + x = \\ + ''' +this is an arbitrarily + indented multiline + string +''' ") (expected " def f(): ''' -this is -a multiline -string + this is + a multiline + string + ''' + x = \\ + ''' +this is an arbitrarily + indented multiline + string ''' ")) (python-tests-with-temp-buffer commit 911ed2eba4ad691b35e4b81bcd8b24f58b0375ca Author: Fabián Ezequiel Gallina Date: Thu Apr 9 00:53:18 2015 -0300 python.el: Increase native completion robustness Fixes: debbugs:19755 Thanks to Carlos Pita for reporting this and providing useful ideas. * lisp/progmodes/python.el (python-shell-completion-native-output-timeout): Increase value. (python-shell-completion-native-try-output-timeout): New var. (python-shell-completion-native-try): Use it. (python-shell-completion-native-setup): New readline setup avoids polluting current context, ensures output when no-completions are available and includes output end marker. (python-shell-completion-native-get-completions): Trigger with one tab only. Call accept-process-output until output end is found or python-shell-completion-native-output-timeout is exceeded. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index c89241b..da38152 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3040,10 +3040,14 @@ When a match is found, native completion is disabled." "Enable readline based native completion." :type 'boolean) -(defcustom python-shell-completion-native-output-timeout 0.01 +(defcustom python-shell-completion-native-output-timeout 5.0 "Time in seconds to wait for completion output before giving up." :type 'float) +(defcustom python-shell-completion-native-try-output-timeout 1.0 + "Time in seconds to wait for *trying* native completion output." + :type 'float) + (defvar python-shell-completion-native-redirect-buffer " *Python completions redirect*" "Buffer to be used to redirect output of readline commands.") @@ -3057,7 +3061,9 @@ When a match is found, native completion is disabled." (defun python-shell-completion-native-try () "Return non-nil if can trigger native completion." - (let ((python-shell-completion-native-enable t)) + (let ((python-shell-completion-native-enable t) + (python-shell-completion-native-output-timeout + python-shell-completion-native-try-output-timeout)) (python-shell-completion-native-get-completions (get-buffer-process (current-buffer)) nil "int"))) @@ -3065,27 +3071,73 @@ When a match is found, native completion is disabled." (defun python-shell-completion-native-setup () "Try to setup native completion, return non-nil on success." (let ((process (python-shell-get-process))) - (python-shell-send-string - (funcall - 'mapconcat - #'identity - (list - "try:" - " import readline, rlcompleter" - ;; Remove parens on callables as it breaks completion on - ;; arguments (e.g. str(Ari)). - " class Completer(rlcompleter.Completer):" - " def _callable_postfix(self, val, word):" - " return word" - " readline.set_completer(Completer().complete)" - " if readline.__doc__ and 'libedit' in readline.__doc__:" - " readline.parse_and_bind('bind ^I rl_complete')" - " else:" - " readline.parse_and_bind('tab: complete')" - " print ('python.el: readline is available')" - "except:" - " print ('python.el: readline not available')") - "\n") + (python-shell-send-string " +def __PYTHON_EL_native_completion_setup(): + try: + import readline + try: + import __builtin__ + except ImportError: + # Python 3 + import builtins as __builtin__ + builtins = dir(__builtin__) + is_ipython = ('__IPYTHON__' in builtins or + '__IPYTHON__active' in builtins) + class __PYTHON_EL_Completer: + PYTHON_EL_WRAPPED = True + def __init__(self, completer): + self.completer = completer + self.last_completion = None + def __call__(self, text, state): + if state == 0: + # The first completion is always a dummy completion. This + # ensures proper output for sole completions and a current + # input safeguard when no completions are available. + self.last_completion = None + completion = '0__dummy_completion__' + else: + completion = self.completer(text, state - 1) + if not completion: + if state == 1: + # When no completions are available, two non-sharing + # prefix strings are returned just to ensure output + # while preventing changes to current input. + completion = '1__dummy_completion__' + elif self.last_completion != '~~~~__dummy_completion__': + # This marks the end of output. + completion = '~~~~__dummy_completion__' + elif completion.endswith('('): + # Remove parens on callables as it breaks completion on + # arguments (e.g. str(Ari)). + completion = completion[:-1] + self.last_completion = completion + return completion + completer = readline.get_completer() + if not completer: + # Used as last resort to avoid breaking customizations. + import rlcompleter + completer = readline.get_completer() + if completer and not getattr(completer, 'PYTHON_EL_WRAPPED', False): + # Wrap the existing completer function only once. + new_completer = __PYTHON_EL_Completer(completer) + if not is_ipython: + readline.set_completer(new_completer) + else: + # IPython hacks readline such that `readline.set_completer` + # won't work. This workaround injects the new completer + # function into the existing instance directly. + instance = getattr(completer, 'im_self', completer.__self__) + instance.rlcomplete = new_completer + if readline.__doc__ and 'libedit' in readline.__doc__: + readline.parse_and_bind('bind ^I rl_complete') + else: + readline.parse_and_bind('tab: complete') + # Require just one tab to send output. + readline.parse_and_bind('set show-all-if-ambiguous on') + print ('python.el: readline is available') + except IOError: + print ('python.el: readline not available') +__PYTHON_EL_native_completion_setup()" process) (python-shell-accept-process-output process) (when (save-excursion @@ -3163,9 +3215,8 @@ completion." (original-filter-fn (process-filter process)) (redirect-buffer (get-buffer-create python-shell-completion-native-redirect-buffer)) - (separators (python-rx - (or whitespace open-paren close-paren))) - (trigger "\t\t\t") + (separators (python-rx (or whitespace open-paren close-paren))) + (trigger "\t") (new-input (concat input trigger)) (input-length (save-excursion @@ -3187,7 +3238,8 @@ completion." (comint-redirect-insert-matching-regexp nil) ;; Feed it some regex that will never match. (comint-redirect-finished-regexp "^\\'$") - (comint-redirect-output-buffer redirect-buffer)) + (comint-redirect-output-buffer redirect-buffer) + (current-time (float-time))) ;; Compatibility with Emacs 24.x. Comint changed and ;; now `comint-redirect-filter' gets 3 args. This ;; checks which version of `comint-redirect-filter' is @@ -3200,22 +3252,22 @@ completion." #'comint-redirect-filter original-filter-fn)) (set-process-filter process #'comint-redirect-filter)) (process-send-string process input-to-send) - (accept-process-output - process - python-shell-completion-native-output-timeout) - ;; XXX: can't use `python-shell-accept-process-output' - ;; here because there are no guarantees on how output - ;; ends. The workaround here is to call - ;; `accept-process-output' until we don't find anything - ;; else to accept. - (while (accept-process-output - process - python-shell-completion-native-output-timeout)) + ;; Grab output until our dummy completion used as + ;; output end marker is found. Output is accepted + ;; *very* quickly to keep the shell super-responsive. + (while (and (not (re-search-backward "~~~~__dummy_completion__" nil t)) + (< (- current-time (float-time)) + python-shell-completion-native-output-timeout)) + (accept-process-output process 0.01)) (cl-remove-duplicates - (split-string - (buffer-substring-no-properties - (point-min) (point-max)) - separators t)))) + (cl-remove-if + (lambda (c) + (string-match "__dummy_completion__" c)) + (split-string + (buffer-substring-no-properties + (point-min) (point-max)) + separators t)) + :test #'string=))) (set-process-filter process original-filter-fn)))))) (defun python-shell-completion-get-completions (process import input) commit c44f5b046b3f8e9a742c583880ae3a3f78828944 Author: Samer Masterson Date: Wed Apr 8 22:31:51 2015 -0400 * lisp/eshell: Make backslash a no-op in front of normal chars Fixes: debbugs:8531 * lisp/eshell/esh-arg.el (eshell-parse-argument-hook): Update comment. (eshell-parse-backslash): Return escaped character after backslash if it is special. Otherwise, if the backslash is not in a quoted string, ignore the backslash and return the character after; if the backslash is in a quoted string, return the backslash and the character after. * test/automated/eshell.el (eshell-test/escape-nonspecial) (eshell-test/escape-nonspecial-unicode) (eshell-test/escape-nonspecial-quoted) (eshell-test/escape-special-quoted): Add tests for new `eshell-parse-backslash' behavior. diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index 5c7d7ca..a5f697f 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el @@ -89,7 +89,7 @@ yield the values intended." (goto-char (match-end 0)) (eshell-finish-arg))))) - ;; backslash before a special character means escape it + ;; parse backslash and the character after 'eshell-parse-backslash ;; text beginning with ' is a literally quoted @@ -305,34 +305,27 @@ If the character is itself a backslash, it needs no escaping." (string ?\\ char))))) (defun eshell-parse-backslash () - "Parse a single backslash (\) character, which might mean escape. -It only means escape if the character immediately following is a -special character that is not itself a backslash." + "Parse a single backslash (\\) character and the character after. +If the character after the backslash is special, always ignore +the backslash and return the escaped character. + +Otherwise, if the backslash is not in quoted string, the +backslash is ignored and the character after is returned. If the +backslash is in a quoted string, the backslash and the character +after are both returned." (when (eq (char-after) ?\\) - (if (eshell-looking-at-backslash-return (point)) - (throw 'eshell-incomplete ?\\) - (if (and (not (eq (char-after (1+ (point))) ?\\)) - (if eshell-current-quoted - (memq (char-after (1+ (point))) - eshell-special-chars-inside-quoting) - (memq (char-after (1+ (point))) - eshell-special-chars-outside-quoting))) - (progn - (forward-char 2) - (list 'eshell-escape-arg - (char-to-string (char-before)))) - ;; allow \\ to mean a literal "\" character followed by a - ;; normal return, rather than a backslash followed by a line - ;; continuation (i.e., "\\ + \n" rather than "\ + \\n"). This - ;; is necessary because backslashes in Eshell are not special - ;; unless they either precede something special, or precede a - ;; backslash that precedes something special. (Mainly this is - ;; done to make using backslash on Windows systems more - ;; natural-feeling). - (if (eshell-looking-at-backslash-return (1+ (point))) - (forward-char)) - (forward-char) - "\\")))) + (when (eshell-looking-at-backslash-return (point)) + (throw 'eshell-incomplete ?\\)) + (forward-char 2) ; Move one char past the backslash. + ;; If the char is in a quote, backslash only has special meaning + ;; if it is escaping a special char. + (if eshell-current-quoted + (if (memq (char-before) eshell-special-chars-inside-quoting) + (list 'eshell-escape-arg (char-to-string (char-before))) + (concat "\\" (char-to-string (char-before)))) + (if (memq (char-before) eshell-special-chars-outside-quoting) + (list 'eshell-escape-arg (char-to-string (char-before))) + (char-to-string (char-before)))))) (defun eshell-parse-literal-quote () "Parse a literally quoted string. Nothing has special meaning!" diff --git a/test/automated/eshell.el b/test/automated/eshell.el index d51355f..81898db 100644 --- a/test/automated/eshell.el +++ b/test/automated/eshell.el @@ -166,6 +166,37 @@ e.g. \"{(+ 1 2)} 3\" => 3" (eshell-command-result-p "+ 1 2; + $_ 4" "3\n6\n"))) +(ert-deftest eshell-test/escape-nonspecial () + "Test that \"\\c\" and \"c\" are equivalent when \"c\" is not a +special character." + (with-temp-eshell + (eshell-command-result-p "echo he\\llo" + "hello\n"))) + +(ert-deftest eshell-test/escape-nonspecial-unicode () + "Test that \"\\c\" and \"c\" are equivalent when \"c\" is a +unicode character (unicode characters are nonspecial by +definition)." + (with-temp-eshell + (eshell-command-result-p "echo Vid\\éos" + "Vidéos\n"))) + +(ert-deftest eshell-test/escape-nonspecial-quoted () + "Test that the backslash is preserved for escaped nonspecial +chars" + (with-temp-eshell + (eshell-command-result-p "echo \"h\\i\"" + ;; Backslashes are doubled for regexp. + "h\\\\i\n"))) + +(ert-deftest eshell-test/escape-special-quoted () + "Test that the backslash is not preserved for escaped special +chars" + (with-temp-eshell + (eshell-command-result-p "echo \"h\\\\i\"" + ;; Backslashes are doubled for regexp. + "h\\\\i\n"))) + (ert-deftest eshell-test/command-running-p () "Modeline should show no command running" (with-temp-eshell commit 3d78c5578c435c7eb231ff2212aaf85a1b3ed0e5 Author: Gustav Hållberg Date: Wed Apr 8 21:47:50 2015 -0400 (diff-hunk-file-names): Don't require a TAB after the file name Fixes: debbugs:20276 diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index a9614e9..948a45e 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -821,7 +821,7 @@ If the OLD prefix arg is passed, tell the file NAME of the old file." (header-files ;; handle filenames with spaces; ;; cf. diff-font-lock-keywords / diff-file-header-face - (if (looking-at "[-*][-*][-*] \\([^\t]+\\)\t.*\n[-+][-+][-+] \\([^\t]+\\)") + (if (looking-at "[-*][-*][-*] \\([^\t\n]+\\).*\n[-+][-+][-+] \\([^\t\n]+\\)") (list (if old (match-string 1) (match-string 2)) (if old (match-string 2) (match-string 1))) (forward-line 1) nil))) commit 0ae9ae36f0fbac47fb35efbd45d8cdda302f2e36 Author: Gustav Hållberg Date: Wed Apr 8 21:46:28 2015 -0400 (diff-hunk-file-names): Don't require a TAB after the file name * lisp/vc/diff-mode.el (diff-hunk-file-names): Don't require a TAB after the file name (bug#20276). diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index aa7cdf9..d0668bb 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -1869,8 +1869,13 @@ expressions; a `progn' form will be returned enclosing these forms." ;; Like body but body is wrapped in edebug-enter form. ;; The body is assumed to be executing inside of the function context. ;; Not to be used otherwise. - (let ((edebug-inside-func t)) - (list (edebug-wrap-def-body (edebug-forms cursor))))) + (let* ((edebug-inside-func t) + (forms (edebug-forms cursor))) + ;; If there's no form, there's nothing to wrap! + ;; This happens to handle bug#20281, tho maybe a better fix would be to + ;; improve the `defun' spec. + (when forms + (list (edebug-wrap-def-body forms))))) ;;;; Edebug Form Specs commit 4f08fb5aaa08cc66cfd8d62a928abe016668f29e Author: Paul Eggert Date: Wed Apr 8 18:03:06 2015 -0700 Minor quoting etc. fixes to Emacs manual * doc/emacs/Makefile.in, doc/emacs/ack.texi, doc/emacs/building.texi: * doc/emacs/calendar.texi, doc/emacs/cmdargs.texi: * doc/emacs/custom.texi, doc/emacs/dired.texi, doc/emacs/emacs.texi: * doc/emacs/files.texi, doc/emacs/glossary.texi, doc/emacs/gnu.texi: * doc/emacs/indent.texi, doc/emacs/macos.texi: * doc/emacs/maintaining.texi, doc/emacs/makefile.w32-in: * doc/emacs/programs.texi, doc/emacs/rmail.texi: * doc/emacs/search.texi, doc/emacs/trouble.texi: * doc/emacs/vc1-xtra.texi: Use American-style double quoting in ordinary text, and quote 'like this' when single-quoting in ASCII text. Also, fix some minor spacing issues. diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in index 9f04f0d..9932348 100644 --- a/doc/emacs/Makefile.in +++ b/doc/emacs/Makefile.in @@ -23,7 +23,7 @@ SHELL = @SHELL@ # update the sed rules in the dist target below. # Where to find the source code. $(srcdir) will be the doc/emacs subdirectory -# of the source tree. This is set by configure's `--srcdir' option. +# of the source tree. This is set by configure's '--srcdir' option. srcdir=@srcdir@ top_srcdir = @top_srcdir@ diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index 151c3f1..f612a7b 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi @@ -1201,7 +1201,7 @@ Ken Stevens wrote @file{ispell.el}, a spell-checker interface. @item Kim F. Storm made many improvements to the Emacs display engine, -process support, and networking support. He also wrote +process support, and networking support. He also wrote @file{bindat.el}, a package for encoding and decoding binary data; CUA mode, which allows Emacs to emulate the standard CUA key bindings; @file{ido.el}, a package for selecting buffers and files diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index b0e6538..b4a99a1 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -947,7 +947,7 @@ of the window. Disabled breakpoints are indicated with @samp{b}. (The margin is only displayed if a breakpoint is present.) A solid arrow in the left fringe of a source buffer indicates the -line of the innermost frame where the debugged program has stopped. A +line of the innermost frame where the debugged program has stopped. A hollow arrow indicates the current execution line of a higher-level frame. If you drag the arrow in the fringe with @kbd{Mouse-1}, that causes execution to advance to the line where you release the button. @@ -1138,7 +1138,7 @@ size for these data items. When @code{gdb-many-windows} is non-@code{nil}, the locals buffer shares its window with the registers buffer, just like breakpoints and -threads buffers. To switch from one to the other, click with +threads buffers. To switch from one to the other, click with @kbd{Mouse-1} on the relevant button in the header line. @node Watch Expressions @@ -1457,8 +1457,8 @@ Evaluate all the Emacs Lisp expressions in the buffer. @end table @ifinfo -@c This uses ``colon'' instead of a literal `:' because Info cannot -@c cope with a `:' in a menu +@c This uses 'colon' instead of a literal ':' because Info cannot +@c cope with a ':' in a menu. @kindex M-@key{colon} @end ifinfo @ifnotinfo diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index d3f3a55..03a484b 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi @@ -379,7 +379,7 @@ between years will not work. If the variable @code{cal-html-print-day-number-flag} is non-@code{nil}, then the monthly calendars show the day-of-the-year -number. The variable @code{cal-html-year-index-cols} specifies the +number. The variable @code{cal-html-year-index-cols} specifies the number of columns in the yearly index page. @cindex calendar and @LaTeX{} @@ -827,7 +827,7 @@ Display Mayan date for selected day (@code{calendar-mayan-print-date}). Otherwise, move point to the date you want to convert, then type the appropriate command starting with @kbd{p} from the table above. The prefix @kbd{p} is a mnemonic for ``print'', since Emacs ``prints'' the -equivalent date in the echo area. @kbd{p o} displays the +equivalent date in the echo area. @kbd{p o} displays the date in all forms known to Emacs. You can also use @kbd{Mouse-3} and then choose @kbd{Other calendars} from the menu that appears. This displays the equivalent forms of the date in all the calendars Emacs diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 071cd68..60fe977 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -10,7 +10,7 @@ @cindex switches (command line) @cindex startup (command line arguments) @cindex invocation (command line arguments) -@c FIXME: Document `--smid'? --xfq +@c FIXME: Document '--smid'? --xfq Emacs supports command line arguments to request various actions when invoking Emacs. These are for compatibility with other editors @@ -582,7 +582,7 @@ The name of the news server. Used by the mh and Gnus packages. @item ORGANIZATION @vindex ORGANIZATION, environment variable The name of the organization to which you belong. Used for setting the -`Organization:' header in your posts from the Gnus package. +``Organization:'' header in your posts from the Gnus package. @item PATH @vindex PATH, environment variable A colon-separated list of directories containing executable files. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 9fd823b..429567f 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -778,7 +778,7 @@ fill-column's value is 70 Automatically becomes buffer-local when set. This variable is safe as a file local variable if its value -satisfies the predicate `integerp'. +satisfies the predicate @code{integerp}. Documentation: Column beyond which automatic line-wrapping should happen. @@ -2213,10 +2213,10 @@ require one and some contexts require the other. keys which send non-@acronym{ASCII} characters. @item True: -@code{t} stands for `true'. +@code{t} stands for ``true''. @item False: -@code{nil} stands for `false'. +@code{nil} stands for ``false''. @item Other Lisp objects: @cindex Lisp object syntax @@ -2247,8 +2247,8 @@ line. (setq c-tab-always-indent nil) @end example -Here we have a variable whose value is normally @code{t} for `true' -and the alternative is @code{nil} for `false'. +Here we have a variable whose value is normally @code{t} for ``true'' +and the alternative is @code{nil} for ``false''. @item Make searches case sensitive by default (in all buffers that do not diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 141bb66..4adb698 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -376,7 +376,7 @@ for @file{..} and typing @kbd{f} there. @end table @node Marks vs Flags -@section Dired Marks vs. Flags +@section Dired Marks vs.@: Flags @cindex marking many files (in Dired) Instead of flagging a file with @samp{D}, you can @dfn{mark} the diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index c1ad688..caec373 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -115,7 +115,7 @@ display editor. This manual describes how to edit with Emacs and some of the ways to customize it; it corresponds to GNU Emacs version @value{EMACSVER}. -@c See `manual-html-mono' and `manual-html-node' in admin/admin.el. +@c See 'manual-html-mono' and 'manual-html-node' in admin/admin.el. @ifset WWW_GNU_ORG @html The homepage for GNU Emacs is at @@ -239,9 +239,9 @@ Indexes (each index contains a large menu) * Concept Index:: An item for each concept. @c Do NOT modify the following 3 lines! They must have this form to -@c be correctly identified by `texinfo-multiple-files-update'. In +@c be correctly identified by 'texinfo-multiple-files-update'. In @c particular, the detailed menu header line MUST be identical to the -@c value of `texinfo-master-menu-header'. See texnfo-upd.el. +@c value of 'texinfo-master-menu-header'. See texnfo-upd.el. @detailmenu --- The Detailed Node Listing --- @@ -391,7 +391,7 @@ Searching and Replacement * Symbol Search:: Search for a source code symbol. * Regexp Search:: Search for match for a regexp. * Regexps:: Syntax of regular expressions. -* Regexp Backslash:: Regular expression constructs starting with `\'. +* Regexp Backslash:: Regular expression constructs starting with '\'. * Regexp Example:: A complex regular expression explained. * Search Case:: To ignore case while searching, or not. * Replace:: Search, and replace some or all matches. @@ -1149,7 +1149,7 @@ The Emacs Initialization File Dealing with Emacs Trouble * DEL Does Not Delete:: What to do if @key{DEL} doesn't delete. -* Stuck Recursive:: `[...]' in mode line around the parentheses. +* Stuck Recursive:: '[...]' in mode line around the parentheses. * Screen Garbled:: Garbage on the screen. * Text Garbled:: Garbage in the text. * Memory Full:: How to cope when you run out of memory. diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 21957d0..c4b0c11 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -429,7 +429,7 @@ by mistake. One thing you can do is type @kbd{M-~} (@code{not-modified}), which clears out the indication that the buffer is modified. If you do this, none of the save commands will believe that the buffer needs to be saved. (@samp{~} is often used as a -mathematical symbol for `not'; thus @kbd{M-~} is `not', metafied.) +mathematical symbol for ``not''; thus @kbd{M-~} is ``not'', metafied.) Alternatively, you can cancel all the changes made since the file was visited or saved, by reading the text from the file again. This is called @dfn{reverting}. @xref{Reverting}. (You could also undo all diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index a764c25..9101f1c 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -60,7 +60,7 @@ be preserved if the buffer is lost due to a system error or user error. @item Autoloading Emacs can automatically load Lisp libraries when a Lisp program requests a -function from those libraries. This is called `autoloading'. +function from those libraries. This is called ``autoloading''. @xref{Lisp Libraries}. @item Backtrace @@ -100,7 +100,7 @@ A base buffer is a buffer whose text is shared by an indirect buffer Some human languages, such as English, are written from left to right. Others, such as Arabic, are written from right to left. Emacs supports both of these forms, as well as any mixture of them---this -is `bidirectional text'. @xref{Bidirectional Editing}. +is ``bidirectional text''. @xref{Bidirectional Editing}. @item Bind To bind a key sequence means to give it a binding (q.v.). @@ -135,7 +135,7 @@ X}). Borders are not the same as fringes (q.v.). @item Buffer The buffer is the basic editing unit; one buffer corresponds to one text being edited. You normally have several buffers, but at any time you are -editing only one, the `current buffer', though several can be visible +editing only one, the ``current buffer'', though several can be visible when you are using multiple windows or frames (q.v.). Most buffers are visiting (q.v.@:) some file. @xref{Buffers}. @@ -265,7 +265,7 @@ normally (but see @ref{Glossary---Truncation}) takes up more than one screen line when displayed. We say that the text line is continued, and all screen lines used for it after the first are called continuation lines. @xref{Continuation Lines}. A related Emacs feature is -`filling' (q.v.). +``filling'' (q.v.). @item Control Character A control character is a character that you type by holding down the @@ -310,8 +310,8 @@ between defuns, the current defun is the one that follows point. The cursor is the rectangle on the screen which indicates the position (called point; q.v.@:) at which insertion and deletion takes place. The cursor is on or under the character that follows point. Often -people speak of `the cursor' when, strictly speaking, they mean -`point'. @xref{Point,Cursor}. +people speak of ``the cursor'' when, strictly speaking, they mean +``point''. @xref{Point,Cursor}. @item Customization Customization is making minor changes in the way Emacs works, to @@ -351,7 +351,7 @@ it is interpreted relative to the current buffer's default directory. @item Defun A defun is a major definition at the top level in a program. The name -`defun' comes from Lisp, where most such definitions use the construct +``defun'' comes from Lisp, where most such definitions use the construct @code{defun}. @xref{Defuns}. @item @key{DEL} @@ -405,7 +405,7 @@ confirmation. The usual reason for disabling a command is that it is confusing for beginning users. @xref{Disabling}. @item Down Event -Short for `button down event' (q.v.). +Short for ``button down event'' (q.v.). @item Drag Event A drag event is the kind of input event (q.v.@:) generated when you @@ -598,7 +598,7 @@ correspond to any character. @xref{Function Keys}. @item Global Global means ``independent of the current environment; in effect throughout Emacs''. It is the opposite of local (q.v.). Particular -examples of the use of `global' appear below. +examples of the use of ``global'' appear below. @item Global Abbrev A global definition of an abbrev (q.v.@:) is effective in all major @@ -824,8 +824,8 @@ lists. @xref{Moving by Parens}. @item Local Local means ``in effect only in a particular context''; the relevant kind of context is a particular function execution, a particular -buffer, or a particular major mode. It is the opposite of `global' -(q.v.). Specific uses of `local' in Emacs terminology appear below. +buffer, or a particular major mode. It is the opposite of ``global'' +(q.v.). Specific uses of ``local'' in Emacs terminology appear below. @item Local Abbrev A local abbrev definition is effective only if a particular major mode @@ -848,7 +848,7 @@ one of the modifier keys that can accompany any character. @item @kbd{M-C-} @kbd{M-C-} in the name of a character is an abbreviation for -Control-Meta; it means the same thing as `@kbd{C-M-}' (q.v.). +Control-Meta; it means the same thing as @kbd{C-M-} (q.v.). @item @kbd{M-x} @kbd{M-x} is the key sequence that is used to call an Emacs command by @@ -1121,7 +1121,7 @@ Many commands operate on the text of the region. @xref{Mark,Region}. @item Register Registers are named slots in which text, buffer positions, or rectangles can be saved for later use. @xref{Registers}. A related -Emacs feature is `bookmarks' (q.v.). +Emacs feature is ``bookmarks'' (q.v.). @anchor{Glossary---Regular Expression} @item Regular Expression @@ -1233,15 +1233,15 @@ Emacs has commands for moving by or killing by sentences. @anchor{Glossary---Server} @item Server -Within Emacs, you can start a `server' process, which listens for -connections from `clients'. This offers a faster alternative to +Within Emacs, you can start a ``server'' process, which listens for +connections from ``clients''. This offers a faster alternative to starting several Emacs instances. @xref{Emacs Server}, and @ref{Glossary---Daemon}. @c This is only covered in the lispref, not the user manual. @ignore @item Session Manager -Some window systems (q.v.@:) provide a tool called a `session manager'. +Some window systems (q.v.@:) provide a tool called a ``session manager''. This offers the ability to save your windows when you log off, and restore them after you log in again. @end ignore @@ -1250,7 +1250,7 @@ and restore them after you log in again. A sexp (short for ``s-expression'') is the basic syntactic unit of Lisp in its textual form: either a list, or Lisp atom. Sexps are also the balanced expressions (q.v.@:) of the Lisp language; this is why -the commands for editing balanced expressions have `sexp' in their +the commands for editing balanced expressions have @samp{sexp} in their name. @xref{Expressions,Sexps}. @item Simultaneous Editing @@ -1327,7 +1327,7 @@ Emacs does not make a termscript file unless you tell it to. @xref{Bugs}. @item Text -`Text' has two meanings (@pxref{Text}): +``Text'' has two meanings (@pxref{Text}): @itemize @bullet @item @@ -1420,7 +1420,7 @@ that you can customize Emacs by setting it to a new value. @item Variable A variable is an object in Lisp that can store an arbitrary value. Emacs uses some variables for internal purposes, and has others (known -as `user options'; q.v.@:) just so that you can set their values to +as ``user options''; q.v.@:) just so that you can set their values to control the behavior of Emacs. The variables used in Emacs that you are likely to be interested in are listed in the Variables Index in this manual (@pxref{Variable Index}). @xref{Variables}, for @@ -1448,7 +1448,7 @@ Emacs divides a frame (q.v.@:) into one or more windows, each of which can display the contents of one buffer (q.v.@:) at any time. @xref{Screen}, for basic information on how Emacs uses the screen. @xref{Windows}, for commands to control the use of windows. Some -other editors use the term ``window'' for what we call a `frame' +other editors use the term ``window'' for what we call a ``frame'' (q.v.@:) in Emacs. @item Window System diff --git a/doc/emacs/gnu.texi b/doc/emacs/gnu.texi index 327ee3c..3c23b9c 100644 --- a/doc/emacs/gnu.texi +++ b/doc/emacs/gnu.texi @@ -83,7 +83,7 @@ memory, because they are the easiest machines to make it run on. The extra effort to make it run on smaller machines will be left to someone who wants to use it on them. -To avoid horrible confusion, please pronounce the `G' in the word `GNU' +To avoid horrible confusion, please pronounce the ``G'' in the word ``GNU'' when it is the name of this project. @unnumberedsec Why I Must Write GNU diff --git a/doc/emacs/indent.texi b/doc/emacs/indent.texi index 10cd131..b45839e 100644 --- a/doc/emacs/indent.texi +++ b/doc/emacs/indent.texi @@ -198,7 +198,7 @@ are always displayed as empty spaces extending to the next @dfn{display tab stop}. @xref{Text Display}. @node Just Spaces -@section Tabs vs. Spaces +@section Tabs vs.@: Spaces @vindex tab-width Normally, indentation commands insert (or remove) an optimal mix of diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index a93cbfb..97d423e 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -190,7 +190,7 @@ font are stored in the variables @code{ns-input-font} and @item ns-power-off This event occurs when the user logs out and Emacs is still running, or when -`Quit Emacs' is chosen from the application menu. +``Quit Emacs'' is chosen from the application menu. The default behavior is to save all file-visiting buffers. @end table diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 9074cdf..a129886 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -188,7 +188,7 @@ basic editing operations under Bazaar. @cindex src @item SRC (src) is RCS, reloaded - a specialized version-control system -designed for single-file projects worked on by only one person. It +designed for single-file projects worked on by only one person. It allows multiple files with independent version-control histories to exist in one directory, and is thus particularly well suited for maintaining small documents, scripts, and dotfiles. While it uses RCS @@ -1570,7 +1570,7 @@ dated in May 1993, with two items and one item respectively. @smallexample 1993-05-25 Richard Stallman - * man.el: Rename symbols `man-*' to `Man-*'. + * man.el: Rename symbols 'man-*' to 'Man-*'. (manual-entry): Make prompt string clearer. * simple.el (blink-matching-paren-distance): diff --git a/doc/emacs/makefile.w32-in b/doc/emacs/makefile.w32-in index 91f9d37..99da4ab 100644 --- a/doc/emacs/makefile.w32-in +++ b/doc/emacs/makefile.w32-in @@ -21,7 +21,7 @@ # Where to find the source code. The source code for Emacs's C kernel is # expected to be in $(srcdir)/src, and the source code for Emacs's # utility programs is expected to be in $(srcdir)/lib-src. This is -# set by the configure script's `--srcdir' option. +# set by the configure script's '--srcdir' option. srcdir=. infodir = $(srcdir)/../../info @@ -36,7 +36,7 @@ INFO_TARGETS = $(infodir)/emacs$(INFO_EXT) DVI_TARGETS = emacs.dvi INFOSOURCES = info.texi -# The following rule does not work with all versions of `make'. +# The following rule does not work with all versions of 'make'. .SUFFIXES: .texi .dvi .texi.dvi: texi2dvi $< diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 1fffa23..2eb999d 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -843,9 +843,9 @@ show-paren-mode}. Electric Pair mode, a global minor mode, provides a way to easily insert matching delimiters. Whenever you insert an opening delimiter, the matching closing delimiter is automatically inserted as well, -leaving point between the two. Conversely, when you insert a closing +leaving point between the two. Conversely, when you insert a closing delimiter over an existing one, no inserting takes places and that -position is simply skipped over. These variables control additional +position is simply skipped over. These variables control additional features of Electric Pair mode: @itemize @bullet diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index 0c39ea7..82ac99f 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -1004,10 +1004,10 @@ Here is a list of these commands: @table @kbd @item n -Move to next line, skipping lines saying `deleted', and select its +Move to next line, skipping lines saying ``deleted'', and select its message (@code{rmail-summary-next-msg}). @item p -Move to previous line, skipping lines saying `deleted', and select +Move to previous line, skipping lines saying ``deleted'', and select its message (@code{rmail-summary-previous-msg}). @item M-n Move to next line and select its message (@code{rmail-summary-next-all}). diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index e91e2c4..b69146a 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -24,7 +24,7 @@ thing, but search for patterns instead of fixed strings. * Symbol Search:: Search for a source code symbol. * Regexp Search:: Search for match for a regexp. * Regexps:: Syntax of regular expressions. -* Regexp Backslash:: Regular expression constructs starting with `\'. +* Regexp Backslash:: Regular expression constructs starting with '\'. * Regexp Example:: A complex regular expression explained. * Search Case:: To ignore case while searching, or not. * Replace:: Search, and replace some or all matches. diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi index 22ec215..2c3de28 100644 --- a/doc/emacs/trouble.texi +++ b/doc/emacs/trouble.texi @@ -146,7 +146,7 @@ Emacs. @menu * DEL Does Not Delete:: What to do if @key{DEL} doesn't delete. -* Stuck Recursive:: `[...]' in mode line around the parentheses. +* Stuck Recursive:: '[...]' in mode line around the parentheses. * Screen Garbled:: Garbage on the screen. * Text Garbled:: Garbage in the text. * Memory Full:: How to cope when you run out of memory. @@ -1171,7 +1171,7 @@ feel that the purpose needs explaining, it probably does---but put the explanation in comments in the code. It will be more useful there. Please look at the change log entries of recent commits to see what -sorts of information to put in, and to learn the style that we use. Note that, +sorts of information to put in, and to learn the style that we use. Note that, unlike some other projects, we do require change logs for documentation, i.e., Texinfo files. @xref{Change Log}, @@ -1280,7 +1280,7 @@ See the Emacs project page It is important to write your patch based on the current working version. If you start from an older version, your patch may be outdated (so that maintainers will have a hard time applying it), or -changes in Emacs may have made your patch unnecessary. After you have +changes in Emacs may have made your patch unnecessary. After you have downloaded the repository source, you should read the file @file{INSTALL.REPO} for build instructions (they differ to some extent from a normal build). diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index a2bf249..8dccbf9 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi @@ -59,7 +59,7 @@ As above, but only find entries for the current buffer's file. For example, suppose the first line of @file{ChangeLog} is dated 1999-04-10, and that the only check-in since then was by Nathaniel Bowditch to @file{rcs2log} on 1999-05-22 with log entry @samp{Ignore -log messages that start with `#'.}. Then @kbd{C-x v a} inserts this +log messages that start with '#'.}. Then @kbd{C-x v a} inserts this @file{ChangeLog} entry: @iftex @@ -69,7 +69,7 @@ log messages that start with `#'.}. Then @kbd{C-x v a} inserts this @group 1999-05-22 Nathaniel Bowditch - * rcs2log: Ignore log messages that start with `#'. + * rcs2log: Ignore log messages that start with '#'. @end group @end smallexample @iftex commit 31f31a753f7c6ab6dcc49d62c57a41e0092cbb51 Author: Paul Eggert Date: Wed Apr 8 17:40:14 2015 -0700 Minor quoting etc. fixes to elisp intro * doc/lispintro/emacs-lisp-intro.texi: Consistently use American-style double quoting in ordinary text. In ASCII text, consistently quote 'like this' instead of `like this', unless Emacs requires the latter. diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index ed125bb..77d8ca8 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -30,7 +30,7 @@ @c @set largebook @c (Note: if you edit the book so as to change the length of the -@c table of contents, you may have to change the value of `pageno' below.) +@c table of contents, you may have to change the value of 'pageno' below.) @c <<<< For hard copy printing, this file is now @c set for smallbook, which works for all sizes @@ -157,7 +157,7 @@ supports it in developing GNU and promoting software freedom.'' @end quotation @end copying -@c half title; two lines here, so do not use `shorttitlepage' +@c half title; two lines here, so do not use 'shorttitlepage' @tex {\begingroup% \hbox{}\vskip 1.5in \chaprm \centerline{An Introduction to}% @@ -808,7 +808,7 @@ In addition, I have written several programs as extended examples. Although these are examples, the programs are real. I use them. Other people use them. You may use them. Beyond the fragments of programs used for illustrations, there is very little in here that is -`just for teaching purposes'; what you see is used. This is a great +``just for teaching purposes''; what you see is used. This is a great advantage of Emacs Lisp: it is easy to learn to use it for work. @end ignore @@ -854,8 +854,8 @@ information so you won't be surprised later when the additional information is formally introduced.) When you read this text, you are not expected to learn everything the -first time. Frequently, you need only make, as it were, a `nodding -acquaintance' with some of the items mentioned. My hope is that I have +first time. Frequently, you need only make, as it were, a ``nodding +acquaintance'' with some of the items mentioned. My hope is that I have structured the text and given you enough hints that you will be alert to what is important, and concentrate on it. @@ -928,7 +928,7 @@ along with the key that is labeled @key{ALT} and, at the same time, press the @key{\} key. In addition to typing a lone keychord, you can prefix what you type -with @kbd{C-u}, which is called the `universal argument'. The +with @kbd{C-u}, which is called the ``universal argument''. The @kbd{C-u} keychord passes an argument to the subsequent command. Thus, to indent a region of plain text by 6 spaces, mark the region, and then type @w{@kbd{C-u 6 M-C-\}}. (If you do not specify a number, @@ -1000,7 +1000,7 @@ bob@@gnu.org To the untutored eye, Lisp is a strange programming language. In Lisp code there are parentheses everywhere. Some people even claim that -the name stands for `Lots of Isolated Silly Parentheses'. But the +the name stands for ``Lots of Isolated Silly Parentheses''. But the claim is unwarranted. Lisp stands for LISt Processing, and the programming language handles @emph{lists} (and lists of lists) by putting them between parentheses. The parentheses mark the boundaries @@ -1090,7 +1090,7 @@ list is made up of the words @samp{a}, @samp{list}, @samp{inside}, In Lisp, what we have been calling words are called @dfn{atoms}. This term comes from the historical meaning of the word atom, which means -`indivisible'. As far as Lisp is concerned, the words we have been +``indivisible''. As far as Lisp is concerned, the words we have been using in the lists cannot be divided into any smaller parts and still mean the same thing as part of a program; likewise with numbers and single character symbols like @samp{+}. On the other hand, unlike an @@ -1159,7 +1159,7 @@ paragraphs---is also an atom. Here is an example: @noindent In Lisp, all of the quoted text including the punctuation mark and the blank spaces is a single atom. This kind of atom is called a -@dfn{string} (for `string of characters') and is the sort of thing that +@dfn{string} (for ``string of characters'') and is the sort of thing that is used for messages that a computer can print for a human to read. Strings are a different kind of atom than numbers or symbols and are used differently. @@ -1303,7 +1303,7 @@ signposts to a traveler in a strange country; deciphering them can be hard, but once understood, they can point the way. The error message is generated by a built-in GNU Emacs debugger. We -will `enter the debugger'. You get out of the debugger by typing @code{q}. +will ``enter the debugger''. You get out of the debugger by typing @code{q}. What we will do is evaluate a list that is not quoted and does not have a meaningful command as its first element. Here is a list almost @@ -1365,9 +1365,9 @@ Based on what we already know, we can almost read this error message. You read the @file{*Backtrace*} buffer from the bottom up; it tells you what Emacs did. When you typed @kbd{C-x C-e}, you made an interactive call to the command @code{eval-last-sexp}. @code{eval} is -an abbreviation for `evaluate' and @code{sexp} is an abbreviation for -`symbolic expression'. The command means `evaluate last symbolic -expression', which is the expression just before your cursor. +an abbreviation for ``evaluate'' and @code{sexp} is an abbreviation for +``symbolic expression''. The command means ``evaluate last symbolic +expression'', which is the expression just before your cursor. Each line above tells you what the Lisp interpreter evaluated next. The most recent action is at the top. The buffer is called the @@ -1401,7 +1401,7 @@ definition of any set of instructions for the computer to carry out. The slightly odd word, @samp{void-function}, is designed to cover the way Emacs Lisp is implemented, which is that when a symbol does not have a function definition attached to it, the place that should -contain the instructions is `void'. +contain the instructions is ``void''. On the other hand, since we were able to add 2 plus 2 successfully, by evaluating @code{(+ 2 2)}, we can infer that the symbol @code{+} must @@ -1570,9 +1570,9 @@ compilation. When the Lisp interpreter works on an expression, the term for the activity is called @dfn{evaluation}. We say that the interpreter -`evaluates the expression'. I've used this term several times before. -The word comes from its use in everyday language, `to ascertain the -value or amount of; to appraise', according to @cite{Webster's New +``evaluates the expression''. I've used this term several times before. +The word comes from its use in everyday language, ``to ascertain the +value or amount of; to appraise'', according to @cite{Webster's New Collegiate Dictionary}. @menu @@ -1592,7 +1592,7 @@ instructions it found in the function definition, or perhaps it will give up on that function and produce an error message. (The interpreter may also find itself tossed, so to speak, to a different function or it may attempt to repeat continually what it is doing for ever and ever in -what is called an `infinite loop'. These actions are less common; and +what is called an ``infinite loop''. These actions are less common; and we can ignore them.) Most frequently, the interpreter returns a value. @cindex @samp{side effect} defined @@ -1637,9 +1637,9 @@ evaluate, the interpreter prints that value in the echo area. Now it is easy to understand the name of the command invoked by the keystrokes @kbd{C-x C-e}: the name is @code{eval-last-sexp}. The -letters @code{sexp} are an abbreviation for `symbolic expression', and -@code{eval} is an abbreviation for `evaluate'. The command means -`evaluate last symbolic expression'. +letters @code{sexp} are an abbreviation for ``symbolic expression'', and +@code{eval} is an abbreviation for ``evaluate''. The command means +``evaluate last symbolic expression''. As an experiment, you can try evaluating the expression by putting the cursor at the beginning of the next line immediately following the @@ -1838,7 +1838,7 @@ typing @kbd{q} in the @file{*Backtrace*} buffer.) This backtrace is different from the very first error message we saw, which said, @samp{Debugger entered--Lisp error: (void-function this)}. In this case, the function does not have a value as a variable; while -in the other error message, the function (the word `this') did not +in the other error message, the function (the word @samp{this}) did not have a definition. In this experiment with the @code{+}, what we did was cause the Lisp @@ -1887,22 +1887,22 @@ The numbers added by @code{+} are called the @dfn{arguments} of the function @code{+}. These numbers are the information that is given to or @dfn{passed} to the function. -The word `argument' comes from the way it is used in mathematics and +The word ``argument'' comes from the way it is used in mathematics and does not refer to a disputation between two people; instead it refers to the information presented to the function, in this case, to the @code{+}. In Lisp, the arguments to a function are the atoms or lists that follow the function. The values returned by the evaluation of these atoms or lists are passed to the function. Different functions require different numbers of arguments; some functions require none at -all.@footnote{It is curious to track the path by which the word `argument' +all.@footnote{It is curious to track the path by which the word ``argument'' came to have two different meanings, one in mathematics and the other in everyday English. According to the @cite{Oxford English Dictionary}, the word derives from the Latin for @samp{to make clear, prove}; thus it -came to mean, by one thread of derivation, `the evidence offered as -proof', which is to say, `the information offered', which led to its +came to mean, by one thread of derivation, ``the evidence offered as +proof'', which is to say, ``the information offered'', which led to its meaning in Lisp. But in the other thread of derivation, it came to mean -`to assert in a manner against which others may make counter -assertions', which led to the meaning of the word as a disputation. +``to assert in a manner against which others may make counter +assertions'', which led to the meaning of the word as a disputation. (Note here that the English word has two different definitions attached to it at the same time. By contrast, in Emacs Lisp, a symbol cannot have two different function definitions at the same time.)} @@ -1967,7 +1967,7 @@ Note that the string passed to @code{substring} is a single atom even though it is made up of several words separated by spaces. Lisp counts everything between the two quotation marks as part of the string, including the spaces. You can think of the @code{substring} function as -a kind of `atom smasher' since it takes an otherwise indivisible atom +a kind of ``atom smasher'' since it takes an otherwise indivisible atom and extracts a part. However, @code{substring} is only able to extract a substring from an argument that is a string, not from another type of atom such as a number or symbol. @@ -2022,7 +2022,7 @@ Some functions, such as @code{concat}, @code{+} or @code{*}, take any number of arguments. (The @code{*} is the symbol for multiplication.) This can be seen by evaluating each of the following expressions in the usual way. What you will see in the echo area is printed in this -text after @samp{@result{}}, which you may read as `evaluates to'. +text after @samp{@result{}}, which you may read as ``evaluates to''. @need 1250 In the first set, the functions have no arguments: @@ -2123,7 +2123,7 @@ numeric value of marker positions as numbers. The @samp{p} of @code{number-or-marker-p} is the embodiment of a practice started in the early days of Lisp programming. The @samp{p} -stands for `predicate'. In the jargon used by the early Lisp +stands for ``predicate''. In the jargon used by the early Lisp researchers, a predicate refers to a function to determine whether some property is true or false. So the @samp{p} tells us that @code{number-or-marker-p} is the name of a function that determines @@ -2390,11 +2390,11 @@ to the symbol @code{herbivores}: not have fit on a page; and humans find it easier to read nicely formatted lists.) -Although I have been using the term `assign', there is another way of +Although I have been using the term ``assign'', there is another way of thinking about the workings of @code{set} and @code{setq}; and that is to say that @code{set} and @code{setq} make the symbol @emph{point} to the list. This latter way of thinking is very common and in forthcoming -chapters we shall come upon at least one symbol that has `pointer' as +chapters we shall come upon at least one symbol that has ``pointer'' as part of its name. The name is chosen because the symbol has a value, specifically a list, attached to it; or, expressed another way, the symbol is set to ``point'' to the list. @@ -2639,9 +2639,9 @@ The former is the name of the buffer and the latter is the name of the file. In Info, the buffer name is @file{"*info*"}. Info does not point to any file, so the result of evaluating @code{(buffer-file-name)} is @file{nil}. The symbol @code{nil} is -from the Latin word for `nothing'; in this case, it means that the +from the Latin word for ``nothing''; in this case, it means that the buffer is not associated with any file. (In Lisp, @code{nil} is also -used to mean `false' and is a synonym for the empty list, @code{()}.) +used to mean ``false'' and is a synonym for the empty list, @code{()}.) When I am writing, the name of my buffer is @file{"introduction.texinfo"}. The name of the file to which it @@ -2661,7 +2661,7 @@ computer programs, however, it is important to keep the distinction in mind, since the computer is not as smart as a person. @cindex Buffer, history of word -The word `buffer', by the way, comes from the meaning of the word as a +The word ``buffer'', by the way, comes from the meaning of the word as a cushion that deadens the force of a collision. In early computers, a buffer cushioned the interaction between files and the computer's central processing unit. The drums or tapes that held a file and the @@ -2864,7 +2864,7 @@ there until the command finishes running). Also, we have just introduced another jargon term, the word @dfn{call}. When you evaluate a list in which the first symbol is a function, you are calling that function. The use of the term comes from the notion of -the function as an entity that can do something for you if you `call' +the function as an entity that can do something for you if you ``call'' it---just as a plumber is an entity who can fix a leak if you call him or her. @@ -3082,9 +3082,9 @@ function. Instead of choosing the word @code{number} for the name of the argument, I could have picked any other name. For example, I could have chosen -the word @code{multiplicand}. I picked the word `number' because it +the word @code{multiplicand}. I picked the word ``number'' because it tells what kind of value is intended for this slot; but I could just as -well have chosen the word `multiplicand' to indicate the role that the +well have chosen the word ``multiplicand'' to indicate the role that the value placed in this slot will play in the workings of the function. I could have called it @code{foogle}, but that would have been a bad choice because it would not tell humans what it means. The choice of @@ -3096,16 +3096,16 @@ list, even the name of a symbol used in some other function: the name you use in an argument list is private to that particular definition. In that definition, the name refers to a different entity than any use of the same name outside the function definition. Suppose you have a -nick-name `Shorty' in your family; when your family members refer to -`Shorty', they mean you. But outside your family, in a movie, for -example, the name `Shorty' refers to someone else. Because a name in an +nick-name ``Shorty'' in your family; when your family members refer to +``Shorty'', they mean you. But outside your family, in a movie, for +example, the name ``Shorty'' refers to someone else. Because a name in an argument list is private to the function definition, you can change the value of such a symbol inside the body of a function without changing its value outside the function. The effect is similar to that produced by a @code{let} expression. (@xref{let, , @code{let}}.) @ignore -Note also that we discuss the word `number' in two different ways: as a +Note also that we discuss the word ``number'' in two different ways: as a symbol that appears in the code, and as the name of something that will be replaced by a something else during the evaluation of the function. In the first case, @code{number} is a symbol, not a number; it happens @@ -3161,7 +3161,7 @@ definition begins. If you evaluate this example, you are likely to get an error message. (Go ahead, try it!) This is because we have written the function definition, but not yet told the computer about the definition---we have -not yet installed (or `loaded') the function definition in Emacs. +not yet installed (or ``loaded'') the function definition in Emacs. Installing a function is the process that tells the Lisp interpreter the definition of the function. Installation is described in the next section. @@ -3453,7 +3453,7 @@ is The first part of the argument to @code{interactive} is @samp{p}, with which you are already familiar. This argument tells Emacs to -interpret a `prefix', as a number to be passed to the function. You +interpret a ``prefix'', as a number to be passed to the function. You can specify a prefix either by typing @kbd{C-u} followed by a number or by typing @key{META} followed by a number. The prefix is the number of specified characters. Thus, if your prefix is three and the @@ -3567,8 +3567,8 @@ variable of the same name that is not part of the function. To understand why the @code{let} special form is necessary, consider the situation in which you own a home that you generally refer to as -`the house', as in the sentence, ``The house needs painting.'' If you -are visiting a friend and your host refers to `the house', he is +``the house'', as in the sentence, ``The house needs painting.'' If you +are visiting a friend and your host refers to ``the house'', he is likely to be referring to @emph{his} house, not yours, that is, to a different house. @@ -3596,7 +3596,7 @@ and the two are not intended to refer to the same value. The The @code{let} special form prevents confusion. @code{let} creates a name for a @dfn{local variable} that overshadows any use of the same name outside the @code{let} expression. This is like understanding -that whenever your host refers to `the house', he means his house, not +that whenever your host refers to ``the house'', he means his house, not yours. (Symbols used in argument lists work the same way. @xref{defun, , The @code{defun} Macro}.) @@ -3616,14 +3616,14 @@ in Emacs Lisp, scoping is dynamic, not lexical.'' @code{let} can create more than one variable at once. Also, @code{let} gives each variable it creates an initial value, either a value specified by you, or @code{nil}. (In the jargon, this is called -`binding the variable to the value'.) After @code{let} has created +``binding the variable to the value''.) After @code{let} has created and bound the variables, it executes the code in the body of the @code{let}, and returns the value of the last expression in the body, -as the value of the whole @code{let} expression. (`Execute' is a jargon +as the value of the whole @code{let} expression. (``Execute'' is a jargon term that means to evaluate a list; it comes from the use of the word -meaning `to give practical effect to' (@cite{Oxford English +meaning ``to give practical effect to'' (@cite{Oxford English Dictionary}). Since you evaluate an expression to perform an action, -`execute' has evolved as a synonym to `evaluate'.) +``execute'' has evolved as a synonym to ``evaluate''.) @node Parts of let Expression @subsection The Parts of a @code{let} Expression @@ -3800,7 +3800,7 @@ such as, ``if it is warm and sunny, then go to the beach!'' @cindex @samp{if-part} defined @cindex @samp{then-part} defined -An @code{if} expression written in Lisp does not use the word `then'; +An @code{if} expression written in Lisp does not use the word ``then''; the test and the action are the second and third elements of the list whose first element is @code{if}. Nonetheless, the test part of an @code{if} expression is often called the @dfn{if-part} and the second @@ -4066,10 +4066,10 @@ and write your program accordingly.) @findex nil There is an important aspect to the truth test in an @code{if} -expression. So far, we have spoken of `true' and `false' as values of +expression. So far, we have spoken of ``true'' and ``false'' as values of predicates as if they were new kinds of Emacs Lisp objects. In fact, -`false' is just our old friend @code{nil}. Anything else---anything -at all---is `true'. +``false'' is just our old friend @code{nil}. Anything else---anything +at all---is ``true''. The expression that tests for truth is interpreted as @dfn{true} if the result of evaluating it is a value that is not @code{nil}. In @@ -4351,7 +4351,7 @@ The name of an existing buffer. The name of an existing file. @item p -The numeric prefix argument. (Note that this `p' is lower case.) +The numeric prefix argument. (Note that this @code{p} is lower case.) @item r Point and the mark, as two numeric arguments, smallest first. This @@ -4443,7 +4443,7 @@ markers, are equal. @item equal @itemx eq Test whether two objects are the same. @code{equal} uses one meaning -of the word `same' and @code{eq} uses another: @code{equal} returns +of the word ``same'' and @code{eq} uses another: @code{equal} returns true if the two objects have a similar structure and contents, such as two copies of the same book. On the other hand, @code{eq}, returns true if both arguments are actually the same object. @@ -4472,7 +4472,7 @@ shorter, alternative name is @code{string=}. There are no string test functions that correspond to @var{>}, @code{>=}, or @code{<=}. @item message -Print a message in the echo area. The first argument is a string that +Print a message in the echo area. The first argument is a string that can contain @samp{%s}, @samp{%d}, or @samp{%c} to print the value of arguments that follow the string. The argument used by @samp{%s} must be a string or a symbol; the argument used by @samp{%d} must be a @@ -4588,7 +4588,7 @@ function definition. Put point into the name of the file that contains the function and press the @key{RET} key. In this case, @key{RET} means -@code{push-button} rather than `return' or `enter'. Emacs will take +@code{push-button} rather than ``return'' or ``enter''. Emacs will take you directly to the function definition. @ignore @@ -4596,7 +4596,7 @@ Not In version 22 If you move point over the file name and press the @key{RET} key, which in this case means @code{help-follow} rather -than `return' or `enter', Emacs will take you directly to the function +than ``return'' or ``enter'', Emacs will take you directly to the function definition. @end ignore @@ -4606,7 +4606,7 @@ file, you can use the @code{find-tag} function to jump to it. Lisp, and C, and it works with non-programming text as well. For example, @code{find-tag} will jump to the various nodes in the Texinfo source file of this document. -The @code{find-tag} function depends on `tags tables' that record +The @code{find-tag} function depends on ``tags tables'' that record the locations of the functions, variables, and other items to which @code{find-tag} jumps. @@ -4624,7 +4624,7 @@ screen. To switch back to your current buffer, type @kbd{C-x b @cindex TAGS table, specifying @findex find-tag Depending on how the initial default values of your copy of Emacs are -set, you may also need to specify the location of your `tags table', +set, you may also need to specify the location of your ``tags table'', which is a file called @file{TAGS}. For example, if you are interested in Emacs sources, the tags table you will most likely want, if it has already been created for you, will be in a subdirectory of @@ -4650,7 +4650,7 @@ After you become more familiar with Emacs Lisp, you will find that you will frequently use @code{find-tag} to navigate your way around source code; and you will create your own @file{TAGS} tables. -@cindex Library, as term for `file' +@cindex Library, as term for ``file'' Incidentally, the files that contain Lisp code are conventionally called @dfn{libraries}. The metaphor is derived from that of a specialized library, such as a law library or an engineering library, @@ -4916,7 +4916,7 @@ The expression works nearly the same as before. It sets a mark at the highest numbered place in the buffer that it can. However, in this version, @code{push-mark} has two additional arguments. The second argument to @code{push-mark} is @code{nil}. This tells the function -it @emph{should} display a message that says `Mark set' when it pushes +it @emph{should} display a message that says ``Mark set'' when it pushes the mark. The third argument is @code{t}. This tells @code{push-mark} to activate the mark when Transient Mark mode is turned on. Transient Mark mode highlights the currently active @@ -5522,7 +5522,7 @@ the buffer you are in (and you have not seen the computer shift its attention, so you don't know that that buffer is now called @code{oldbuf}). -Incidentally, this is what is meant by `replacement'. To replace text, +Incidentally, this is what is meant by ``replacement''. To replace text, Emacs erases the previous text and then inserts new text. @need 1250 @@ -6135,7 +6135,7 @@ size of the buffer. The reason for this is that the old version 18 Emacs used numbers that are no bigger than eight million or so and in the computation that followed, the programmer feared that Emacs might try to use over-large numbers if the buffer were large. The term -`overflow', mentioned in the comment, means numbers that are over +``overflow'', mentioned in the comment, means numbers that are over large. More recent versions of Emacs use larger numbers, but this code has not been touched, if only because people now look at buffers that are far, far larger than ever before. @@ -6155,7 +6155,7 @@ was that function called several times, it gave the size of the whole buffer, not the accessible part. The computation makes much more sense when it handles just the accessible part. (@xref{Narrowing & Widening, , Narrowing and Widening}, for more information on focusing -attention to an `accessible' part.) +attention to an ``accessible'' part.) @need 800 The line looks like this: @@ -6403,7 +6403,7 @@ tenths of the way through the buffer, which is a nicety that is, perhaps, not necessary, but which, if it did not occur, would be sure to draw complaints. (The @code{(not (consp arg))} portion is so that if you specify the command with a @kbd{C-u}, but without a number, -that is to say, if the `raw prefix argument' is simply a cons cell, +that is to say, if the ``raw prefix argument'' is simply a cons cell, the command does not put you at the beginning of the second line.) @node Second Buffer Related Review @@ -6432,7 +6432,7 @@ is optional; this means that the function can be evaluated without the argument, if desired. @item prefix-numeric-value -Convert the `raw prefix argument' produced by @code{(interactive +Convert the ``raw prefix argument'' produced by @code{(interactive "P")} to a numeric value. @item forward-line @@ -6814,11 +6814,11 @@ namely, @code{setcdr} and @code{nthcdr}. (@xref{copy-region-as-kill}.) @end ifnottex The name of the @code{cons} function is not unreasonable: it is an -abbreviation of the word `construct'. The origins of the names for +abbreviation of the word ``construct''. The origins of the names for @code{car} and @code{cdr}, on the other hand, are esoteric: @code{car} -is an acronym from the phrase `Contents of the Address part of the -Register'; and @code{cdr} (pronounced `could-er') is an acronym from -the phrase `Contents of the Decrement part of the Register'. These +is an acronym from the phrase ``Contents of the Address part of the +Register''; and @code{cdr} (pronounced ``could-er'') is an acronym from +the phrase ``Contents of the Decrement part of the Register''. These phrases refer to specific pieces of hardware on the very early computer on which the original Lisp was developed. Besides being obsolete, the phrases have been completely irrelevant for more than 25 @@ -6853,7 +6853,7 @@ Clearly, a more reasonable name for the @code{car} function would be @code{car} does not remove the first item from the list; it only reports what it is. After @code{car} has been applied to a list, the list is still the same as it was. In the jargon, @code{car} is -`non-destructive'. This feature turns out to be important. +``non-destructive''. This feature turns out to be important. The @sc{cdr} of a list is the rest of the list, that is, the @code{cdr} function returns the part of the list that follows the @@ -6975,8 +6975,8 @@ appear in the echo area. @code{cons} causes the creation of a new list in which the element is followed by the elements of the original list. -We often say that `@code{cons} puts a new element at the beginning of -a list; it attaches or pushes elements onto the list', but this +We often say that ``@code{cons} puts a new element at the beginning of +a list; it attaches or pushes elements onto the list'', but this phrasing can be misleading, since @code{cons} does not change an existing list, but creates a new one. @@ -7001,7 +7001,7 @@ need to provide at least an empty list at the beginning. Here is a series of @code{cons} expressions that build up a list of flowers. If you are reading this in Info in GNU Emacs, you can evaluate each of the expressions in the usual way; the value is printed in this text -after @samp{@result{}}, which you may read as `evaluates to'. +after @samp{@result{}}, which you may read as ``evaluates to''. @smallexample @group @@ -7114,7 +7114,7 @@ In an earlier version: This is written with a special notation, @samp{#= emacs-major-version 21) (blink-cursor-mode 0) - ;; Insert newline when you press `C-n' (next-line) + ;; Insert newline when you press 'C-n' (next-line) ;; at the end of the buffer (setq next-line-add-newlines t) @end group @@ -17804,9 +17804,9 @@ Set the shape and color of the mouse cursor: @smallexample @group ; Cursor shapes are defined in -; `/usr/include/X11/cursorfont.h'; -; for example, the `target' cursor is number 128; -; the `top_left_arrow' cursor is number 132. +; '/usr/include/X11/cursorfont.h'; +; for example, the 'target' cursor is number 128; +; the 'top_left_arrow' cursor is number 132. @end group @group @@ -17857,10 +17857,10 @@ problem recently.) @smallexample @group -;; Translate `C-h' to . +;; Translate 'C-h' to . ; (keyboard-translate ?\C-h ?\C-?) -;; Translate to `C-h'. +;; Translate to 'C-h'. (keyboard-translate ?\C-? ?\C-h) @end group @end smallexample @@ -17878,7 +17878,7 @@ problem recently.) or start GNU Emacs with the command @code{emacs -nbc}. @need 1250 -@item When using `grep'@* +@item When using @command{grep}@* @samp{-i}@w{ } Ignore case distinctions@* @samp{-n}@w{ } Prefix each line of output with line number@* @samp{-H}@w{ } Print the filename for each match.@* @@ -17917,7 +17917,7 @@ This avoids problems with symbolic links. @end group @end smallexample -If you want to write with Chinese `GB' characters, set this instead: +If you want to write with Chinese ``GB'' characters, set this instead: @smallexample @group @@ -17960,7 +17960,7 @@ Lock} key is at the far left of the home row: @smallexample @group -# Bind the key labeled `Caps Lock' to `Control' +# Bind the key labeled 'Caps Lock' to 'Control' # (Such a broken user interface suggests that keyboard manufacturers # think that computers are typewriters from 1885.) @@ -18097,7 +18097,7 @@ beginning @code{(#("%12b" 0 4 @dots{}}. The @code{#(} begins the list. The @samp{"%12b"} displays the current buffer name, using the -@code{buffer-name} function with which we are familiar; the `12' +@code{buffer-name} function with which we are familiar; the @samp{12} specifies the maximum number of characters that will be displayed. When a name has fewer characters, whitespace is added to fill out to this number. (Buffer names can and often should be longer than 12 @@ -18107,7 +18107,7 @@ window.) @code{:eval} says to evaluate the following form and use the result as a string to display. In this case, the expression displays the first component of the full system name. The end of the first component is -a @samp{.} (`period'), so I use the @code{string-match} function to +a @samp{.} (``period''), so I use the @code{string-match} function to tell me the length of the first component. The substring from the zeroth character to that length is the name of the machine. @@ -18122,10 +18122,10 @@ This is the expression: @end smallexample @samp{%[} and @samp{%]} cause a pair of square brackets -to appear for each recursive editing level. @samp{%n} says `Narrow' +to appear for each recursive editing level. @samp{%n} says ``Narrow'' when narrowing is in effect. @samp{%P} tells you the percentage of -the buffer that is above the bottom of the window, or `Top', `Bottom', -or `All'. (A lower case @samp{p} tell you the percentage above the +the buffer that is above the bottom of the window, or ``Top'', ``Bottom'', +or ``All''. (A lower case @samp{p} tell you the percentage above the @emph{top} of the window.) @samp{%-} inserts enough dashes to fill out the line. @@ -18133,7 +18133,7 @@ Remember, ``You don't have to like Emacs to like it''---your own Emacs can have different colors, different commands, and different keys than a default Emacs. -On the other hand, if you want to bring up a plain `out of the box' +On the other hand, if you want to bring up a plain ``out of the box'' Emacs, with no customization, type: @smallexample @@ -18234,9 +18234,9 @@ Debugger entered--Lisp error: (void-function 1=) long lines. As usual, you can quit the debugger by typing @kbd{q} in the @file{*Backtrace*} buffer.) -In practice, for a bug as simple as this, the `Lisp error' line will +In practice, for a bug as simple as this, the ``Lisp error'' line will tell you what you need to know to correct the definition. The -function @code{1=} is `void'. +function @code{1=} is ``void''. @ignore @need 800 @@ -18532,7 +18532,7 @@ beginning of the @code{if} line of the function. Also, you will see an arrowhead at the left hand side of that line. The arrowhead marks the line where the function is executing. (In the following examples, we show the arrowhead with @samp{=>}; in a windowing system, you may -see the arrowhead as a solid triangle in the window `fringe'.) +see the arrowhead as a solid triangle in the window ``fringe''.) @smallexample =>@point{}(if (= number 1) @@ -18567,7 +18567,7 @@ Result: 3 (#o3, #x3, ?\C-c) @noindent This means the value of @code{number} is 3, which is octal three, -hexadecimal three, and @sc{ascii} `control-c' (the third letter of the +hexadecimal three, and @sc{ascii} ``control-c'' (the third letter of the alphabet, in case you need to know this information). You can continue moving through the code until you reach the line with @@ -18614,7 +18614,7 @@ Lisp Reference Manual}. Install the @code{@value{COUNT-WORDS}} function and then cause it to enter the built-in debugger when you call it. Run the command on a region containing two words. You will need to press @kbd{d} a -remarkable number of times. On your system, is a `hook' called after +remarkable number of times. On your system, is a ``hook'' called after the command finishes? (For information on hooks, see @ref{Command Overview, , Command Loop Overview, elisp, The GNU Emacs Lisp Reference Manual}.) @@ -18735,7 +18735,7 @@ customize the @code{interactive} expression without using the standard character codes; and it shows how to create a temporary buffer. (The @code{indent-to} function is written in C rather than Emacs Lisp; -it is a `built-in' function. @code{help-follow} takes you to its +it is a ``built-in'' function. @code{help-follow} takes you to its source as does @code{find-tag}, when properly set up.) You can look at a function's source using @code{find-tag}, which is @@ -18803,7 +18803,7 @@ The GNU Emacs Lisp Reference Manual}.) You might try searching just for duplicated word-constituent characters but that does not work since the pattern detects doubles -such as the two occurrences of `th' in `with the'. +such as the two occurrences of ``th'' in ``with the''. Another possible regexp searches for word-constituent characters followed by non-word-constituent characters, reduplicated. Here, @@ -18850,7 +18850,7 @@ Here is the @code{the-the} function, as I include it in my @end group @group -;; Bind `the-the' to C-c \ +;; Bind 'the-the' to C-c \ (global-set-key "\C-c\\" 'the-the) @end group @end smallexample @@ -19091,7 +19091,7 @@ The @code{if} expression has two parts, one if there exists @code{interprogram-paste} and one if not. @need 2000 -Let us consider the `if not' or else-part of the @code{current-kill} +Let us consider the ``if not'' or else-part of the @code{current-kill} function. (The then-part uses the @code{kill-new} function, which we have already described. @xref{kill-new function, , The @code{kill-new} function}.) @@ -19155,14 +19155,14 @@ list even if the @code{do-not-move} argument is true. @ifnottex @node Digression concerning error -@unnumberedsubsubsec Digression about the word `error' +@unnumberedsubsubsec Digression about the word ``error'' @end ifnottex In my opinion, it is slightly misleading, at least to humans, to use -the term `error' as the name of the @code{error} function. A better -term would be `cancel'. Strictly speaking, of course, you cannot +the term ``error'' as the name of the @code{error} function. A better +term would be ``cancel''. Strictly speaking, of course, you cannot point to, much less rotate a pointer to a list that has no length, so -from the point of view of the computer, the word `error' is correct. +from the point of view of the computer, the word ``error'' is correct. But a human expects to attempt this sort of thing, if only to find out whether the kill ring is full or empty. This is an act of exploration. @@ -19172,8 +19172,8 @@ not necessarily an error, and therefore should not be labeled as one, even in the bowels of a computer. As it is, the code in Emacs implies that a human who is acting virtuously, by exploring his or her environment, is making an error. This is bad. Even though the computer -takes the same steps as it does when there is an `error', a term such as -`cancel' would have a clearer connotation. +takes the same steps as it does when there is an ``error'', a term such as +``cancel'' would have a clearer connotation. @ifnottex @node Determining the Element @@ -19789,9 +19789,9 @@ For example, if you evaluate the following, the result is 15: (* (1+ (/ 12 5)) 5) @end smallexample -All through this discussion, we have been using `five' as the value +All through this discussion, we have been using ``five'' as the value for spacing labels on the Y axis; but we may want to use some other -value. For generality, we should replace `five' with a variable to +value. For generality, we should replace ``five'' with a variable to which we can assign a value. The best name I can think of for this variable is @code{Y-axis-label-spacing}. @@ -19915,7 +19915,7 @@ row, and the value of the width of the top line, which is calculated @group (defun Y-axis-element (number full-Y-label-width) "Construct a NUMBERed label element. -A numbered element looks like this ` 5 - ', +A numbered element looks like this ' 5 - ', and is padded as needed so all line up with the element for the largest number." @end group @@ -20016,7 +20016,7 @@ the @code{print-Y-axis} function, which inserts the list as a column. Height must be the maximum height of the graph. Full width is the width of the highest label element." ;; Value of height and full-Y-label-width -;; are passed by `print-graph'. +;; are passed by 'print-graph'. @end group @group (let ((start (point))) @@ -20706,9 +20706,9 @@ The graph looks like this: @end smallexample @noindent -(A question: is the `2' on the bottom of the vertical axis a bug or a -feature? If you think it is a bug, and should be a `1' instead, (or -even a `0'), you can modify the sources.) +(A question: is the @samp{2} on the bottom of the vertical axis a bug or a +feature? If you think it is a bug, and should be a @samp{1} instead, (or +even a @samp{0}), you can modify the sources.) @node Graphing words in defuns @appendixsubsec Graphing Numbers of Words and Symbols @@ -20816,8 +20816,8 @@ Thus, @end smallexample @noindent -is a function definition that says `return the value resulting from -dividing whatever is passed to me as @code{arg} by 50'. +is a function definition that says ``return the value resulting from +dividing whatever is passed to me as @code{arg} by 50''. @need 1200 Earlier, for example, we had a function @code{multiply-by-seven}; it @@ -20958,7 +20958,7 @@ element of its second argument, in turn. The second argument must be a sequence. The @samp{map} part of the name comes from the mathematical phrase, -`mapping over a domain', meaning to apply a function to each of the +``mapping over a domain'', meaning to apply a function to each of the elements in a domain. The mathematical phrase is based on the metaphor of a surveyor walking, one step at a time, over an area he is mapping. And @samp{car}, of course, comes from the Lisp notion of the @@ -21038,7 +21038,7 @@ that none had that many words or symbols.) @cindex Bug, most insidious type @cindex Insidious type of bug -I said `almost ready to print'! Of course, there is a bug in the +I said ``almost ready to print''! Of course, there is a bug in the @code{print-graph} function @dots{} It has a @code{vertical-step} option, but not a @code{horizontal-step} option. The @code{top-of-range} scale goes from 10 to 300 by tens. But the @@ -21141,7 +21141,7 @@ each column." @end group @group ;; Value of symbol-width and full-Y-label-width -;; are passed by `print-graph'. +;; are passed by 'print-graph'. (let* ((leading-spaces (make-string full-Y-label-width ? )) ;; symbol-width @r{is provided by} graph-body-print @@ -21309,7 +21309,7 @@ symbols in one function definition." @end group @group - (message "Working on `%s' ... " filename) + (message "Working on '%s' ... " filename) (save-excursion (let ((buffer (find-file-noselect filename)) (lengths-list)) @@ -21439,7 +21439,7 @@ The strings are either graph-blank or graph-symbol." @group (defun Y-axis-element (number full-Y-label-width) "Construct a NUMBERed label element. -A numbered element looks like this ` 5 - ', +A numbered element looks like this ' 5 - ', and is padded as needed so all line up with the element for the largest number." @end group @@ -21469,7 +21469,7 @@ Optionally, print according to VERTICAL-STEP." @end group @group ;; Value of height and full-Y-label-width -;; are passed by `print-graph'. +;; are passed by 'print-graph'. (let ((start (point))) (insert-rectangle (Y-axis-column height full-Y-label-width vertical-step)) @@ -21634,7 +21634,7 @@ each column." @end group @group ;; Value of symbol-width and full-Y-label-width -;; are passed by `print-graph'. +;; are passed by 'print-graph'. (let* ((leading-spaces (make-string full-Y-label-width ? )) ;; symbol-width @r{is provided by} graph-body-print @@ -21872,7 +21872,7 @@ users think that a proprietary manual is good enough---so they don't see the need to write a free manual. They do not see that the free operating system has a gap that needs filling. -Why do users think that proprietary manuals are good enough? Some have +Why do users think that proprietary manuals are good enough? Some have not considered the issue. I hope this article will do something to change that. commit a61b0c8912077f3b0f95d35293533540d0f83ea7 Author: Dmitry Gutov Date: Thu Apr 9 03:36:30 2015 +0300 CONTRIBUTE: Mention log-edit-insert-changelog diff --git a/CONTRIBUTE b/CONTRIBUTE index e60e6f9..e4454a3 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -148,6 +148,8 @@ The general format is as follows. a top-level ChangeLog file manually, and update it with 'C-x 4 a' as usual. Do not register the ChangeLog file under git; instead, use 'C-c C-a' to insert its contents into into your *vc-log* buffer. + Or if `log-edit-hook' includes `log-edit-insert-changelog' (which it + does by default), they will be filled in for you automatically. - Alternatively, you can use the vc-dwim command to maintain commit messages. When you create a source directory, run the shell command commit e970f6f02e3beaaaa05464928d45e12fe7458dc1 Author: Dmitry Gutov Date: Thu Apr 9 03:30:42 2015 +0300 CONTRIBUTE: Emphasize creating the top-level ChangeLog file manually diff --git a/CONTRIBUTE b/CONTRIBUTE index 5c8058a..e60e6f9 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -145,7 +145,7 @@ The general format is as follows. http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html. - If you use Emacs VC, one way to format ChangeLog entries is to create - a top-level ChangeLog file, and update it with 'C-x 4 a' file as + a top-level ChangeLog file manually, and update it with 'C-x 4 a' as usual. Do not register the ChangeLog file under git; instead, use 'C-c C-a' to insert its contents into into your *vc-log* buffer. commit 666b8276b1ab7542c8f3a893bc06d984cb3a7d93 Author: Paul Eggert Date: Wed Apr 8 17:19:15 2015 -0700 * doc/misc/calc.texi (Summary): Avoid '@:' when usurped. diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index 62a81b8..78af706 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -36661,6 +36661,8 @@ keystrokes are not listed in this summary. @end format +@c Avoid '@:' from here on, as it now means \sumsep in tex mode. + @noindent NOTES @@ -36799,9 +36801,9 @@ The @expr{op} prompt can be answered with the key sequence for the desired function, or with @kbd{x} or @kbd{z} followed by a function name, or with @kbd{$} to take a formula from the top of the stack, or with @kbd{'} and a typed formula. In the last two cases, the formula may -be a nameless function like @samp{<#1+#2>} or @samp{}, or it -may include @kbd{$}, @kbd{$$}, etc.@: (where @kbd{$} will correspond to the -last argument of the created function), or otherwise you will be +be a nameless function like @samp{<#1+#2>} or @samp{}; or it +may include @kbd{$}, @kbd{$$}, etc., where @kbd{$} will correspond to the +last argument of the created function; or otherwise you will be prompted for an argument list. The number of vectors popped from the stack by @kbd{V M} depends on the number of arguments of the function. commit 215e5bf0cf10b519838cc9d658caa35d5cbc4da6 Author: Stefan Monnier Date: Wed Apr 8 17:23:50 2015 -0400 (eieio-copy-parents-into-subclass): Fix inheritance of initargs Fixes: debbugs:20270 * lisp/emacs-lisp/eieio-core.el (eieio-copy-parents-into-subclass): Fix inheritance of initargs. diff --git a/lisp/emacs-lisp/eieio-core.el b/lisp/emacs-lisp/eieio-core.el index 6fd9c14..b0aa363 100644 --- a/lisp/emacs-lisp/eieio-core.el +++ b/lisp/emacs-lisp/eieio-core.el @@ -673,10 +673,9 @@ the new child class." (let ((pslots (eieio--class-slots pcv)) (pinit (eieio--class-initarg-tuples pcv))) (dotimes (i (length pslots)) - (eieio--add-new-slot newc (cl--copy-slot-descriptor (aref pslots i)) - (car-safe (car pinit)) nil nil sn) - ;; Increment each value. - (setq pinit (cdr pinit)) + (let* ((sd (cl--copy-slot-descriptor (aref pslots i))) + (init (car (rassq (cl--slot-descriptor-name sd) pinit)))) + (eieio--add-new-slot newc sd init nil nil sn)) )) ;; while/let ;; Now duplicate all the class alloc slots. (let ((pcslots (eieio--class-class-slots pcv))) commit a480a51f2425c0b0787ab36779ae2e7ca7c6b527 Author: Artur Malabarba Date: Wed Apr 8 19:27:45 2015 +0100 * lisp/emacs-lisp/package.el (package-menu-mode): Mode-line notification while dowloading information. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 10003c4..fa80ffe 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -2325,6 +2325,10 @@ will be deleted." Letters do not insert themselves; instead, they are commands. \\ \\{package-menu-mode-map}" + (setq mode-line-buffer-identification + (list 'package--downloads-in-progress + (propertized-buffer-identification "[Loading...]") + mode-line-buffer-identification)) (setq tabulated-list-format `[("Package" 18 package-menu--name-predicate) ("Version" 13 nil) commit 0465c9dd42a969aec375e6828ea70c3ad4c72c1c Author: Artur Malabarba Date: Tue Apr 7 18:59:40 2015 +0100 * lisp/emacs-lisp/package.el: More conservative `ensure-init-file' (package--ensure-init-file): Check file contents before visiting. (package-initialize): Call it. (package-install-from-buffer, package-install): Don't call it. diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 3188da5..10003c4 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1315,9 +1315,12 @@ If successful, set `package-archive-contents'." (defun package-initialize (&optional no-activate) "Load Emacs Lisp packages, and activate them. The variable `package-load-list' controls which packages to load. -If optional arg NO-ACTIVATE is non-nil, don't activate packages." +If optional arg NO-ACTIVATE is non-nil, don't activate packages. +If `user-init-file' does not mention `(package-initialize)', add +it to the file." (interactive) (setq package-alist nil) + (package--ensure-init-file) (package-load-all-descriptors) (package-read-all-archive-contents) (unless no-activate @@ -1752,25 +1755,33 @@ using `package-compute-transaction'." "Ensure that the user's init file calls `package-initialize'." ;; Don't mess with the init-file from "emacs -Q". (when user-init-file - (let ((buffer (find-buffer-visiting user-init-file))) - (with-current-buffer (or buffer (find-file-noselect user-init-file)) - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (unless (search-forward "(package-initialize)" nil 'noerror) + (let* ((buffer (find-buffer-visiting user-init-file)) + (contains-init + (if buffer + (with-current-buffer buffer + (search-forward "(package-initialize)" nil 'noerror)) + (with-temp-buffer + (insert-file-contents user-init-file) + (goto-char (point-min)) + (search-forward "(package-initialize)" nil 'noerror))))) + (unless contains-init + (with-current-buffer (or buffer (find-file-noselect user-init-file)) + (save-excursion + (save-restriction + (widen) (goto-char (point-min)) (insert ";; Added by Package.el. This must come before configurations of\n" ";; installed packages. Don't delete this line. If you don't want it,\n" ";; just comment it out by adding a semicolon to the start of the line.\n" + ";; You may delete these explanatory comments.\n" "(package-initialize)\n") (unless (looking-at-p "$") (insert "\n")) (let ((file-precious-flag t)) - (save-buffer))) - (unless buffer - (kill-buffer (current-buffer))))))))) + (save-buffer)) + (unless buffer + (kill-buffer (current-buffer)))))))))) ;;;###autoload (defun package-install (pkg &optional dont-select async callback) @@ -1803,7 +1814,6 @@ to install it but still mark it as selected." package-archive-contents)) nil t)) nil))) - (package--ensure-init-file) (let ((name (if (package-desc-p pkg) (package-desc-name pkg) pkg))) @@ -1846,7 +1856,6 @@ is derived from the main .el file in the directory. Downloads and installs required packages as needed." (interactive) - (package--ensure-init-file) (let* ((pkg-desc (cond ((derived-mode-p 'dired-mode) commit bf87b4d5a83cff934b469a95c14d782f68ea963a Author: Eli Zaretskii Date: Wed Apr 8 18:24:04 2015 +0300 * src/eval.c (init_eval_once): Bump max_lisp_eval_depth to 800 Fixes: bug#17517 diff --git a/src/eval.c b/src/eval.c index e828da9..11d0889 100644 --- a/src/eval.c +++ b/src/eval.c @@ -210,7 +210,7 @@ init_eval_once (void) specpdl = specpdl_ptr = pdlvec + 1; /* Don't forget to update docs (lispref node "Local Variables"). */ max_specpdl_size = 1300; /* 1000 is not enough for CEDET's c-by.el. */ - max_lisp_eval_depth = 600; + max_lisp_eval_depth = 800; Vrun_hooks = Qnil; } commit 74079cd58ba81b3ec81d44b474ad66ea2c99272d Merge: b3f2874 1ba357e Author: Michael Albinus Date: Wed Apr 8 11:52:12 2015 +0200 Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs commit b3f2874de2b6e31df34a7515aa09e10f01e9b8a6 Author: Michael Albinus Date: Wed Apr 8 11:51:22 2015 +0200 Fix nasty scoping bug in tramp-cache.el * lisp/net/tramp-cache.el (tramp-flush-file-property): Fix nasty scoping bug. diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index ba29ef0..f2ee49f 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -174,12 +174,12 @@ Returns VALUE." ;; Remove file properties of symlinks. (when (and (stringp truename) (not (string-equal file (directory-file-name truename)))) - (tramp-flush-file-property key truename))) - ;; Unify localname. - (setq key (copy-sequence key)) - (aset key 3 file) - (tramp-message key 8 "%s" file) - (remhash key tramp-cache-data)) + (tramp-flush-file-property key truename)) + ;; Unify localname. + (setq key (copy-sequence key)) + (aset key 3 file) + (tramp-message key 8 "%s" file) + (remhash key tramp-cache-data))) ;;;###tramp-autoload (defun tramp-flush-directory-property (key directory)