commit 066e633cb6dacb846c0ac070c8d7d77985af8620 (HEAD, refs/remotes/origin/master) Author: Stefan Monnier Date: Sun Feb 18 00:47:00 2018 -0500 * lisp/vc/diff-mode.el (diff-wiggle): New command. diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 7db5ca9b25..ef13f55b93 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -891,7 +891,7 @@ PREFIX is only used internally: don't use it." (if (and newfile (file-exists-p newfile)) (cl-return newfile)))) ;; look for each file in turn. If none found, try again but ;; ignoring the first level of directory, ... - (cl-do* ((files fs (delq nil (mapcar 'diff-filename-drop-dir files))) + (cl-do* ((files fs (delq nil (mapcar #'diff-filename-drop-dir files))) (file nil nil)) ((or (null files) (setq file (cl-do* ((files files (cdr files)) @@ -1387,12 +1387,12 @@ a diff with \\[diff-reverse-direction]. ;; (set (make-local-variable 'paragraph-separate) paragraph-start) ;; (set (make-local-variable 'page-delimiter) "--- [^\t]+\t") ;; compile support - (set (make-local-variable 'next-error-function) 'diff-next-error) + (set (make-local-variable 'next-error-function) #'diff-next-error) (set (make-local-variable 'beginning-of-defun-function) - 'diff-beginning-of-file-and-junk) + #'diff-beginning-of-file-and-junk) (set (make-local-variable 'end-of-defun-function) - 'diff-end-of-file) + #'diff-end-of-file) (diff-setup-whitespace) @@ -1400,10 +1400,10 @@ a diff with \\[diff-reverse-direction]. (setq buffer-read-only t)) ;; setup change hooks (if (not diff-update-on-the-fly) - (add-hook 'write-contents-functions 'diff-write-contents-hooks nil t) + (add-hook 'write-contents-functions #'diff-write-contents-hooks nil t) (make-local-variable 'diff-unhandled-changes) - (add-hook 'after-change-functions 'diff-after-change-function nil t) - (add-hook 'post-command-hook 'diff-post-command-hook nil t)) + (add-hook 'after-change-functions #'diff-after-change-function nil t) + (add-hook 'post-command-hook #'diff-post-command-hook nil t)) ;; Neat trick from Dave Love to add more bindings in read-only mode: (let ((ro-bind (cons 'buffer-read-only diff-mode-shared-map))) (add-to-list 'minor-mode-overriding-map-alist ro-bind) @@ -1415,7 +1415,7 @@ a diff with \\[diff-reverse-direction]. nil t)) ;; add-log support (set (make-local-variable 'add-log-current-defun-function) - 'diff-current-defun) + #'diff-current-defun) (set (make-local-variable 'add-log-buffer-file-name-function) (lambda () (diff-find-file-name nil 'noprompt))) (unless (buffer-file-name) @@ -1433,10 +1433,10 @@ the mode if ARG is omitted or nil. ;; FIXME: setup font-lock ;; setup change hooks (if (not diff-update-on-the-fly) - (add-hook 'write-contents-functions 'diff-write-contents-hooks nil t) + (add-hook 'write-contents-functions #'diff-write-contents-hooks nil t) (make-local-variable 'diff-unhandled-changes) - (add-hook 'after-change-functions 'diff-after-change-function nil t) - (add-hook 'post-command-hook 'diff-post-command-hook nil t))) + (add-hook 'after-change-functions #'diff-after-change-function nil t) + (add-hook 'post-command-hook #'diff-post-command-hook nil t))) ;;; Handy hook functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1468,7 +1468,7 @@ modified lines of the diff." (defun diff-delete-empty-files () "Arrange for empty diff files to be removed." - (add-hook 'after-save-hook 'diff-delete-if-empty nil t)) + (add-hook 'after-save-hook #'diff-delete-if-empty nil t)) (defun diff-make-unified () "Turn context diffs into unified diffs if applicable." @@ -1693,7 +1693,7 @@ If TEXT isn't found, nil is returned." Whitespace differences are ignored." (let* ((orig (point)) (re (concat "^[ \t\n ]*" - (mapconcat 'regexp-quote (split-string text) "[ \t\n ]+") + (mapconcat #'regexp-quote (split-string text) "[ \t\n ]+") "[ \t\n ]*\n")) (forw (and (re-search-forward re nil t) (cons (match-beginning 0) (match-end 0)))) @@ -2047,7 +2047,7 @@ Return new point, if it was moved." (progn (diff--forward-while-leading-char ?\\ end) (setq end-add (point)))) (smerge-refine-regions beg-del beg-add beg-add end-add - nil 'diff-refine-preproc props-r props-a))))) + nil #'diff-refine-preproc props-r props-a))))) (`context (let* ((middle (save-excursion (re-search-forward "^---"))) (other middle)) @@ -2060,7 +2060,7 @@ Return new point, if it was moved." (match-beginning 0)) other (if diff-use-changed-face props-c) - 'diff-refine-preproc + #'diff-refine-preproc (unless diff-use-changed-face props-r) (unless diff-use-changed-face props-a))))) (_ ;; Normal diffs. @@ -2069,7 +2069,7 @@ Return new point, if it was moved." ;; It's a combined add&remove, so there's something to do. (smerge-refine-regions beg1 (match-beginning 0) (match-end 0) end - nil 'diff-refine-preproc props-r props-a))))))))) + nil #'diff-refine-preproc props-r props-a))))))))) (defun diff-undo (&optional arg) "Perform `undo', ignoring the buffer's read-only status." @@ -2175,6 +2175,54 @@ fixed, visit it in a buffer." modified-buffers ", ")) (message "No trailing whitespace to delete."))))) +;;; Support for converting a diff to diff3 markers via `wiggle'. + +;; Wiggle can be found at http://neil.brown.name/wiggle/ or in your nearest +;; Debian repository. + +(defun diff-wiggle () + "Use `wiggle' to apply the whole current file diff by hook or by crook. +When a hunk can't cleanly be applied, it gets turned into a diff3-style +conflict." + (interactive) + (let* ((bounds (diff-bounds-of-file)) + (file (diff-find-file-name)) + (tmpbuf (current-buffer)) + (filebuf (find-buffer-visiting file)) + (patchfile (make-temp-file + (expand-file-name "wiggle" (file-name-directory file)) + nil ".diff")) + (errfile (make-temp-file + (expand-file-name "wiggle" (file-name-directory file)) + nil ".error"))) + (unwind-protect + (with-temp-buffer + (set-buffer (prog1 tmpbuf (setq tmpbuf (current-buffer)))) + (when (buffer-modified-p filebuf) + (save-some-buffers nil (lambda () (eq (current-buffer) filebuf))) + (if (buffer-modified-p filebuf) (error "Abort!"))) + (write-region (car bounds) (cadr bounds) patchfile nil 'silent) + (let ((exitcode + (call-process "wiggle" nil (list tmpbuf errfile) nil + file patchfile))) + (if (not (memq exitcode '(0 1))) + (message "diff-wiggle error: %s" + (with-current-buffer tmpbuf + (goto-char (point-min)) + (insert-file-contents errfile) + (buffer-string))) + (with-current-buffer tmpbuf + (write-region nil nil file nil 'silent) + (with-current-buffer filebuf + (revert-buffer t t t) + (save-excursion + (goto-char (point-min)) + (if (re-search-forward "^<<<<<<<" nil t) + (smerge-mode 1))) + (pop-to-buffer filebuf)))))) + (delete-file patchfile) + (delete-file errfile)))) + ;; provide the package (provide 'diff-mode) commit eb3337cdb32c8cd3213738b94df5bc4f0dfd40f2 Author: Stefan Monnier Date: Sat Feb 17 23:44:56 2018 -0500 * lisp/startup.el (load-user-init-file): Use condition-case-unless-debug. (argv, argi): Silence compiler warning. diff --git a/lisp/startup.el b/lisp/startup.el index 69bc8fa781..4105c1db2d 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -123,15 +123,17 @@ the remaining command-line args are in the variable `command-line-args-left'.") (defvar command-line-args-left nil "List of command-line args not yet processed.") -(defvaralias 'argv 'command-line-args-left - "List of command-line args not yet processed. -This is a convenience alias, so that one can write \(pop argv) +(with-no-warnings + (defvaralias 'argv 'command-line-args-left + "List of command-line args not yet processed. +This is a convenience alias, so that one can write (pop argv) inside of --eval command line arguments in order to access -following arguments.") +following arguments.")) (internal-make-var-non-special 'argv) -(defvar argi nil - "Current command-line argument.") +(with-no-warnings + (defvar argi nil + "Current command-line argument.")) (internal-make-var-non-special 'argi) (defvar command-line-functions nil ;; lrs 7/31/89 @@ -894,75 +896,64 @@ init-file, or to a default value if loading is not possible." (if (eq init-file-debug t) 'startup init-file-debug))) - (let ((debug-on-error debug-on-error-initial) - ;; We create an anonymous function here so that we can call - ;; it in different contexts depending on the value of - ;; `debug-on-error'. - (read-init-file - (lambda () - (when init-file-user - (let ((init-file-name (funcall filename-function))) - - ;; If `user-init-file' is t, then `load' will store - ;; the name of the file that it loads into - ;; `user-init-file'. - (setq user-init-file t) - (load init-file-name 'noerror 'nomessage) - - (when (and (eq user-init-file t) alternate-filename-function) - (load (funcall alternate-filename-function) - 'noerror 'nomessage)) - - ;; If we did not find the user's init file, set - ;; user-init-file conclusively. Don't let it be - ;; set from default.el. - (when (eq user-init-file t) - (setq user-init-file init-file-name))) - - ;; If we loaded a compiled file, set `user-init-file' to - ;; the source version if that exists. - (when (equal (file-name-extension user-init-file) - "elc") - (let* ((source (file-name-sans-extension user-init-file)) - (alt (concat source ".el"))) - (setq source (cond ((file-exists-p alt) alt) - ((file-exists-p source) source) - (t nil))) - (when source - (when (file-newer-than-file-p source user-init-file) - (message "Warning: %s is newer than %s" - source user-init-file) - (sit-for 1)) - (setq user-init-file source)))) - - (when load-defaults - - ;; Prevent default.el from changing the value of - ;; `inhibit-startup-screen'. - (let ((inhibit-startup-screen nil)) - (load "default" 'noerror 'nomessage))))))) - ;; Now call our anonymous function. - (if init-file-debug - ;; Do this without a `condition-case' if the user wants to - ;; debug. - (funcall read-init-file) - (condition-case error - (funcall read-init-file) - (error - (display-warning - 'initialization - (format-message "\ + (let ((debug-on-error debug-on-error-initial)) + (condition-case-unless-debug error + (when init-file-user + (let ((init-file-name (funcall filename-function))) + + ;; If `user-init-file' is t, then `load' will store + ;; the name of the file that it loads into + ;; `user-init-file'. + (setq user-init-file t) + (load init-file-name 'noerror 'nomessage) + + (when (and (eq user-init-file t) alternate-filename-function) + (load (funcall alternate-filename-function) + 'noerror 'nomessage)) + + ;; If we did not find the user's init file, set + ;; user-init-file conclusively. Don't let it be + ;; set from default.el. + (when (eq user-init-file t) + (setq user-init-file init-file-name))) + + ;; If we loaded a compiled file, set `user-init-file' to + ;; the source version if that exists. + (when (equal (file-name-extension user-init-file) + "elc") + (let* ((source (file-name-sans-extension user-init-file)) + (alt (concat source ".el"))) + (setq source (cond ((file-exists-p alt) alt) + ((file-exists-p source) source) + (t nil))) + (when source + (when (file-newer-than-file-p source user-init-file) + (message "Warning: %s is newer than %s" + source user-init-file) + (sit-for 1)) + (setq user-init-file source)))) + + (when load-defaults + + ;; Prevent default.el from changing the value of + ;; `inhibit-startup-screen'. + (let ((inhibit-startup-screen nil)) + (load "default" 'noerror 'nomessage)))) + (error + (display-warning + 'initialization + (format-message "\ An error occurred while loading `%s':\n\n%s%s%s\n\n\ To ensure normal operation, you should investigate and remove the cause of the error in your initialization file. Start Emacs with the `--debug-init' option to view a complete error backtrace." - user-init-file - (get (car error) 'error-message) - (if (cdr error) ": " "") - (mapconcat (lambda (s) (prin1-to-string s t)) - (cdr error) ", ")) - :warning) - (setq init-file-had-error t)))) + user-init-file + (get (car error) 'error-message) + (if (cdr error) ": " "") + (mapconcat (lambda (s) (prin1-to-string s t)) + (cdr error) ", ")) + :warning) + (setq init-file-had-error t))) ;; If we can tell that the init file altered debug-on-error, ;; arrange to preserve the value that it set up. commit cdb3bda532a1ebeef7670c642be47ab1a8a1a704 Author: Stefan Monnier Date: Sat Feb 17 17:42:29 2018 -0500 * lisp/calendar/icalendar.el: Fix compilation warnings (icalendar-export-region): Remove unused vars 'start', 'sum', and 'contents-n-summary'. (icalendar--parse-summary-and-rest): Remove unused var 'pos-sum' and 'sum'. (icalendar--convert-float-to-ical): Use calendar-let* to bind vars 'date' and 'entry'. (icalendar--convert-non-recurring-all-day-to-diary): Remove 'event' arg. Update callers. (icalendar--convert-non-recurring-not-all-day-to-diary): Remove 'event' and 'dtend-dec' args. Update callers. diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 7af1520da4..ca3adfaeeb 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -1048,12 +1048,10 @@ written into the buffer `*icalendar-errors*'." (interactive "r FExport diary data into iCalendar file: ") (let ((result "") - (start 0) (entry-main "") (entry-rest "") (entry-full "") (header "") - (contents-n-summary) (contents) (alarm) (found-error nil) @@ -1073,7 +1071,8 @@ FExport diary data into iCalendar file: ") ;; possibly ignore hidden entries beginning with "&" (if icalendar-export-hidden-diary-entries "^\\([^ \t\n#].+\\)\\(\\(\n[ \t].*\\)*\\)" - "^\\([^ \t\n&#].+\\)\\(\\(\n[ \t].*\\)*\\)") max t) + "^\\([^ \t\n&#].+\\)\\(\\(\n[ \t].*\\)*\\)") + max t) (setq entry-main (match-string 1)) (if (match-beginning 2) (setq entry-rest (match-string 2)) @@ -1095,7 +1094,7 @@ FExport diary data into iCalendar file: ") (loc (cdr (assoc 'loc other-elements))) (org (cdr (assoc 'org other-elements))) (sta (cdr (assoc 'sta other-elements))) - (sum (cdr (assoc 'sum other-elements))) + ;; (sum (cdr (assoc 'sum other-elements))) (url (cdr (assoc 'url other-elements))) (uid (cdr (assoc 'uid other-elements)))) (if cla @@ -1202,7 +1201,7 @@ Returns an alist." (p-uid (or (string-match "%U" icalendar-import-format) -1)) (p-list (sort (list p-cla p-des p-loc p-org p-sta p-sum p-url p-uid) '<)) (ct 0) - pos-cla pos-des pos-loc pos-org pos-sta pos-sum pos-url pos-uid) + pos-cla pos-des pos-loc pos-org pos-sta pos-url pos-uid) ;pos-sum (dotimes (i (length p-list)) ;; Use 'ct' to keep track of current position in list (cond ((and (>= p-cla 0) (= (nth i p-list) p-cla)) @@ -1222,7 +1221,8 @@ Returns an alist." (setq pos-sta (* 2 ct))) ((and (>= p-sum 0) (= (nth i p-list) p-sum)) (setq ct (+ ct 1)) - (setq pos-sum (* 2 ct))) + ;; (setq pos-sum (* 2 ct)) + ) ((and (>= p-url 0) (= (nth i p-list) p-url)) (setq ct (+ ct 1)) (setq pos-url (* 2 ct))) @@ -1254,11 +1254,11 @@ Returns an alist." (icalendar--rris "%s" "\\(.*?\\)" s nil t) "\\'")) (if (string-match s summary-and-rest) - (let (cla des loc org sta sum url uid) - (if (and pos-sum (match-beginning pos-sum)) - (setq sum (substring summary-and-rest - (match-beginning pos-sum) - (match-end pos-sum)))) + (let (cla des loc org sta url uid) ;; sum + ;; (if (and pos-sum (match-beginning pos-sum)) + ;; (setq sum (substring summary-and-rest + ;; (match-beginning pos-sum) + ;; (match-end pos-sum)))) (if (and pos-cla (match-beginning pos-cla)) (setq cla (substring summary-and-rest (match-beginning pos-cla) @@ -1763,8 +1763,8 @@ entries. ENTRY-MAIN is the first line of the diary entry." ;;BUT remove today if `diary-float' ;;expression does not hold true for today: (when - (null (let ((date (calendar-current-date)) - (entry entry-main)) + (null (calendar-dlet* ((date (calendar-current-date)) + (entry entry-main)) (diary-float month dayname n))) (concat "\nEXDATE;VALUE=DATE:" @@ -2164,7 +2164,7 @@ written into the buffer `*icalendar-errors*'." (rdate (icalendar--dmsg "rdate event") (setq diary-string "") - (mapc (lambda (datestring) + (mapc (lambda (_datestring) (setq diary-string (concat diary-string (format "......")))) @@ -2174,14 +2174,14 @@ written into the buffer `*icalendar-errors*'." ((not (string= start-d end-d)) (setq diary-string (icalendar--convert-non-recurring-all-day-to-diary - e start-d end-1-d)) + start-d end-1-d)) (setq event-ok t)) ;; not all-day ((and start-t (or (not end-t) (not (string= start-t end-t)))) (setq diary-string (icalendar--convert-non-recurring-not-all-day-to-diary - e dtstart-dec dtend-dec start-t end-t)) + dtstart-dec start-t end-t)) (setq event-ok t)) ;; all-day event (t @@ -2467,7 +2467,7 @@ END-T is the event's end time in diary format." e 'EXRULE)))) result)) -(defun icalendar--convert-non-recurring-all-day-to-diary (event start-d end-d) +(defun icalendar--convert-non-recurring-all-day-to-diary (start-d end-d) "Convert non-recurring iCalendar EVENT to diary format. DTSTART is the decoded DTSTART property of E. @@ -2476,14 +2476,12 @@ Argument END-D gives the last day." (icalendar--dmsg "non-recurring all-day event") (format "%%%%(and (diary-block %s %s))" start-d end-d)) -(defun icalendar--convert-non-recurring-not-all-day-to-diary (event dtstart-dec - dtend-dec - start-t - end-t) +(defun icalendar--convert-non-recurring-not-all-day-to-diary (dtstart-dec + start-t + end-t) "Convert recurring icalendar EVENT to diary format. DTSTART-DEC is the decoded DTSTART property of E. -DTEND-DEC is the decoded DTEND property of E. START-T is the event's start time in diary format. END-T is the event's end time in diary format." (icalendar--dmsg "not all day event") commit 296afbf75ac2a59a020d5b9669f494e1cb270588 Author: Glenn Morris Date: Sat Feb 17 09:58:33 2018 -0800 * doc/lispref/package.texi (Packaging Basics): Fix xref. diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index d179cf56fd..7e7a8cd9bc 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -130,7 +130,7 @@ In most cases, you should not need to call @code{package-initialize}, as this is done automatically during startup. Simply make sure to put any code that should run before @code{package-initialize} in the early init file, and any code that should run after it in the primary init -file (@xref{Init File,,, emacs, The GNU Emacs Manual}). +file (@pxref{Init File,,, emacs, The GNU Emacs Manual}). @end deffn @node Simple Packages commit 4fa90ff8f5fda54fc42049c990c52d3e5236fbe6 Merge: cb3863370c e5a29330aa Author: Glenn Morris Date: Sat Feb 17 07:50:28 2018 -0800 Merge from origin/emacs-26 e5a2933 (origin/emacs-26) lisp/vc/: documentation fixes f21f8e6 Document 'desktop-files-not-to-save' d8917eb Improve documentation of Profiling features b228839 Improve indexing of "performance" in ELisp manual ab67b3e Minor change in Emacs manual's VC chapter c352434 Avoid memory corruption with specpdl overflow + edebug (Bug#3... 593bbda Document comment-fill-column in the manual (Bug#11636) bd4cc8d * doc/emacs/dired.texi (Marks vs Flags): Copyedits. 69107f3 ; Fix doc typos related to indefinite articles aaad1e6 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emac... 5906418 More fixes for the Emacs manual 9ab3df1 ; Fix doc typos related to indefinite articles 66a4e65 ; Fix doc typos related to indefinite articles 35e5c57 ; Fix doc typos related to indefinite articles commit e5a29330aae4491fd384bacaff6f453c6434d322 Author: Charles A. Roelli Date: Sat Feb 17 16:49:02 2018 +0100 lisp/vc/: documentation fixes * lisp/vc/vc.el (vc-region-history): Clarify documentation. * lisp/vc/add-log.el (change-log-get-method-definition): Indent documentation. diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el index ec9299a947..773930f32f 100644 --- a/lisp/vc/add-log.el +++ b/lisp/vc/add-log.el @@ -1163,7 +1163,7 @@ Has a preference of looking backwards." (goto-char (match-end 0))) (defun change-log-get-method-definition () -"For Objective C, return the method name if we are in a method." + "For Objective C, return the method name if we are in a method." (let ((change-log-get-method-definition-md "[")) (save-excursion (if (re-search-backward "^@implementation\\s-*\\([A-Za-z_]*\\)" nil t) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index a0b4cc9271..93e9c25cbf 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2415,7 +2415,10 @@ When called interactively with a prefix argument, prompt for REMOTE-LOCATION." ;;;###autoload (defun vc-region-history (from to) - "Show the history of the region FROM..TO." + "Show the history of the region between FROM and TO. + +If called interactively, show the history between point and +mark." (interactive "r") (let* ((lfrom (line-number-at-pos from)) (lto (line-number-at-pos (1- to))) commit cb3863370cbe574810f796726faa39ba0de0a429 Author: Noam Postavsky Date: Sun Feb 4 20:43:26 2018 -0500 Use pkg-config to find lcms2 CFLAGS and LIBS (Bug#30346) * configure.ac: Use EMACS_CHECK_MODULES fors LCMS2 rather than AC_SEARCH_LIBS. * src/Makefile.in: Get LCMS2_LIBS and LCMS2_CFLAGS from configure, instead of just LIBLCMS2. diff --git a/configure.ac b/configure.ac index cf0347a61e..7c1f4ca8e6 100644 --- a/configure.ac +++ b/configure.ac @@ -3514,23 +3514,20 @@ fi AC_SUBST(LIBJPEG) HAVE_LCMS2=no -LIBLCMS2= +LCMS2_CFLAGS= +LCMS2_LIBS= if test "${with_lcms2}" != "no"; then - OLIBS=$LIBS - AC_SEARCH_LIBS([cmsCreateTransform], [lcms2], [HAVE_LCMS2=yes]) - LIBS=$OLIBS - case $ac_cv_search_cmsCreateTransform in - -*) LIBLCMS2=$ac_cv_search_cmsCreateTransform ;; - esac + EMACS_CHECK_MODULES([LCMS2], [lcms2]) fi if test "${HAVE_LCMS2}" = "yes"; then AC_DEFINE([HAVE_LCMS2], 1, [Define to 1 if you have the lcms2 library (-llcms2).]) ### mingw32 doesn't use -llcms2, since it loads the library dynamically. if test "${opsys}" = "mingw32"; then - LIBLCMS2= + LCMS2_LIBS= fi fi -AC_SUBST(LIBLCMS2) +AC_SUBST(LCMS2_CFLAGS) +AC_SUBST(LCMS2_LIBS) HAVE_ZLIB=no LIBZ= diff --git a/src/Makefile.in b/src/Makefile.in index c84859cb4f..1f1ae40efe 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -234,7 +234,8 @@ LIBXML2_CFLAGS = @LIBXML2_CFLAGS@ GETADDRINFO_A_LIBS = @GETADDRINFO_A_LIBS@ -LIBLCMS2 = @LIBLCMS2@ +LCMS2_LIBS = @LCMS2_LIBS@ +LCMS2_CFLAGS = @LCMS2_CFLAGS@ LIBZ = @LIBZ@ @@ -365,7 +366,7 @@ EMACS_CFLAGS=-Demacs $(MYCPPFLAGS) -I. -I$(srcdir) \ $(GNUSTEP_CFLAGS) $(CFLAGS_SOUND) $(RSVG_CFLAGS) $(IMAGEMAGICK_CFLAGS) \ $(PNG_CFLAGS) $(LIBXML2_CFLAGS) $(DBUS_CFLAGS) \ $(XRANDR_CFLAGS) $(XINERAMA_CFLAGS) $(XFIXES_CFLAGS) $(XDBE_CFLAGS) \ - $(WEBKIT_CFLAGS) \ + $(WEBKIT_CFLAGS) $(LCMS2_CFLAGS) \ $(SETTINGS_CFLAGS) $(FREETYPE_CFLAGS) $(FONTCONFIG_CFLAGS) \ $(LIBOTF_CFLAGS) $(M17N_FLT_CFLAGS) $(DEPFLAGS) \ $(LIBSYSTEMD_CFLAGS) $(JSON_CFLAGS) \ @@ -497,7 +498,7 @@ LIBES = $(LIBS) $(W32_LIBS) $(LIBS_GNUSTEP) $(LIBX_BASE) $(LIBIMAGE) \ $(LIBXML2_LIBS) $(LIBGPM) $(LIBS_SYSTEM) $(CAIRO_LIBS) \ $(LIBS_TERMCAP) $(GETLOADAVG_LIBS) $(SETTINGS_LIBS) $(LIBSELINUX_LIBS) \ $(FREETYPE_LIBS) $(FONTCONFIG_LIBS) $(LIBOTF_LIBS) $(M17N_FLT_LIBS) \ - $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) $(LIBLCMS2) \ + $(LIBGNUTLS_LIBS) $(LIB_PTHREAD) $(GETADDRINFO_A_LIBS) $(LCMS2_LIBS) \ $(NOTIFY_LIBS) $(LIB_MATH) $(LIBZ) $(LIBMODULES) $(LIBSYSTEMD_LIBS) \ $(JSON_LIBS) commit 0f5cc9a085565c4f6d6d7e124a8b2965d8800ae5 Author: Allen Li Date: Sun Dec 31 20:14:09 2017 -0800 Preserve special abbrev properties when writing Fixes bug#29924 * lisp/abbrev.el (abbrev--write): Write abbrev properties when set. diff --git a/etc/NEWS b/etc/NEWS index b6b884b816..8db638e5ed 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -122,6 +122,11 @@ characters that quote text "like this" are replaced by double typographic quotes, “like this”, in text modes, and in comments in non-text modes. +--- +** 'write-abbrev-file' now includes special properties. +'write-abbrev-file' now writes special properties like ':case-fixed' +for abbrevs that have them. + * Changes in Specialized Modes and Packages in Emacs 27.1 diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 734cefbb7b..197276cc9c 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -908,8 +908,14 @@ Presumes that `standard-output' points to `current-buffer'." (prin1 (symbol-value sym)) (insert " ") (prin1 (symbol-function sym)) - (insert " ") + (insert " :count ") (prin1 (abbrev-get sym :count)) + (when (abbrev-get sym :case-fixed) + (insert " :case-fixed ") + (prin1 (abbrev-get sym :case-fixed))) + (when (abbrev-get sym :enable-function) + (insert " :enable-function ") + (prin1 (abbrev-get sym :enable-function))) (insert ")\n"))) (defun abbrev--describe (sym) diff --git a/test/lisp/abbrev-tests.el b/test/lisp/abbrev-tests.el index 1187700b84..facf097815 100644 --- a/test/lisp/abbrev-tests.el +++ b/test/lisp/abbrev-tests.el @@ -38,6 +38,12 @@ (abbrev-table-put ert-test-abbrevs :ert-test "ert-test-value") ert-test-abbrevs) +(defun setup-test-abbrev-table-with-props () + (defvar ert-test-abbrevs nil) + (define-abbrev-table 'ert-test-abbrevs '(("fb" "fooBar" nil :case-fixed t))) + (abbrev-table-put ert-test-abbrevs :ert-test "ert-test-value") + ert-test-abbrevs) + (ert-deftest abbrev-table-p-test () (should-not (abbrev-table-p 42)) (should-not (abbrev-table-p "aoeu")) @@ -230,6 +236,17 @@ (should (equal "abbrev-ert-test" (abbrev-expansion "a-e-t" ert-test-abbrevs))) (delete-file temp-test-file))) +(ert-deftest read-write-abbrev-file-test-with-props () + "Test reading and writing abbrevs from file" + (let ((temp-test-file (make-temp-file "ert-abbrev-test")) + (ert-test-abbrevs (setup-test-abbrev-table-with-props))) + (write-abbrev-file temp-test-file) + (clear-abbrev-table ert-test-abbrevs) + (should (abbrev-table-empty-p ert-test-abbrevs)) + (read-abbrev-file temp-test-file) + (should (equal "fooBar" (abbrev-expansion "fb" ert-test-abbrevs))) + (delete-file temp-test-file))) + (ert-deftest abbrev-edit-save-to-file-test () "Test saving abbrev definitions in buffer to file" (defvar ert-save-test-table nil) commit 5b464a9ceab6aa48138d0353669b426ff69e5365 Author: Alan Third Date: Wed Feb 14 20:28:46 2018 +0000 Fix modifier key handling on macOS * configure.ac: Use the Carbon framework on macOS. * src/nsterm.m (ns_get_shifted_character) [NS_IMPL_COCOA]: New function. (EmacsView::keyDown) [NS_IMPL_COCOA]: Use ns_get_shifted_character when we have shift style modifiers. diff --git a/configure.ac b/configure.ac index cb452e053b..cf0347a61e 100644 --- a/configure.ac +++ b/configure.ac @@ -5269,7 +5269,7 @@ case "$opsys" in if test "$HAVE_NS" = "yes"; then libs_nsgui="-framework AppKit" if test "$NS_IMPL_COCOA" = "yes"; then - libs_nsgui="$libs_nsgui -framework IOKit" + libs_nsgui="$libs_nsgui -framework IOKit -framework Carbon" fi else libs_nsgui= diff --git a/src/nsterm.m b/src/nsterm.m index 627a61cac6..1919c6defa 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -67,6 +67,7 @@ Updated by Christian Limpach (chris@nice.ch) #ifdef NS_IMPL_COCOA #include "macfont.h" +#include #endif static EmacsMenu *dockMenu; @@ -2679,7 +2680,78 @@ so some key presses (TAB) are swallowed by the system. */ return value; } +#ifdef NS_IMPL_COCOA +static UniChar +ns_get_shifted_character (NSEvent *event) +/* Look up the character corresponding to the key pressed on the + current keyboard layout and the currently configured shift-like + modifiers. This ignores the control-like modifiers that cause + [event characters] to give us the wrong result. + + Although UCKeyTranslate doesn't require the Carbon framework, some + of the surrounding paraphernalia does, so this function makes + Carbon a requirement. */ +{ + static UInt32 dead_key_state; + + /* UCKeyTranslate may return up to 255 characters. If the buffer + isn't large enough then it produces an error. What kind of + keyboard inputs 255 characters in a single keypress? */ + UniChar buf[255]; + UniCharCount max_string_length = 255; + UniCharCount actual_string_length = 0; + OSStatus result; + + CFDataRef layout_ref = (CFDataRef) TISGetInputSourceProperty + (TISCopyCurrentKeyboardLayoutInputSource (), kTISPropertyUnicodeKeyLayoutData); + UCKeyboardLayout* layout = (UCKeyboardLayout*) CFDataGetBytePtr (layout_ref); + + UInt32 flags = [event modifierFlags]; + UInt32 modifiers = (flags & NSEventModifierFlagShift) ? shiftKey : 0; + + NSTRACE ("ns_get_shifted_character"); + + if ((flags & NSRightAlternateKeyMask) == NSRightAlternateKeyMask + && (EQ (ns_right_alternate_modifier, Qnone) + || (EQ (ns_right_alternate_modifier, Qleft) + && EQ (ns_alternate_modifier, Qnone)))) + modifiers |= rightOptionKey; + + if ((flags & NSLeftAlternateKeyMask) == NSLeftAlternateKeyMask + && EQ (ns_alternate_modifier, Qnone)) + modifiers |= optionKey; + + if ((flags & NSRightCommandKeyMask) == NSRightCommandKeyMask + && (EQ (ns_right_command_modifier, Qnone) + || (EQ (ns_right_command_modifier, Qleft) + && EQ (ns_command_modifier, Qnone)))) + /* Carbon doesn't differentiate between left and right command + keys. */ + modifiers |= cmdKey; + + if ((flags & NSLeftCommandKeyMask) == NSLeftCommandKeyMask + && EQ (ns_command_modifier, Qnone)) + modifiers |= cmdKey; + + result = UCKeyTranslate (layout, [event keyCode], kUCKeyActionDown, + (modifiers >> 8) & 0xFF, LMGetKbdType (), + kUCKeyTranslateNoDeadKeysBit, &dead_key_state, + max_string_length, &actual_string_length, buf); + + if (result != 0) + { + NSLog(@"Failed to translate character '%@' with modifiers %x", + [event characters], modifiers); + return 0; + } + + /* FIXME: What do we do if more than one code unit is returned? */ + if (actual_string_length > 0) + return buf[0]; + return 0; +} +#endif /* NS_IMPL_COCOA */ /* ========================================================================== @@ -6148,8 +6220,6 @@ most recently updated (I guess), which is not the correct one. */ code = ([[theEvent charactersIgnoringModifiers] length] == 0) ? 0 : [[theEvent charactersIgnoringModifiers] characterAtIndex: 0]; - /* (Carbon way: [theEvent keyCode]) */ - /* is it a "function key"? */ /* Note: Sometimes a plain key will have the NSEventModifierFlagNumericPad flag set (this is probably a bug in the OS). @@ -6191,8 +6261,8 @@ untranslated characters (returned by the charactersIgnoringModifiers method). An annoyance happens if we have both shift-like and control-like modifiers because the NSEvent API doesn’t let us ignore only some modifiers. - Therefore we ignore all shift-like modifiers in that - case. */ + In that case we use UCKeyTranslate (ns_get_shifted_character) + to look up the correct character. */ /* EV_MODIFIERS2 uses parse_solitary_modifier on all known modifier keys, which returns 0 for shift-like modifiers. @@ -6218,7 +6288,6 @@ untranslated characters (returned by the if (fnKeysym || (emacs_event->modifiers && (emacs_event->modifiers != shift_modifier) && [[theEvent charactersIgnoringModifiers] length] > 0)) -/*[[theEvent characters] length] */ { emacs_event->kind = NON_ASCII_KEYSTROKE_EVENT; /* FIXME: What are the next four lines supposed to do? */ @@ -6227,12 +6296,21 @@ untranslated characters (returned by the else if (code == 0x7f) code |= (1<<28)|(3<<16); else if (!fnKeysym) - /* FIXME: This seems wrong, characters in the range - [0x80, 0xFF] are not ASCII characters. Can’t we just - use MULTIBYTE_CHAR_KEYSTROKE_EVENT here for all kinds - of characters? */ - emacs_event->kind = code > 0xFF - ? MULTIBYTE_CHAR_KEYSTROKE_EVENT : ASCII_KEYSTROKE_EVENT; + { +#ifdef NS_IMPL_COCOA + /* We potentially have both shift- and control-like + modifiers in use, so find the correct character + ignoring any control-like ones. */ + code = ns_get_shifted_character (theEvent); +#endif + + /* FIXME: This seems wrong, characters in the range + [0x80, 0xFF] are not ASCII characters. Can’t we just + use MULTIBYTE_CHAR_KEYSTROKE_EVENT here for all kinds + of characters? */ + emacs_event->kind = code > 0xFF + ? MULTIBYTE_CHAR_KEYSTROKE_EVENT : ASCII_KEYSTROKE_EVENT; + } emacs_event->code = code; EV_TRAILER (theEvent); commit 4429f97b58653540985387caa554fc0f25f90000 Author: Eli Zaretskii Date: Sat Feb 17 14:26:49 2018 +0200 Make echo-area buffers almost always multibyte * src/xdisp.c (setup_echo_area_for_printing, set_message_1): Ensure the echo-area buffer is multibyte, unless unibyte-display-via-language-environment is non-nil, and the text we are to display is or could be unibyte. (Bug#30405) diff --git a/src/xdisp.c b/src/xdisp.c index 7c90d32db6..f6fcdec662 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10982,10 +10982,18 @@ setup_echo_area_for_printing (bool multibyte_p) } TEMP_SET_PT_BOTH (BEG, BEG_BYTE); - /* Set up the buffer for the multibyteness we need. */ - if (multibyte_p - != !NILP (BVAR (current_buffer, enable_multibyte_characters))) - Fset_buffer_multibyte (multibyte_p ? Qt : Qnil); + /* Set up the buffer for the multibyteness we need. We always + set it to be multibyte, except when + unibyte-display-via-language-environment is non-nil and the + buffer from which we are called is unibyte, because in that + case unibyte characters should not be displayed as octal + escapes. */ + if (unibyte_display_via_language_environment + && !multibyte_p + && !NILP (BVAR (current_buffer, enable_multibyte_characters))) + Fset_buffer_multibyte (Qnil); + else if (NILP (BVAR (current_buffer, enable_multibyte_characters))) + Fset_buffer_multibyte (Qt); /* Raise the frame containing the echo area. */ if (minibuffer_auto_raise) @@ -11431,10 +11439,17 @@ set_message_1 (ptrdiff_t a1, Lisp_Object string) { eassert (STRINGP (string)); - /* Change multibyteness of the echo buffer appropriately. */ - if (message_enable_multibyte - != !NILP (BVAR (current_buffer, enable_multibyte_characters))) - Fset_buffer_multibyte (message_enable_multibyte ? Qt : Qnil); + /* Change multibyteness of the echo buffer appropriately. We always + set it to be multibyte, except when + unibyte-display-via-language-environment is non-nil and the + string to display is unibyte, because in that case unibyte + characters should not be displayed as octal escapes. */ + if (!message_enable_multibyte + && unibyte_display_via_language_environment + && !NILP (BVAR (current_buffer, enable_multibyte_characters))) + Fset_buffer_multibyte (Qnil); + else if (NILP (BVAR (current_buffer, enable_multibyte_characters))) + Fset_buffer_multibyte (Qt); bset_truncate_lines (current_buffer, message_truncate_lines ? Qt : Qnil); if (!NILP (BVAR (current_buffer, bidi_display_reordering))) commit 24acb31c04b4048b85311d794e600ecd7ce60d3b Author: Radon Rosborough Date: Sat Feb 17 13:36:16 2018 +0200 Add early init file, stop package-initialize insertion Discussion on emacs-devel leading up to this change (approximately 150 messages): - https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00154.html - https://lists.gnu.org/archive/html/emacs-devel/2017-08/msg00433.html - https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00023.html - https://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00599.html - https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00332.html * lisp/startup.el (early-init-file): New variable. (load-user-init-file): New function. (command-line): Load the early init file using `load-user-init-file'. Move the check for an invalid username to just before that, and move the initialization of the package system to just after. Load the regular init file using `load-user-init-file'. * lisp/emacs-lisp/package.el (package--ensure-init-file): Remove definition, usage, and documentation. (package--init-file-ensured): Remove definition and usage. * src/lread.c (Vuser_init_file): Note change in semantics due to its usage while loading the early init file. * doc/emacs/custom.texi: Document early init file. * doc/emacs/package.texi: Document changes to when package-initialize is called. Change terminology for package 'loading'. * doc/lispref/os.texi: Document early init file. Update startup summary. * doc/lispref/package.texi: Document changes to when package-initialize is called, and advise against calling it in the init file. Change terminology for package 'loading'. * doc/misc/org.texi: Don't recommend to call package-initialize in the init file. diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index 2726690f09..b985d12cde 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -2167,6 +2167,7 @@ Manual}. * Terminal Init:: Each terminal type can have an init file. * Find Init:: How Emacs finds the init file. * Init Non-ASCII:: Using non-@acronym{ASCII} characters in an init file. +* Early Init File:: Another init file, which is read early on. @end menu @node Init Syntax @@ -2567,3 +2568,20 @@ instance: @noindent Type @kbd{C-q}, followed by the key you want to bind, to insert @var{char}. + +@node Early Init File +@subsection The Early Init File +@cindex early init file + + Most customizations for Emacs can be put in the normal init file, +@file{.emacs} or @file{~/.emacs.d/init.el}. However, it is sometimes +desirable to have customizations that take effect during Emacs startup +earlier than the normal init file is processed. Such customizations +can be put in the early init file, @file{~/.emacs.d/early-init.el}. +This file is loaded before the package system is initialized, so in it +you can customize variables that affect the initialization process, +such as @code{package-enable-at-startup} and @code{package-load-list}. +@xref{Package Installation}. + + For more information on the early init file, @pxref{Early Init +File,,, elisp, The Emacs Lisp Reference Manual}. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 163b6f23d8..65affeb59f 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -1163,6 +1163,7 @@ The Emacs Initialization File * Terminal Init:: Each terminal type can have an init file. * Find Init:: How Emacs finds the init file. * Init Non-ASCII:: Using non-@acronym{ASCII} characters in an init file. +* Early Init File:: Another init file, which is read early on. Dealing with Emacs Trouble diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi index bc6afb7966..6c7493790d 100644 --- a/doc/emacs/package.texi +++ b/doc/emacs/package.texi @@ -241,57 +241,55 @@ lower-priority archives will not be shown in the menu, if the same package is available from a higher-priority archive. (This is controlled by the value of @code{package-menu-hide-low-priority}.) - Once a package is downloaded and installed, it is @dfn{loaded} into -the current Emacs session. Loading a package is not quite the same as -loading a Lisp library (@pxref{Lisp Libraries}); loading a package -adds its directory to @code{load-path} and loads its autoloads. The -effect of a package's autoloads varies from package to package. Most -packages just make some new commands available, while others have more + Once a package is downloaded and installed, it is made available to +the current Emacs session. Making a package available adds its +directory to @code{load-path} and loads its autoloads. The effect of +a package's autoloads varies from package to package. Most packages +just make some new commands available, while others have more wide-ranging effects on the Emacs session. For such information, consult the package's help buffer. - By default, Emacs also automatically loads all installed packages in -subsequent Emacs sessions. This happens at startup, after processing -the init file (@pxref{Init File}). As an exception, Emacs does not -load packages at startup if invoked with the @samp{-q} or -@samp{--no-init-file} options (@pxref{Initial Options}). + After a package is installed, it is automatically made available by +Emacs in all subsequent sessions. This happens at startup, before +processing the init file but after processing the early init file +(@pxref{Early Init File,,, elisp, The Emacs Lisp Reference Manual}). +As an exception, Emacs does not make packages available at startup if +invoked with the @samp{-q} or @samp{--no-init-file} options +(@pxref{Initial Options}). @vindex package-enable-at-startup - To disable automatic package loading, change the variable -@code{package-enable-at-startup} to @code{nil}. + To keep Emacs from automatically making packages available at +startup, change the variable @code{package-enable-at-startup} to +@code{nil}. You must do this in the early init file (@pxref{Early +Init File,,, elisp, The Emacs Lisp Reference Manual}), as the variable +is read before loading the regular init file. Currently this variable +cannot be set via Customize. @findex package-initialize - The reason automatic package loading occurs after loading the init -file is that user options only receive their customized values after -loading the init file, including user options which affect the -packaging system. In some circumstances, you may want to load -packages explicitly in your init file (usually because some other code -in your init file depends on a package). In that case, your init file -should call the function @code{package-initialize}. It is up to you -to ensure that relevant user options, such as @code{package-load-list} -(see below), are set up prior to the @code{package-initialize} call. -This will automatically set @code{package-enable-at-startup} to @code{nil}, to -avoid loading the packages again after processing the init file. -Alternatively, you may choose to completely inhibit package loading at -startup, and invoke the command @kbd{M-x package-initialize} to load -your packages manually. + If you have set @code{package-enable-at-startup} to @code{nil}, you +can still make packages available either during or after startup. To +make installed packages available during startup, call the function +@code{package-initialize} in your init file. To make installed +packages available after startup, invoke the command @kbd{M-x +package-initialize}. @vindex package-load-list - For finer control over package loading, you can use the variable -@code{package-load-list}. Its value should be a list. A list element -of the form @code{(@var{name} @var{version})} tells Emacs to load -version @var{version} of the package named @var{name}. Here, -@var{version} should be a version string (corresponding to a specific -version of the package), or @code{t} (which means to load any -installed version), or @code{nil} (which means no version; this -disables the package, preventing it from being loaded). A list -element can also be the symbol @code{all}, which means to load the -latest installed version of any package not named by the other list -elements. The default value is just @code{'(all)}. - - For example, if you set @code{package-load-list} to @code{'((muse -"3.20") all)}, then Emacs only loads version 3.20 of the @samp{muse} -package, plus any installed version of packages other than + For finer control over which packages are made available at startup, +you can use the variable @code{package-load-list}. Its value should +be a list. A list element of the form @w{@code{(@var{name} +@var{version})}} tells Emacs to make available version @var{version} of +the package named @var{name}. Here, @var{version} should be a version +string (corresponding to a specific version of the package), or +@code{t} (which means to make available any installed version), or +@code{nil} (which means no version; this disables the package, +preventing it from being made available). A list element can also be +the symbol @code{all}, which means to make available the latest +installed version of any package not named by the other list elements. +The default value is just @code{'(all)}. + + For example, if you set @code{package-load-list} to @w{@code{'((muse +"3.20") all)}}, then Emacs only makes available version 3.20 of the +@samp{muse} package, plus any installed version of packages other than @samp{muse}. Any other version of @samp{muse} that happens to be installed will be ignored. The @samp{muse} package will be listed in the package menu with the @samp{held} status. diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 42be60449d..be2d148a1e 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -95,6 +95,22 @@ if requested by environment variables such as @env{LANG}. @item It does some basic parsing of the command-line arguments. +@item +It loads your early init file (@pxref{Early Init File,,, emacs, The +GNU Emacs Manual}). This is not done if the options @samp{-q}, +@samp{-Q}, or @samp{--batch} were specified. If the @samp{-u} option +was specified, Emacs looks for the init file in that user's home +directory instead. + +@item +It calls the function @code{package-initialize} to activate any +optional Emacs Lisp package that has been installed. @xref{Packaging +Basics}. However, Emacs doesn't initialize packages when +@code{package-enable-at-startup} is @code{nil} or when it's started +with one of the options @samp{-q}, @samp{-Q}, or @samp{--batch}. To +initialize packages in the latter case, @code{package-initialize} +should be called explicitly (e.g., via the @samp{--funcall} option). + @vindex initial-window-system@r{, and startup} @vindex window-system-initialization-alist @item @@ -154,15 +170,6 @@ It loads your abbrevs from the file specified by (@pxref{Abbrev Files, abbrev-file-name}). This is not done if the option @samp{--batch} was specified. -@item -It calls the function @code{package-initialize} to activate any -optional Emacs Lisp package that has been installed. @xref{Packaging -Basics}. However, Emacs doesn't initialize packages when -@code{package-enable-at-startup} is @code{nil} or when it's started -with one of the options @samp{-q}, @samp{-Q}, or @samp{--batch}. To -initialize packages in the latter case, @code{package-initialize} -should be called explicitly (e.g., via the @samp{--funcall} option). - @vindex after-init-time @item It sets the variable @code{after-init-time} to the value of @@ -361,6 +368,7 @@ Equivalent to @samp{-q --no-site-file --no-splash}. @cindex init file @cindex @file{.emacs} @cindex @file{init.el} +@cindex @file{early-init.el} When you start Emacs, it normally attempts to load your @dfn{init file}. This is either a file named @file{.emacs} or @file{.emacs.el} @@ -384,6 +392,19 @@ file; this way, even if you have su'd, Emacs still loads your own init file. If those environment variables are absent, though, Emacs uses your user-id to find your home directory. +@cindex early init file + Emacs also attempts to load a second init file, called the +@dfn{early init file}, if it exists. This is a file named +@file{early-init.el} in your @file{~/.emacs.d} directory. The +difference between the early init file and the regular init file is +that the early init file is loaded much earlier during the startup +process, so you can use it to customize some things that are +initialized before loading the regular init file. For example, you +can customize the process of initializing the package system, by +setting variables such as @var{package-load-list} or +@var{package-enable-at-startup}. @xref{Package Installation,,, +emacs,The GNU Emacs Manual}. + @cindex default init file An Emacs installation may have a @dfn{default init file}, which is a Lisp library named @file{default.el}. Emacs finds this file through diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 21dfe1c271..877aaf89a3 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -105,24 +105,32 @@ adds the package's content directory to @code{load-path}, and evaluates the autoload definitions in @file{@var{name}-autoloads.el}. Whenever Emacs starts up, it automatically calls the function -@code{package-initialize} to load installed packages. This is done -after loading the init file and abbrev file (if any) and before -running @code{after-init-hook} (@pxref{Startup Summary}). Automatic -package loading is disabled if the user option -@code{package-enable-at-startup} is @code{nil}. +@code{package-initialize} to make installed packages available to the +current session. This is done after loading the early init file, but +before loading the regular init file (@pxref{Startup Summary}). +Packages are not automatically made available if the user option +@code{package-enable-at-startup} is set to @code{nil} in the early +init file. @deffn Command package-initialize &optional no-activate This function initializes Emacs' internal record of which packages are -installed, and loads them. The user option @code{package-load-list} -specifies which packages to load; by default, all installed packages -are loaded. If called during startup, this function also sets +installed, and makes the packages available to the current session. +The user option @code{package-load-list} specifies which packages to +make available; by default, all installed packages are made available. +If called during startup, this function also sets @code{package-enable-at-startup} to @code{nil}, to avoid accidentally -loading the packages twice. @xref{Package Installation,,, emacs, The -GNU Emacs Manual}. +evaluating package autoloads more than once. @xref{Package +Installation,,, emacs, The GNU Emacs Manual}. The optional argument @var{no-activate}, if non-@code{nil}, causes Emacs to update its record of installed packages without actually -loading them; it is for internal use only. +making them available; it is for internal use only. + +In most cases, you should not need to call @code{package-initialize}, +as this is done automatically during startup. Simply make sure to put +any code that should run before @code{package-initialize} in the early +init file, and any code that should run after it in the primary init +file (@xref{Init File,,, emacs, The GNU Emacs Manual}). @end deffn @node Simple Packages diff --git a/doc/misc/org.texi b/doc/misc/org.texi index aa3b029ab7..68aa01ca18 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -890,9 +890,7 @@ Elisp libraries. You can install Org with @kbd{M-x package-install RET org}. been visited, i.e., where no Org built-in function have been loaded. Otherwise autoload Org functions will mess up the installation. -Then, to make sure your Org configuration is taken into account, initialize -the package system with @code{(package-initialize)} in your Emacs init file -before setting any Org option. If you want to use Org's package repository, +If you want to use Org's package repository, check out the @uref{http://orgmode.org/elpa.html, Org ELPA page}. @subsubheading Downloading Org as an archive diff --git a/etc/NEWS b/etc/NEWS index 71569c95ad..b6b884b816 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -49,6 +49,25 @@ to reduce differences between developer and production builds. * Startup Changes in Emacs 27.1 ++++ +** Emacs can now be configured using an early init file. +The file is called 'early-init.el', in 'user-emacs-directory'. It is +loaded very early in the startup process: before graphical elements +such as the tool bar are initialized, and before the package manager +is initialized. The primary purpose is to allow customizing how the +package system is initialized given that initialization now happens +before loading the regular init file (see below). + ++++ +** Emacs now calls 'package-initialize' before loading the init file. +This is part of a change intended to eliminate the behavior of +package.el inserting a call to 'package-initialize' into the init +file, which was previously done when Emacs was started. As a result +of this change, it is no longer necessary to call 'package-initialize' +in your init file. However, if your init file changes the values of +'package-load-list' or 'package-user-dir', then that code needs to be +moved to the early init file (see above). + * Changes in Emacs 27.1 diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 71d1c41ec3..ab02d4255b 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1431,16 +1431,11 @@ If successful, set `package-archive-contents'." ;; available on disk. (defvar package--initialized nil) -(defvar package--init-file-ensured nil - "Whether we know the init file has package-initialize.") - ;;;###autoload (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 `user-init-file' does not mention `(package-initialize)', add -it to the file. If called as part of loading `user-init-file', set `package-enable-at-startup' to nil, to prevent accidentally loading packages twice. @@ -1449,13 +1444,7 @@ individual packages after calling `package-initialize' -- this is taken care of by `package-initialize'." (interactive) (setq package-alist nil) - (if after-init-time - (package--ensure-init-file) - ;; If `package-initialize' is before we finished loading the init - ;; file, it's obvious we don't need to ensure-init. - (setq package--init-file-ensured t - ;; And likely we don't need to run it again after init. - package-enable-at-startup nil)) + (setq package-enable-at-startup nil) (package-load-all-descriptors) (package-read-all-archive-contents) (unless no-activate @@ -1872,64 +1861,6 @@ PACKAGES are satisfied, i.e. that PACKAGES is computed using `package-compute-transaction'." (mapc #'package-install-from-archive packages)) -(defun package--ensure-init-file () - "Ensure that the user's init file has `package-initialize'. -`package-initialize' doesn't have to be called, as long as it is -present somewhere in the file, even as a comment. If it is not, -add a call to it along with some explanatory comments." - ;; Don't mess with the init-file from "emacs -Q". - (when (and (stringp user-init-file) - (not package--init-file-ensured) - (file-readable-p user-init-file) - (file-writable-p user-init-file)) - (let* ((buffer (find-buffer-visiting user-init-file)) - buffer-name - (contains-init - (if buffer - (with-current-buffer buffer - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (re-search-forward "(package-initialize\\_>" nil 'noerror)))) - ;; Don't visit the file if we don't have to. - (with-temp-buffer - (insert-file-contents user-init-file) - (goto-char (point-min)) - (re-search-forward "(package-initialize\\_>" nil 'noerror))))) - (unless contains-init - (with-current-buffer (or buffer - (let ((delay-mode-hooks t) - (find-file-visit-truename t)) - (find-file-noselect user-init-file))) - (when buffer - (setq buffer-name (buffer-file-name)) - (set-visited-file-name (file-chase-links user-init-file))) - (save-excursion - (save-restriction - (widen) - (goto-char (point-min)) - (while (and (looking-at-p "[[:blank:]]*\\(;\\|$\\)") - (not (eobp))) - (forward-line 1)) - (insert - "\n" - ";; 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)) - (if buffer - (progn - (set-visited-file-name buffer-name) - (set-buffer-modified-p nil)) - (kill-buffer (current-buffer))))))))) - (setq package--init-file-ensured t)) - ;;;###autoload (defun package-install (pkg &optional dont-select) "Install the package PKG. diff --git a/lisp/startup.el b/lisp/startup.el index 8c36c19e82..69bc8fa781 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -312,6 +312,12 @@ see `tty-setup-hook'.") Currently this applies to: `emacs-startup-hook', `term-setup-hook', and `window-setup-hook'.") +(defvar early-init-file nil + "File name, including directory, of user's early init file. +See `user-init-file'. The only difference is that +`early-init-file' is not set during the course of evaluating the +early init file.") + (defvar keyboard-type nil "The brand of keyboard you are using. This variable is used to define the proper function and keypad @@ -870,6 +876,103 @@ If STYLE is nil, display appropriately for the terminal." (when standard-display-table (aset standard-display-table char nil))))))) +(defun load-user-init-file + (filename-function &optional alternate-filename-function load-defaults) + "Load a user init-file. +FILENAME-FUNCTION is called with no arguments and should return +the name of the init-file to load. If this file cannot be +loaded, and ALTERNATE-FILENAME-FUNCTION is non-nil, then it is +called with no arguments and should return the name of an +alternate init-file to load. If LOAD-DEFAULTS is non-nil, then +load default.el after the init-file. + +This function sets `user-init-file' to the name of the loaded +init-file, or to a default value if loading is not possible." + (let ((debug-on-error-from-init-file nil) + (debug-on-error-should-be-set nil) + (debug-on-error-initial + (if (eq init-file-debug t) + 'startup + init-file-debug))) + (let ((debug-on-error debug-on-error-initial) + ;; We create an anonymous function here so that we can call + ;; it in different contexts depending on the value of + ;; `debug-on-error'. + (read-init-file + (lambda () + (when init-file-user + (let ((init-file-name (funcall filename-function))) + + ;; If `user-init-file' is t, then `load' will store + ;; the name of the file that it loads into + ;; `user-init-file'. + (setq user-init-file t) + (load init-file-name 'noerror 'nomessage) + + (when (and (eq user-init-file t) alternate-filename-function) + (load (funcall alternate-filename-function) + 'noerror 'nomessage)) + + ;; If we did not find the user's init file, set + ;; user-init-file conclusively. Don't let it be + ;; set from default.el. + (when (eq user-init-file t) + (setq user-init-file init-file-name))) + + ;; If we loaded a compiled file, set `user-init-file' to + ;; the source version if that exists. + (when (equal (file-name-extension user-init-file) + "elc") + (let* ((source (file-name-sans-extension user-init-file)) + (alt (concat source ".el"))) + (setq source (cond ((file-exists-p alt) alt) + ((file-exists-p source) source) + (t nil))) + (when source + (when (file-newer-than-file-p source user-init-file) + (message "Warning: %s is newer than %s" + source user-init-file) + (sit-for 1)) + (setq user-init-file source)))) + + (when load-defaults + + ;; Prevent default.el from changing the value of + ;; `inhibit-startup-screen'. + (let ((inhibit-startup-screen nil)) + (load "default" 'noerror 'nomessage))))))) + ;; Now call our anonymous function. + (if init-file-debug + ;; Do this without a `condition-case' if the user wants to + ;; debug. + (funcall read-init-file) + (condition-case error + (funcall read-init-file) + (error + (display-warning + 'initialization + (format-message "\ +An error occurred while loading `%s':\n\n%s%s%s\n\n\ +To ensure normal operation, you should investigate and remove the +cause of the error in your initialization file. Start Emacs with +the `--debug-init' option to view a complete error backtrace." + user-init-file + (get (car error) 'error-message) + (if (cdr error) ": " "") + (mapconcat (lambda (s) (prin1-to-string s t)) + (cdr error) ", ")) + :warning) + (setq init-file-had-error t)))) + + ;; If we can tell that the init file altered debug-on-error, + ;; arrange to preserve the value that it set up. + (or (eq debug-on-error debug-on-error-initial) + (setq debug-on-error-should-be-set t + debug-on-error-from-init-file debug-on-error))) + + (when debug-on-error-should-be-set + (setq debug-on-error debug-on-error-from-init-file)))) + (defun command-line () "A subroutine of `normal-top-level'. Amongst another things, it parses the command-line arguments." @@ -1021,6 +1124,69 @@ please check its value") (and command-line-args (setcdr command-line-args args))) + ;; Warn for invalid user name. + (when init-file-user + (if (string-match "[~/:\n]" init-file-user) + (display-warning 'initialization + (format "Invalid user name %s" + init-file-user) + :error) + (if (file-directory-p (expand-file-name + ;; We don't support ~USER on MS-Windows + ;; and MS-DOS except for the current + ;; user, and always load .emacs from + ;; the current user's home directory + ;; (see below). So always check "~", + ;; even if invoked with "-u USER", or + ;; if $USER or $LOGNAME are set to + ;; something different. + (if (memq system-type '(windows-nt ms-dos)) + "~" + (concat "~" init-file-user)))) + nil + (display-warning 'initialization + (format "User %s has no home directory" + (if (equal init-file-user "") + (user-real-login-name) + init-file-user)) + :error)))) + + ;; Load the early init file, if found. + (load-user-init-file + (lambda () + (expand-file-name + "early-init" + (file-name-as-directory + (concat "~" init-file-user "/.emacs.d"))))) + (setq early-init-file user-init-file) + + ;; If any package directory exists, initialize the package system. + (and user-init-file + package-enable-at-startup + (catch 'package-dir-found + (let (dirs) + (if (boundp 'package-directory-list) + (setq dirs package-directory-list) + (dolist (f load-path) + (and (stringp f) + (equal (file-name-nondirectory f) "site-lisp") + (push (expand-file-name "elpa" f) dirs)))) + (push (if (boundp 'package-user-dir) + package-user-dir + (locate-user-emacs-file "elpa")) + dirs) + (dolist (dir dirs) + (when (file-directory-p dir) + (dolist (subdir (directory-files dir)) + (when (let ((subdir (expand-file-name subdir dir))) + (and (file-directory-p subdir) + (file-exists-p + (expand-file-name + (package--description-file subdir) + subdir)))) + (throw 'package-dir-found t))))))) + (package-initialize)) + ;; Make sure window system's init file was loaded in loadup.el if ;; using a window system. ;; Initialize the window-system only after processing the command-line @@ -1128,153 +1294,47 @@ please check its value") ;; the startup screen. (setq inhibit-startup-screen nil) - ;; Warn for invalid user name. - (when init-file-user - (if (string-match "[~/:\n]" init-file-user) - (display-warning 'initialization - (format "Invalid user name %s" - init-file-user) - :error) - (if (file-directory-p (expand-file-name - ;; We don't support ~USER on MS-Windows - ;; and MS-DOS except for the current - ;; user, and always load .emacs from - ;; the current user's home directory - ;; (see below). So always check "~", - ;; even if invoked with "-u USER", or - ;; if $USER or $LOGNAME are set to - ;; something different. - (if (memq system-type '(windows-nt ms-dos)) - "~" - (concat "~" init-file-user)))) - nil - (display-warning 'initialization - (format "User %s has no home directory" - (if (equal init-file-user "") - (user-real-login-name) - init-file-user)) - :error)))) - ;; Load that user's init file, or the default one, or none. - (let (debug-on-error-from-init-file - debug-on-error-should-be-set - (debug-on-error-initial - (if (eq init-file-debug t) 'startup init-file-debug))) - (let ((debug-on-error debug-on-error-initial) - ;; This function actually reads the init files. - (inner - (function - (lambda () - (if init-file-user - (let ((user-init-file-1 - (cond - ((eq system-type 'ms-dos) - (concat "~" init-file-user "/_emacs")) - ((not (eq system-type 'windows-nt)) - (concat "~" init-file-user "/.emacs")) - ;; Else deal with the Windows situation - ((directory-files "~" nil "^\\.emacs\\(\\.elc?\\)?$") - ;; Prefer .emacs on Windows. - "~/.emacs") - ((directory-files "~" nil "^_emacs\\(\\.elc?\\)?$") - ;; Also support _emacs for compatibility, but warn about it. - (push `(initialization - ,(format-message - "`_emacs' init file is deprecated, please use `.emacs'")) - delayed-warnings-list) - "~/_emacs") - (t ;; But default to .emacs if _emacs does not exist. - "~/.emacs")))) - ;; This tells `load' to store the file name found - ;; into user-init-file. - (setq user-init-file t) - (load user-init-file-1 t t) - - (when (eq user-init-file t) - ;; If we did not find ~/.emacs, try - ;; ~/.emacs.d/init.el. - (let ((otherfile - (expand-file-name - "init" - (file-name-as-directory - (concat "~" init-file-user "/.emacs.d"))))) - (load otherfile t t) - - ;; If we did not find the user's init file, - ;; set user-init-file conclusively. - ;; Don't let it be set from default.el. - (when (eq user-init-file t) - (setq user-init-file user-init-file-1)))) - - ;; If we loaded a compiled file, set - ;; `user-init-file' to the source version if that - ;; exists. - (when (and user-init-file - (equal (file-name-extension user-init-file) - "elc")) - (let* ((source (file-name-sans-extension user-init-file)) - (alt (concat source ".el"))) - (setq source (cond ((file-exists-p alt) alt) - ((file-exists-p source) source) - (t nil))) - (when source - (when (file-newer-than-file-p source user-init-file) - (message "Warning: %s is newer than %s" - source user-init-file) - (sit-for 1)) - (setq user-init-file source)))) - - (unless inhibit-default-init - (let ((inhibit-startup-screen nil)) - ;; Users are supposed to be told their rights. - ;; (Plus how to get help and how to undo.) - ;; Don't you dare turn this off for anyone - ;; except yourself. - (load "default" t t))))))))) - (if init-file-debug - ;; Do this without a condition-case if the user wants to debug. - (funcall inner) - (condition-case error - (progn - (funcall inner) - (setq init-file-had-error nil)) - (error - (display-warning - 'initialization - (format-message "\ -An error occurred while loading `%s':\n\n%s%s%s\n\n\ -To ensure normal operation, you should investigate and remove the -cause of the error in your initialization file. Start Emacs with -the `--debug-init' option to view a complete error backtrace." - user-init-file - (get (car error) 'error-message) - (if (cdr error) ": " "") - (mapconcat (lambda (s) (prin1-to-string s t)) - (cdr error) ", ")) - :warning) - (setq init-file-had-error t)))) - - (if (and deactivate-mark transient-mark-mode) - (with-current-buffer (window-buffer) - (deactivate-mark))) - - ;; If the user has a file of abbrevs, read it (unless -batch). - (when (and (not noninteractive) - (file-exists-p abbrev-file-name) - (file-readable-p abbrev-file-name)) - (quietly-read-abbrev-file abbrev-file-name)) - - ;; If the abbrevs came entirely from the init file or the - ;; abbrevs file, they do not need saving. - (setq abbrevs-changed nil) - - ;; If we can tell that the init file altered debug-on-error, - ;; arrange to preserve the value that it set up. - (or (eq debug-on-error debug-on-error-initial) - (setq debug-on-error-should-be-set t - debug-on-error-from-init-file debug-on-error))) - (if debug-on-error-should-be-set - (setq debug-on-error debug-on-error-from-init-file))) + (load-user-init-file + (lambda () + (cond + ((eq system-type 'ms-dos) + (concat "~" init-file-user "/_emacs")) + ((not (eq system-type 'windows-nt)) + (concat "~" init-file-user "/.emacs")) + ;; Else deal with the Windows situation. + ((directory-files "~" nil "^\\.emacs\\(\\.elc?\\)?$") + ;; Prefer .emacs on Windows. + "~/.emacs") + ((directory-files "~" nil "^_emacs\\(\\.elc?\\)?$") + ;; Also support _emacs for compatibility, but warn about it. + (push `(initialization + ,(format-message + "`_emacs' init file is deprecated, please use `.emacs'")) + delayed-warnings-list) + "~/_emacs") + (t ;; But default to .emacs if _emacs does not exist. + "~/.emacs"))) + (lambda () + (expand-file-name + "init" + (file-name-as-directory + (concat "~" init-file-user "/.emacs.d")))) + (not inhibit-default-init)) + + (when (and deactivate-mark transient-mark-mode) + (with-current-buffer (window-buffer) + (deactivate-mark))) + + ;; If the user has a file of abbrevs, read it (unless -batch). + (when (and (not noninteractive) + (file-exists-p abbrev-file-name) + (file-readable-p abbrev-file-name)) + (quietly-read-abbrev-file abbrev-file-name)) + + ;; If the abbrevs came entirely from the init file or the + ;; abbrevs file, they do not need saving. + (setq abbrevs-changed nil) ;; Do this here in case the init file sets mail-host-address. (and mail-host-address @@ -1296,33 +1356,6 @@ the `--debug-init' option to view a complete error backtrace." (eq face-ignored-fonts old-face-ignored-fonts)) (clear-face-cache))) - ;; If any package directory exists, initialize the package system. - (and user-init-file - package-enable-at-startup - (catch 'package-dir-found - (let (dirs) - (if (boundp 'package-directory-list) - (setq dirs package-directory-list) - (dolist (f load-path) - (and (stringp f) - (equal (file-name-nondirectory f) "site-lisp") - (push (expand-file-name "elpa" f) dirs)))) - (push (if (boundp 'package-user-dir) - package-user-dir - (locate-user-emacs-file "elpa")) - dirs) - (dolist (dir dirs) - (when (file-directory-p dir) - (dolist (subdir (directory-files dir)) - (when (let ((subdir (expand-file-name subdir dir))) - (and (file-directory-p subdir) - (file-exists-p - (expand-file-name - (package--description-file subdir) - subdir)))) - (throw 'package-dir-found t))))))) - (package-initialize)) - (setq after-init-time (current-time)) ;; Display any accumulated warnings after all functions in ;; `after-init-hook' like `desktop-read' have finalized possible diff --git a/src/lread.c b/src/lread.c index 7cacd47d51..d009bd0cd2 100644 --- a/src/lread.c +++ b/src/lread.c @@ -4922,7 +4922,7 @@ directory. These file names are converted to absolute at startup. */); If the file loaded had extension `.elc', and the corresponding source file exists, this variable contains the name of source file, suitable for use by functions like `custom-save-all' which edit the init file. -While Emacs loads and evaluates the init file, value is the real name +While Emacs loads and evaluates any init file, value is the real name of the file, regardless of whether or not it has the `.elc' extension. */); Vuser_init_file = Qnil; commit f21f8e6135c0a93a65433ca85831c60e9a8f5200 Author: Robert Pluim Date: Sat Feb 17 13:01:19 2018 +0200 Document 'desktop-files-not-to-save' * doc/emacs/misc.texi (Saving Emacs Sessions): Add description of 'desktop-files-not-to-save'. * lisp/desktop.el (desktop-files-not-to-save): Explain that the default value excludes buffers visiting remote files. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index ae6f9446f2..cfc689e464 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -2434,6 +2434,11 @@ To disable this, set @code{desktop-restore-frames} to @code{nil}. (See that variable's documentation for some related options that you can customize to fine-tune this behavior.) +@vindex desktop-files-not-to-save +Information about buffers visiting remote files is not saved by +default. Customize the variable @code{desktop-files-not-to-save} to +change this. + @vindex frameset-filter-alist When the desktop restores the frame and window configuration, it uses the recorded values of frame parameters, disregarding any diff --git a/lisp/desktop.el b/lisp/desktop.el index 069d273d1d..b98319bdcf 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -393,7 +393,8 @@ or `desktop-modes-not-to-save'." ;; Skip tramp and ange-ftp files (defcustom desktop-files-not-to-save "\\(^/[^/:]*:\\|(ftp)$\\)" - "Regexp identifying files whose buffers are to be excluded from saving." + "Regexp identifying files whose buffers are to be excluded from saving. +The default value excludes buffers visiting remote files." :type '(choice (const :tag "None" nil) regexp) :group 'desktop) commit d8917eba1c683d7e4fdbfc38ab52c7bc0025bdc6 Author: Eli Zaretskii Date: Sat Feb 17 11:59:36 2018 +0200 Improve documentation of Profiling features * doc/lispref/debugging.texi (Profiling): Improve the description of elp.el. Improve wording of the rest of the section. (Bug#30491) * lisp/emacs-lisp/elp.el (elp-instrument-list): Make the interactive invocation work. Doc fix. diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index bb022e4516..c08a382ef1 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -922,48 +922,61 @@ be cleaner to combine them. @cindex measuring resource usage @cindex memory usage -If your program is working correctly, but you want to make it run more -quickly or efficiently, the first thing to do is @dfn{profile} your -code so that you know how it is using resources. If you find that one -particular function is responsible for a significant portion of the -runtime, you can start looking for ways to optimize that piece. +If your program is working correctly, but not fast enough, and you +want to make it run more quickly or efficiently, the first thing to do +is @dfn{profile} your code so that you know where it spends most of +the execution time. If you find that one particular function is +responsible for a significant portion of the execution time, you can +start looking for ways to optimize that piece. Emacs has built-in support for this. To begin profiling, type @kbd{M-x profiler-start}. You can choose to profile by processor -usage, memory usage, or both. After doing some work, type -@kbd{M-x profiler-report} to display a summary buffer for each -resource that you chose to profile. The names of the report buffers -include the times at which the reports were generated, so you can -generate another report later on without erasing previous results. -When you have finished profiling, type @kbd{M-x profiler-stop} (there -is a small overhead associated with profiling). +usage, memory usage, or both. Then run the code you'd like to speed +up. After that, type @kbd{M-x profiler-report} to display a summary +buffer for each resource (cpu and memory) that you chose to profile. +The names of the report buffers include the times at which the reports +were generated, so you can generate another report later on without +erasing previous results. When you have finished profiling, type +@kbd{M-x profiler-stop} (there is a small overhead associated with +profiling, so we don't recommend leaving it active except when you are +actually running the code you want to examine). The profiler report buffer shows, on each line, a function that was -called, followed by how much resource (processor or memory) it used in -absolute and percentage times since profiling started. If a given +called, followed by how much resources (cpu or memory) it used in +absolute and percentage terms since profiling started. If a given line has a @samp{+} symbol at the left-hand side, you can expand that line by typing @kbd{@key{RET}}, in order to see the function(s) called by the higher-level function. Use a prefix argument (@kbd{C-u @key{RET}}) to see the whole call tree below a function. Pressing @kbd{@key{RET}} again will collapse back to the original state. -Press @kbd{j} or @kbd{mouse-2} to jump to the definition of a function. -Press @kbd{d} to view a function's documentation. -You can save a profile to a file using @kbd{C-x C-w}. -You can compare two profiles using @kbd{=}. +Press @kbd{j} or @kbd{mouse-2} to jump to the definition of a function +at point. Press @kbd{d} to view a function's documentation. You can +save a profile to a file using @kbd{C-x C-w}. You can compare two +profiles using @kbd{=}. @c FIXME reversed calltree? @cindex @file{elp.el} @cindex timing programs -The @file{elp} library offers an alternative approach. See the file -@file{elp.el} for instructions. +The @file{elp} library offers an alternative approach, which is useful +when you know in advance which Lisp function(s) you want to profile. +Using that library, you begin by setting @code{elp-function-list} to +the list of function symbols---those are the functions you want to +profile. Then type @w{@kbd{M-x elp-instrument-list @key{RET} nil +@key{RET}}} to arrange for profiling those functions. After running +the code you want to profile, invoke @w{@kbd{M-x elp-results}} to +display the current results. See the file @file{elp.el} for more +detailed instructions. This approach is limited to profiling +functions written in Lisp, it cannot profile Emacs primitives. @cindex @file{benchmark.el} @cindex benchmarking -You can check the speed of individual Emacs Lisp forms using the -@file{benchmark} library. See the functions @code{benchmark-run} and -@code{benchmark-run-compiled} in @file{benchmark.el}. +You can measure the time it takes to evaluate individual Emacs Lisp +forms using the @file{benchmark} library. See the macros +@code{benchmark-run} and @code{benchmark-run-compiled} in +@file{benchmark.el}. You can also use the @code{benchmark} command +for timing forms interactively. @c Not worth putting in the printed manual. @ifnottex diff --git a/lisp/emacs-lisp/benchmark.el b/lisp/emacs-lisp/benchmark.el index 589e76eaec..d74446c747 100644 --- a/lisp/emacs-lisp/benchmark.el +++ b/lisp/emacs-lisp/benchmark.el @@ -98,7 +98,8 @@ result. The overhead of the `lambda's is accounted for." ;;;###autoload (defun benchmark (repetitions form) "Print the time taken for REPETITIONS executions of FORM. -Interactively, REPETITIONS is taken from the prefix arg. +Interactively, REPETITIONS is taken from the prefix arg, and +the command prompts for the form to benchmark. For non-interactive use see also `benchmark-run' and `benchmark-run-compiled'." (interactive "p\nxForm: ") diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index dab17fd75b..954e7aa73a 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -278,8 +278,9 @@ Argument FUNSYM is the symbol of a defined function." (defun elp-instrument-list (&optional list) "Instrument, for profiling, all functions in `elp-function-list'. Use optional LIST if provided instead. -If called interactively, read LIST using the minibuffer." - (interactive "PList of functions to instrument: ") ;FIXME: Doesn't work?! +If called interactively, prompt for LIST in the minibuffer; +type \"nil\" to use `elp-function-list'." + (interactive "xList of functions to instrument: ") (unless (listp list) (signal 'wrong-type-argument (list 'listp list))) (mapcar #'elp-instrument-function (or list elp-function-list))) commit b228839af18c730d25df8755b8c2e45cccd9ce36 Author: Eli Zaretskii Date: Sat Feb 17 11:16:35 2018 +0200 Improve indexing of "performance" in ELisp manual * doc/lispref/debugging.texi (Profiling): * doc/lispref/edebug.texi (Coverage Testing): Improve indexing of features useful for performance analysis. (Bug#30490) diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 2b5f64827c..bb022e4516 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -918,6 +918,7 @@ be cleaner to combine them. @section Profiling @cindex profiling @cindex profile +@cindex performance analysis @cindex measuring resource usage @cindex memory usage diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 39430deb48..b58f8aaa4f 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -898,7 +898,7 @@ lines inserted. @cindex coverage testing (Edebug) @cindex frequency counts -@cindex performance analysis +@cindex performance analysis (Edebug) Edebug provides rudimentary coverage testing and display of execution frequency. commit ab67b3e44bc9cc0230406ebef9291a731da9ebe1 Author: Eli Zaretskii Date: Sat Feb 17 10:28:29 2018 +0200 Minor change in Emacs manual's VC chapter * doc/emacs/maintaining.texi (Log Buffer): Mention the "Summary" header. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index e806b270f6..541bf9708b 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -659,11 +659,10 @@ Author: J. R. Hacker @noindent Apart from the @samp{Author} header, Emacs recognizes the headers -@samp{Date} (a manually-specified commit time) and @samp{Fixes} (a -reference to a bug fixed by the change). Not all version control -systems recognize all headers: Bazaar recognizes all three headers, -while Git, Mercurial, and Monotone recognize only @samp{Author} and -@samp{Date}. If you specify a header for a system that does not +@samp{Summary} (a one-line summary of the changeset), @samp{Date} (a +manually-specified commit time), and @samp{Fixes} (a reference to a +bug fixed by the change). Not all version control systems recognize +all headers. If you specify a header for a system that does not support it, the header is treated as part of the log entry. @kindex C-c C-f @r{(Log Edit mode)} commit c352434ab89617b48c7c1f29342a22e5a5685504 Author: Noam Postavsky Date: Thu Feb 15 22:13:51 2018 -0500 Avoid memory corruption with specpdl overflow + edebug (Bug#30481) If grow_specpdl fails due to outgrowing max_specpdl_size, it will signal an error *before* growing the specpdl array. Therefore, when handling the signal, specpdl_ptr points past the end of the specpdl array and any further use of of specpdl before unwinding (e.g., if edebug binds signal-hook-function) will cause memory corruption. * src/eval.c (signal_or_quit): Don't call `signal-hook-function' if the specpdl_ptr is already past the end of the specpdl array. * test/src/eval-tests.el (eval-tests--exceed-specbind-limit) (eval-exceed-specbind-with-signal-hook): New test & helper function. diff --git a/src/eval.c b/src/eval.c index e05a17f7b4..ca1eb84ff3 100644 --- a/src/eval.c +++ b/src/eval.c @@ -1553,7 +1553,10 @@ signal_or_quit (Lisp_Object error_symbol, Lisp_Object data, bool keyboard_quit) /* This hook is used by edebug. */ if (! NILP (Vsignal_hook_function) - && ! NILP (error_symbol)) + && ! NILP (error_symbol) + /* Don't try to call a lisp function if we've already overflowed + the specpdl stack. */ + && specpdl_ptr < specpdl + specpdl_size) { /* Edebug takes care of restoring these variables when it exits. */ if (lisp_eval_depth + 20 > max_lisp_eval_depth) diff --git a/test/src/eval-tests.el b/test/src/eval-tests.el index 201382da9c..e68fd13611 100644 --- a/test/src/eval-tests.el +++ b/test/src/eval-tests.el @@ -79,4 +79,24 @@ Bug#24912 and Bug#24913." (let ((clauses (list '((progn (setcdr clauses "ouch") nil))))) (should-error (eval (cons 'cond clauses))))) +(defun eval-tests--exceed-specbind-limit () + (defvar eval-tests--var1) + (defvar eval-tests--var2) + ;; Bind two variables, to make extra sure we hit the + ;; `max-specpdl-size' limit before the `max-lisp-eval-depth' limit. + (let ((eval-tests--var1 1) + (eval-tests--var2 2)) + ;; Recurse until we hit the limit. + (eval-tests--exceed-specbind-limit))) + +(ert-deftest eval-exceed-specbind-with-signal-hook () + "Test for Bug#30481. +Check that Emacs doesn't crash when exceeding specbind limit with +`signal-hook-function' bound. NOTE: Without the fix for +Bug#30481, this test can appear to pass, but cause a +crash/abort/malloc assert failure on the next test." + (let ((max-specpdl-size (/ max-lisp-eval-depth 2)) + (signal-hook-function #'ignore)) + (should-error (eval-tests--exceed-specbind-limit)))) + ;;; eval-tests.el ends here commit 593bbdaf0b890924e9d10918ba6de206bddc2eb6 Author: Noam Postavsky Date: Tue Feb 13 22:10:03 2018 -0500 Document comment-fill-column in the manual (Bug#11636) * doc/emacs/programs.texi (Comment Commands) (Options for Comments): Mention comment-fill-column. diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 4d515f29b6..bafe5cc87b 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -999,13 +999,13 @@ the line is blank (i.e., empty or containing only whitespace characters), the comment is indented to the same position where @kbd{@key{TAB}} would indent to (@pxref{Basic Indent}). If the line is non-blank, the comment is placed after the last non-whitespace -character on the line; normally, Emacs tries putting it at the column -specified by the variable @code{comment-column} (@pxref{Options for -Comments}), but if the line already extends past that column, it puts -the comment at some suitable position, usually separated from the -non-comment text by at least one space. In each case, Emacs places -point after the comment's starting delimiter, so that you can start -typing the comment text right away. +character on the line. Emacs tries to fit the comment between the +columns specified by the variables @code{comment-column} and +@code{comment-fill-column} (@pxref{Options for Comments}), if +possible. Otherwise, it will choose some other suitable position, +usually separated from the non-comment text by at least one space. In +each case, Emacs places point after the comment's starting delimiter, +so that you can start typing the comment text right away. You can also use @kbd{M-;} to align an existing comment. If a line already contains the comment-start string, @kbd{M-;} realigns it to @@ -1098,13 +1098,16 @@ comment. Enable the @code{comment-close-slash} clean-up for this. @subsection Options Controlling Comments @vindex comment-column +@vindex comment-fill-column @kindex C-x ; @findex comment-set-column As mentioned in @ref{Comment Commands}, when the @kbd{M-j} command -adds a comment to a line, it tries to place the comment at the column -specified by the buffer-local variable @code{comment-column}. You can -set either the local value or the default value of this buffer-local -variable in the usual way (@pxref{Locals}). Alternatively, you can +adds a comment to a line, it tries to place the comment between the +columns specified by the buffer-local variables @code{comment-column} +and @code{comment-fill-column} (or if that is @code{nil}, then the +value of @code{fill-column}, @pxref{Fill Commands}). You can set +either the local value or the default value of these buffer-local +variables in the usual way (@pxref{Locals}). Alternatively, you can type @kbd{C-x ;} (@code{comment-set-column}) to set the value of @code{comment-column} in the current buffer to the column where point is currently located. @kbd{C-u C-x ;} sets the comment column to commit bd4cc8d5647627b11db9be4483fc6a331b961d4f Author: Glenn Morris Date: Fri Feb 16 17:03:13 2018 -0800 * doc/emacs/dired.texi (Marks vs Flags): Copyedits. diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 94a10feab4..a47123aa6c 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -578,9 +578,9 @@ command will look in the buffer without revisiting the file, so the results might be inconsistent with the file on disk if its contents have changed since it was last visited. If you don't want this, you may wish to revert the files you have visited in your buffers, or to turn on -the @code{auto-revert} mode in those buffers, before invoking this -command. @xref{Reverting}. If you prefer that this command always -revisits the file, without having to revert the file or enable +@code{auto-revert} mode in those buffers, before invoking this +command. @xref{Reverting}. If you prefer that this command should always +revisit the file, without you having to revert the file or enable @code{auto-revert} mode, you might want to set @code{dired-always-read-filesystem} to non-@code{nil}. commit 69107f347b3ac7f51cd22333f57393fd735915f2 Author: Glenn Morris Date: Fri Feb 16 17:33:57 2018 -0500 ; Fix doc typos related to indefinite articles diff --git a/admin/grammars/c.by b/admin/grammars/c.by index 4a52bec07f..3755c32322 100644 --- a/admin/grammars/c.by +++ b/admin/grammars/c.by @@ -917,8 +917,8 @@ variablearg-opt-name ( ,$1 ) | semantic-list arg-list ( (car ( EXPAND $1 function-pointer )) $2) - ;; Klaus Berndl: This allows variableargs without a arg-name being - ;; parsed correct even if there several pointers (*) + ;; Klaus Berndl: This allows variableargs without an arg-name being + ;; parsed correctly even if there several pointers (*) | opt-stars ( "" ,$1 nil nil nil ) ; diff --git a/admin/notes/unicode b/admin/notes/unicode index 85ba67bc50..ff0de8aeff 100644 --- a/admin/notes/unicode +++ b/admin/notes/unicode @@ -85,7 +85,7 @@ regard to completeness. code (keymap.c and print.c). * Rationalize character syntax and its relationship to the Unicode - database. (Applies mainly to symbol an punctuation syntax.) + database. (Applies mainly to symbol and punctuation syntax.) * Fontset handling and customization needs work. We want to relate fonts to scripts, probably based on the Unicode blocks. The diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi index 3f43b1bb3b..a572fc702b 100644 --- a/doc/lispref/buffers.texi +++ b/doc/lispref/buffers.texi @@ -667,7 +667,7 @@ reason. @defun ask-user-about-supersession-threat filename This function is used to ask a user how to proceed after an attempt to -modify an buffer visiting file @var{filename} when the file is newer +modify a buffer visiting file @var{filename} when the file is newer than the buffer text. Emacs detects this because the modification time of the file on disk is newer than the last save-time and its contents have changed. diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi index 318bb4474d..26135b81de 100644 --- a/doc/misc/gnus-faq.texi +++ b/doc/misc/gnus-faq.texi @@ -1449,7 +1449,7 @@ all those email addresses? @subsubheading Answer -There's an very basic solution for this, mail aliases. +There's a very basic solution for this, mail aliases. You can store your mail addresses in a ~/.mailrc file using a simple alias syntax: diff --git a/etc/CALC-NEWS b/etc/CALC-NEWS index 394894ad03..04baf41148 100644 --- a/etc/CALC-NEWS +++ b/etc/CALC-NEWS @@ -70,7 +70,7 @@ For changes in Emacs 23.1 and later, see the main Emacs NEWS file. * Version 2.02d: -** Fixed a minor installation problem with a Emacs 19.29 byte-compiler bug. +** Fixed a minor installation problem with an Emacs 19.29 byte-compiler bug. ** Removed archaic "macedit" package (superseded by "edmacro"). diff --git a/etc/ETAGS.EBNF b/etc/ETAGS.EBNF index 221078a88a..23bb9445ed 100644 --- a/etc/ETAGS.EBNF +++ b/etc/ETAGS.EBNF @@ -84,7 +84,7 @@ whether it is possible to deduce the tag name from the pattern, and make an unnamed tag in those cases. The name deduced from the pattern of an unnamed tag is the implicit name of that tag. When the user looks for a tag, and Emacs finds no explicit tag names -that match it, Emacs then looks for an tag whose implicit tag name +that match it, Emacs then looks for a tag whose implicit tag name matches the request. etags.c uses implicit tag names when possible, in order to reduce the size of the tags file. An implicit tag name is deduced from the pattern by discarding the diff --git a/etc/NEWS.20 b/etc/NEWS.20 index 3391d3e468..31e640fa94 100644 --- a/etc/NEWS.20 +++ b/etc/NEWS.20 @@ -4130,17 +4130,16 @@ is an alternative to using the keymap itself. ** Changes in invisibility features *** Isearch can now temporarily show parts of the buffer which are -hidden by an overlay with a invisible property, when the search match +hidden by an overlay with an invisible property, when the search match is inside that portion of the buffer. To enable this the overlay -should have a isearch-open-invisible property which is a function that -would be called having the overlay as an argument, the function should -make the overlay visible. +should have an isearch-open-invisible property, which is a function that +would be called with the overlay as an argument, and should make it visible. During incremental search the overlays are shown by modifying the -invisible and intangible properties, if beside this more actions are -needed the overlay should have a isearch-open-invisible-temporary -which is a function. The function is called with 2 arguments: one is -the overlay and the second is nil when it should show the overlay and +invisible and intangible properties. If more actions are +needed, the overlay should have an isearch-open-invisible-temporary property, +which is a function. The function is called with 2 arguments: one is +the overlay, and the second is nil when it should show the overlay and t when it should hide it. *** add-to-invisibility-spec, remove-from-invisibility-spec diff --git a/etc/NEWS.21 b/etc/NEWS.21 index 04bde7e3ae..ea4f4212ee 100644 --- a/etc/NEWS.21 +++ b/etc/NEWS.21 @@ -4348,7 +4348,7 @@ integer. This is a required property. `:pt-height HEIGHT' HEIGHT specifies the height of the image in pt (1/72 inch). HEIGHT -must be a integer. This is an required property. +must be an integer. This is a required property. `:bounding-box BOX' @@ -4868,7 +4868,7 @@ temporarily to nil, for example (enlarge-window 10)) Likewise, an attempt to split a fixed-height window vertically, -or a fixed-width window horizontally results in a error. +or a fixed-width window horizontally results in an error. ** The cursor-type frame parameter is now supported on MS-DOS terminals. When Emacs starts, it by default changes the cursor shape diff --git a/etc/NEWS.22 b/etc/NEWS.22 index c1009fc0d0..26054d2c39 100644 --- a/etc/NEWS.22 +++ b/etc/NEWS.22 @@ -4895,7 +4895,7 @@ described above and specifies the total height of the line, causing a varying number of pixels to be inserted after the line to make it line exactly that many pixels high. -If the `line-spacing' property value is an positive integer, the value +If the `line-spacing' property value is a positive integer, the value is used as additional pixels to insert after the display line; this overrides the default frame `line-spacing' and any buffer local value of the `line-spacing' variable. diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index e7e60bea27..12eab44f0f 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -148,7 +148,7 @@ directories in published site-maps. **** Scheme: support for tables **** Scheme: new variable: ~org-babel-scheme-null-to~ -This new custom option allows to use a empty list or null symbol to +This new custom option allows you to use an empty list or null symbol to format the table output, initially assigned to ~hlines~. **** Scheme: new header ~:prologue~ diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 70e6bdf434..c1c8e196ea 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -631,7 +631,7 @@ Todo mode revisit this file or, with option file was last visited. If you call this command before you have created any todo file in -the current format, and you have an todo file in old format, it +the current format, and you have a todo file in old format, it will ask you whether to convert that file and show it. Otherwise, calling this command before any todo file exists prompts for a file name and an initial category (defaulting to diff --git a/lisp/cedet/semantic/analyze.el b/lisp/cedet/semantic/analyze.el index 2162df455a..1abf785834 100644 --- a/lisp/cedet/semantic/analyze.el +++ b/lisp/cedet/semantic/analyze.el @@ -121,7 +121,7 @@ See `semantic-analyze-scoped-tags' for details.") :type buffer :documentation "The buffer this context is derived from.") (errors :initarg :errors - :documentation "Any errors thrown an caught during analysis.") + :documentation "Any errors thrown and caught during analysis.") ) "Base analysis data for any context.") diff --git a/lisp/cedet/semantic/dep.el b/lisp/cedet/semantic/dep.el index 6f1bde0209..640884d014 100644 --- a/lisp/cedet/semantic/dep.el +++ b/lisp/cedet/semantic/dep.el @@ -67,7 +67,7 @@ For mode authors, use `defcustom-mode-local-semantic-dependency-system-include-path' to create a mode-specific variable to control this. -When searching for a file associated with a name found in an tag of +When searching for a file associated with a name found in a tag of class include, this path will be inspected for includes of type `system'. Some include tags are agnostic to this setting and will check both the project and system directories.") diff --git a/lisp/cedet/semantic/lex.el b/lisp/cedet/semantic/lex.el index 3a8b0c7800..81dfc055f2 100644 --- a/lisp/cedet/semantic/lex.el +++ b/lisp/cedet/semantic/lex.el @@ -408,7 +408,7 @@ TYPE name does not exist. Otherwise signal an error." SPECS must be a list of (TYPE . TOKENS) elements, where: TYPE is the name of the type symbol to define. - TOKENS is an list of (TOKSYM . MATCHER) elements, where: + TOKENS is a list of (TOKSYM . MATCHER) elements, where: TOKSYM is any lexical token symbol. MATCHER is a string or regexp a text must match to be a such diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 853e9cb2ac..c56502236e 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1766,7 +1766,7 @@ with PKG-DESC entry removed." "Return a list of dependencies for PACKAGE sorted by dependency. PACKAGE is included as the first element of the returned list. ONLY is an alist associating package names to package objects. -Only these packages will be in the return value an their cdrs are +Only these packages will be in the return value and their cdrs are destructively set to nil in ONLY." (let ((out)) (dolist (dep (package-desc-reqs package)) diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 6f28569fc3..29d3bc5864 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -1835,7 +1835,7 @@ If SYNTACTIC-KEYWORDS is non-nil, it means these keywords are used for (eval keywords))))) (defun font-lock-value-in-major-mode (values) - "If VALUES is an list, use `major-mode' as a key and return the `assq' value. + "If VALUES is a list, use `major-mode' as a key and return the `assq' value. VALUES should then be an alist on the form ((MAJOR-MODE . VALUE) ...) where MAJOR-MODE may be t. If VALUES isn't a list, return VALUES." diff --git a/lisp/gnus/deuglify.el b/lisp/gnus/deuglify.el index ce3ead3568..d2bc87caa2 100644 --- a/lisp/gnus/deuglify.el +++ b/lisp/gnus/deuglify.el @@ -284,7 +284,7 @@ :group 'gnus-outlook-deuglify) (defcustom gnus-outlook-display-hook nil - "A hook called after an deuglified article has been prepared. + "A hook called after a deuglified article has been prepared. It is run after `gnus-article-prepare-hook'." :version "22.1" :type 'hook diff --git a/lisp/gnus/gnus-cus.el b/lisp/gnus/gnus-cus.el index d265fd5245..0bac2cb1ad 100644 --- a/lisp/gnus/gnus-cus.el +++ b/lisp/gnus/gnus-cus.el @@ -365,7 +365,7 @@ category.")) (unless (or group topic) (error "No group on current line")) (when (and group topic) - (error "Both a group an topic on current line")) + (error "Both a group and topic on current line")) (unless (or topic (setq info (gnus-get-info group))) (error "Killed group; can't be edited")) ;; Ready. diff --git a/lisp/image/gravatar.el b/lisp/image/gravatar.el index e611e965ab..a6e65c39c9 100644 --- a/lisp/image/gravatar.el +++ b/lisp/image/gravatar.el @@ -60,11 +60,11 @@ "Base URL for getting gravatars.") (defun gravatar-hash (mail-address) - "Create an hash from MAIL-ADDRESS." + "Create a hash from MAIL-ADDRESS." (md5 (downcase mail-address))) (defun gravatar-build-url (mail-address) - "Return an URL to retrieve MAIL-ADDRESS gravatar." + "Return a URL to retrieve MAIL-ADDRESS gravatar." (format "%s/%s?d=404&r=%s&s=%d" gravatar-base-url (gravatar-hash mail-address) diff --git a/lisp/net/mailcap.el b/lisp/net/mailcap.el index 9fbc882fdc..f0694b79ea 100644 --- a/lisp/net/mailcap.el +++ b/lisp/net/mailcap.el @@ -92,7 +92,7 @@ replaced with the file. MIME-TYPE is a regular expression being matched against the actual MIME type. It is implicitly surrounded with ^ and $. -TEST is an lisp form which is evaluated in order to test if the +TEST is a lisp form which is evaluated in order to test if the entry should be chosen. The `test' entry is optional. When selecting a viewer for a given MIME type, the first viewer @@ -555,7 +555,7 @@ MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus (defun mailcap-mailcap-entry-passes-test (info) "Replace the test clause of INFO itself with a boolean for some cases. This function supports only `test -n $DISPLAY' and `test -z $DISPLAY', -replaces them with t or nil. As for others or if INFO has a interactive +replaces them with t or nil. As for others or if INFO has an interactive spec (needsterm, needsterminal, or needsx11) but DISPLAY is not set, the test clause will be unchanged." (let ((test (assq 'test info)) ; The test clause diff --git a/lisp/org/ob-calc.el b/lisp/org/ob-calc.el index f491a6cdef..4ed5dd4be0 100644 --- a/lisp/org/ob-calc.el +++ b/lisp/org/ob-calc.el @@ -37,7 +37,7 @@ (declare-function org-trim "org" (s &optional keep-lead)) (defvar org-babel-default-header-args:calc nil - "Default arguments for evaluating an calc source block.") + "Default arguments for evaluating a calc source block.") (defun org-babel-expand-body:calc (body _params) "Expand BODY according to PARAMS, return the expanded body." body) diff --git a/lisp/org/org-clock.el b/lisp/org/org-clock.el index 9bc1f0c06d..4c5fcc64b0 100644 --- a/lisp/org/org-clock.el +++ b/lisp/org/org-clock.el @@ -1394,7 +1394,7 @@ the default behavior." ;;;###autoload (defun org-clock-in-last (&optional arg) "Clock in the last closed clocked item. -When already clocking in, send an warning. +When already clocking in, send a warning. With a universal prefix argument, select the task you want to clock in from the last clocked in tasks. With two universal prefix arguments, start clocking using the diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el index e0c51662d1..cdee568fc8 100644 --- a/lisp/org/ox-odt.el +++ b/lisp/org/ox-odt.el @@ -600,8 +600,7 @@ allow document of a given class (irrespective of its source format) to be converted to any of the export formats associated with that class. -See default setting of this variable for an typical -configuration." +See default setting of this variable for a typical configuration." :group 'org-export-odt :version "24.1" :type @@ -1938,7 +1937,7 @@ holding contextual information." (defun org-odt-format-inlinetask-default-function (todo todo-type priority name tags contents) - "Default format function for a inlinetasks. + "Default format function for inlinetasks. See `org-odt-format-inlinetask-function' for details." (format "\n%s" "Text_20_body" diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index c9e1cf2427..e039020d36 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -3295,7 +3295,7 @@ comment at the start of cc-engine.el for more info." (point) here))) pa+1 ; pos just after an opening PAren (or brace). - (ren+1 from) ; usually a pos just after an closing paREN etc. + (ren+1 from) ; usually a pos just after a closing paREN etc. ; Is actually the pos. to scan for a (/{/[ from, ; which sometimes is after a silly )/}/]. paren+1 ; Pos after some opening or closing paren. diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index ae212bd8f8..d20c579f66 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -2774,7 +2774,7 @@ local variable." ;; Our start must be between them (goto-char last) - ;; Find an beginning-of-stmt that's not in a comment + ;; Find a beginning-of-stmt that's not in a comment (while (and (re-search-forward regexp next t 1) (nth 7 (syntax-ppss))) (goto-char (match-end 0))) diff --git a/lisp/term/README b/lisp/term/README index d5453e1a8a..4ab1a4300d 100644 --- a/lisp/term/README +++ b/lisp/term/README @@ -60,7 +60,7 @@ they'll frustrate you after you've forgotten about them. For another, the X keysyms provide a standard set of names that Emacs knows about. It tries to bind many of them to useful things at startup, before your .emacs is read (so you can override them). In some ways, the X keysym standard -is a admittedly poor one; it's incomplete, and not well matched to the set of +is an admittedly poor one; it's incomplete, and not well matched to the set of 'virtual keys' that UNIX terminfo(3) provides. But, trust us, the alternatives were worse. diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index 353d4352f6..5568bbb1d9 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1732,7 +1732,7 @@ FLYSPELL-BUFFER." ;;*---------------------------------------------------------------------*/ ;;* flyspell-properties-at-p ... */ ;;* ------------------------------------------------------------- */ -;;* Is there an highlight properties at position pos? */ +;;* Is there a highlight property at position pos? */ ;;*---------------------------------------------------------------------*/ (defun flyspell-properties-at-p (pos) "Return t if there is a text property at POS, not counting `local-map'. diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 8828236e3e..bee7f8069e 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -1229,7 +1229,7 @@ When not inside a field, signal an error." (save-restriction ;; `widget-narrow-to-field' can be ;; active when this function is called - ;; from an change-functions hook. So + ;; from a change-functions hook. So ;; temporarily remove field narrowing ;; before to call `get-char-property'. (widen) @@ -1802,7 +1802,7 @@ If END is omitted, it defaults to the length of LIST." ;;; The `url-link' Widget. (define-widget 'url-link 'link - "A link to an www page." + "A link to a web page." :action 'widget-url-link-action) (defun widget-url-link-action (widget &optional _event) diff --git a/src/.gdbinit b/src/.gdbinit index db7185bc45..cc06b2e11c 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -564,7 +564,7 @@ define pgi end document pgi Pretty print glyph structure glyph[I]. -Takes one argument, a integer I. +Takes one argument, an integer I. end define pgn diff --git a/src/coding.c b/src/coding.c index 582b9268db..e756ba169d 100644 --- a/src/coding.c +++ b/src/coding.c @@ -3980,7 +3980,7 @@ decode_coding_iso_2022 (struct coding_system *coding) /* Reset the invocation and designation status to the safest one; i.e. designate ASCII to the graphic register 0, and invoke that register to the graphic plane 0. This typically - helps the case that an designation sequence for ASCII "ESC ( + helps the case that a designation sequence for ASCII "ESC ( B" is somehow broken (e.g. broken by a newline). */ CODING_ISO_INVOCATION (coding, 0) = 0; CODING_ISO_DESIGNATION (coding, 0) = charset_ascii; diff --git a/src/process.c b/src/process.c index c561d01060..bccc3ac399 100644 --- a/src/process.c +++ b/src/process.c @@ -3724,7 +3724,7 @@ setting of the remote datagram address. When specified for a client process, the FAMILY, HOST, and SERVICE args are ignored. The format of ADDRESS depends on the address family: -- An IPv4 address is represented as an vector of integers [A B C D P] +- An IPv4 address is represented as a vector of integers [A B C D P] corresponding to numeric IP address A.B.C.D and port number P. - A local address is represented as a string with the address in the local address space. diff --git a/src/xsettings.c b/src/xsettings.c index ac2d86f592..81c8f9b291 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -53,7 +53,7 @@ static char *current_font; static struct x_display_info *first_dpyinfo; static Lisp_Object current_tool_bar_style; -/* Store an config changed event in to the event queue. */ +/* Store a config changed event in to the event queue. */ static void store_config_changed_event (Lisp_Object arg, Lisp_Object display_name) commit aaad1e62f3e87873135a465530d6686bed5dc4c3 Merge: 5906418b5b 9ab3df197f Author: Eli Zaretskii Date: Fri Feb 16 23:38:32 2018 +0200 Merge branch 'emacs-26' of git.savannah.gnu.org:/srv/git/emacs into emacs-26 commit 5906418b5b627245dc79137bbf2b41c59b6ba211 Author: Eli Zaretskii Date: Fri Feb 16 23:37:38 2018 +0200 More fixes for the Emacs manual * doc/emacs/vc1-xtra.texi (Customizing VC): Update the list of backends. * doc/emacs/maintaining.texi (Version Control): Add SRC to the list of VCS. Remove the description of vc-state-refresh. (Version Control Systems): Update the description of CVS. (VC Change Log): Amend the list of VCS that don't support vc0print-root-log. (VCS Changesets, VCS Repositories, Advanced C-x v v) (VC Change Log): Mention SRC with RCS where appropriate. (VC Directory Commands): More accurate description of vc-dir-hide-up-to-date. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 1234db84b2..e806b270f6 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -60,8 +60,8 @@ changed. The Emacs version control interface is called @dfn{VC}@. VC commands work with several different version control systems; currently, it supports Bazaar, CVS, Git, Mercurial, Monotone, RCS, -SCCS/CSSC, and Subversion. Of these, the GNU project distributes CVS, -RCS, and Bazaar. +SRC, SCCS/CSSC, and Subversion. Of these, the GNU project distributes +CVS, RCS, and Bazaar. VC is enabled automatically whenever you visit a file governed by a version control system. To disable VC entirely, set the customizable @@ -80,9 +80,7 @@ current buffer, use the command @code{vc-refresh-state}. This command is useful when you perform version control commands outside Emacs (e.g., from the shell prompt), or if you put the buffer's file under a different version control system, or remove it from version control -entirely. A companion command @code{vc-state-refresh} does the same, -but does not consider switching the version control system or removal -from VC. +entirely. @menu * Introduction to VC:: How version control works in general. @@ -185,12 +183,12 @@ everything you can do with RCS can be done through VC. @cindex CVS @item -CVS is the free version control system that was, until recently (circa -2008), used by the majority of free software projects. Nowadays, it -is slowly being superseded by newer systems. CVS allows concurrent -multi-user development either locally or over the network. Unlike -newer systems, it lacks support for atomic commits and file -moving/renaming. VC supports all basic editing operations under CVS. +CVS is the free version control system that was, until circa 2008, +used by the majority of free software projects. Since then, it has +been superseded by newer systems. CVS allows concurrent multi-user +development either locally or over the network. Unlike newer systems, +it lacks support for atomic commits and file moving/renaming. VC +supports all basic editing operations under CVS. @cindex SVN @cindex Subversion @@ -322,13 +320,14 @@ possible. @subsubsection Changeset-based vs File-based Version Control @cindex file-based version control - On SCCS, RCS, CVS, and other early version control systems, version -control operations are @dfn{file-based}: each file has its own comment -and revision history separate from that of all other files. Newer -systems, beginning with Subversion, are @dfn{changeset-based}: a -commit may include changes to several files, and the entire set of -changes is handled as a unit. Any comment associated with the change -does not belong to a single file, but to the changeset itself. + On SCCS, RCS, CVS, and other early version control systems (and also +in SRC), version control operations are @dfn{file-based}: each file +has its own comment and revision history separate from that of all +other files. Newer systems, beginning with Subversion, are +@dfn{changeset-based}: a commit may include changes to several files, +and the entire set of changes is handled as a unit. Any comment +associated with the change does not belong to a single file, but to +the changeset itself. @cindex changeset-based version control Changeset-based version control is more flexible and powerful than @@ -344,7 +343,7 @@ all of it. @cindex distributed version control Early version control systems were designed around a @dfn{centralized} model in which each project has only one repository -used by all developers. SCCS, RCS, CVS, and Subversion share this +used by all developers. SCCS, RCS, CVS, Subversion, and SRC share this kind of model. One of its drawbacks is that the repository is a choke point for reliability and efficiency. @@ -526,7 +525,7 @@ desired log entry for the new revision, followed by @kbd{C-c C-c} to commit. @xref{Log Buffer}. If committing to a shared repository, the commit may fail if the -repository that has been changed since your last update. In that +repository has been changed since your last update. In that case, you must perform an update before trying again. On a decentralized version control system, use @kbd{C-x v +} (@pxref{Pulling / Pushing}) or @kbd{C-x v m} (@pxref{Merging}). @@ -609,7 +608,7 @@ if the fileset can be managed by more than one version control system, and Emacs fails to detect the correct one. @item -Otherwise, if using CVS or RCS, you can specify a revision ID. +Otherwise, if using CVS, RCS or SRC, you can specify a revision ID. If the fileset is modified (or locked), this makes Emacs commit with that revision ID@. You can create a new branch by supplying an @@ -969,9 +968,9 @@ file listed on the current line. @findex log-view-toggle-entry-display @kbd{C-x v L} (@code{vc-print-root-log}) displays a @file{*vc-change-log*} buffer showing the history of the entire -version-controlled directory tree (RCS, SCCS, and CVS do not support -this feature). With a prefix argument, the command prompts for the -maximum number of revisions to display. +version-controlled directory tree (RCS, SCCS, CVS, and SRC do not +support this feature). With a prefix argument, the command prompts +for the maximum number of revisions to display. The @kbd{C-x v L} history is shown in a compact form, usually showing only the first line of each log entry. However, you can type @@ -1048,7 +1047,7 @@ if you set the value to zero, that removes the limit. You can also increase the number of revisions shown in an existing @file{*vc-change-log*} buffer by clicking on the @samp{Show 2X entries} or @samp{Show unlimited entries} buttons at the end of the -buffer. However, RCS, SCCS, and CVS do not support this feature. +buffer. However, RCS, SCCS, CVS, and SRC do not support this feature. @kindex C-x v h @findex vc-region-history @@ -1189,7 +1188,7 @@ but is not yet committed, while @file{temp.txt} is not under version control (@pxref{Registering}). The @samp{*} characters next to the entries for @file{README} and -@file{src/main.c} indicate that the user has marked out these files as +@file{src/main.c} indicate that the user has marked these files as the current VC fileset @iftex (see below). @@ -1280,7 +1279,7 @@ point is on a directory entry, unmark all files in that directory tree files and directories. @item x -Hide files with @samp{up-to-date} status +Hide files with @samp{up-to-date} or @samp{ignored} status (@code{vc-dir-hide-up-to-date}). With a prefix argument, hide items whose state is that of the item at point. @end table @@ -1352,7 +1351,7 @@ Switch to a branch (@code{vc-retrieve-tag}). @xref{Switching Branches}. context menu invoked by @kbd{mouse-2}. Furthermore, some VC backends use the menu to provide extra backend-specific commands. For example, Git and Bazaar allow you to manipulate @dfn{stashes} and @dfn{shelves} -(where are a way to temporarily put aside uncommitted changes, and +(which are a way to temporarily put aside uncommitted changes, and bring them back at a later time). @node Branches @@ -1517,7 +1516,7 @@ is shown in a separate buffer. prompts for a branch ID, or a pair of revision IDs (@pxref{Switching Branches}); then it finds the changes from that branch, or the changes between the two revisions you specified, and merges those changes into -the current VC fileset. If you just type @key{RET}, Emacs simply +the current VC fileset. If you just type @kbd{@key{RET}}, Emacs simply merges any changes that were made on the same branch since you checked the file out. diff --git a/doc/emacs/vc1-xtra.texi b/doc/emacs/vc1-xtra.texi index 7a4b8e4701..35dd6d1235 100644 --- a/doc/emacs/vc1-xtra.texi +++ b/doc/emacs/vc1-xtra.texi @@ -113,8 +113,9 @@ Prompt for a file name, delete the file from the working tree, and schedule the deletion for committing. @item M-x vc-rename-file -Prompt for two file names, @var{var} and @var{old}, rename them in the -working tree, and schedule the renaming for committing. +Prompt for two file names, @var{old} and @var{new}, rename them in the +working tree, and schedule the renaming for committing. The @var{old} +file defaults to the current buffer's file name if it is under VC. @end table @findex vc-delete-file @@ -268,7 +269,7 @@ with the file's version control type. @vindex vc-handled-backends The variable @code{vc-handled-backends} determines which version control systems VC should handle. The default value is @code{(RCS CVS -SVN SCCS Bzr Git Hg Mtn Arch)}, so it contains all the version systems +SVN SCCS SRC Bzr Git Hg Mtn)}, so it contains all the version systems that are currently supported. If you want VC to ignore one or more of these systems, exclude its name from the list. To disable VC entirely, set this variable to @code{nil}. commit 9ab3df197f1ee7f23df30f554209b863369f06ee Author: Glenn Morris Date: Fri Feb 16 16:33:36 2018 -0500 ; Fix doc typos related to indefinite articles diff --git a/src/character.c b/src/character.c index fa817a5031..deac1fa22e 100644 --- a/src/character.c +++ b/src/character.c @@ -983,7 +983,7 @@ alphabeticp (int c) || gen_cat == UNICODE_CATEGORY_Nl); } -/* Return true if C is a alphabetic or decimal-number character. */ +/* Return true if C is an alphabetic or decimal-number character. */ bool alphanumericp (int c) { diff --git a/src/character.h b/src/character.h index c716885d46..1f21b2ad33 100644 --- a/src/character.h +++ b/src/character.h @@ -693,7 +693,7 @@ INLINE int char_table_translate (Lisp_Object obj, int ch) { /* This internal function is expected to be called with valid arguments, - so there is a eassert instead of CHECK_xxx for the sake of speed. */ + so there is an eassert instead of CHECK_xxx for the sake of speed. */ eassert (CHAR_VALID_P (ch)); eassert (CHAR_TABLE_P (obj)); obj = CHAR_TABLE_REF (obj, ch); diff --git a/src/charset.c b/src/charset.c index cc61300b6b..05290e86b4 100644 --- a/src/charset.c +++ b/src/charset.c @@ -2332,7 +2332,7 @@ init_charset_once (void) Don't make the value so small that the table is reallocated during bootstrapping, as glibc malloc calls larger than just under 64 KiB during an initial bootstrap wreak havoc after dumping; see the - M_MMAP_THRESHOLD value in alloc.c, plus there is a extra overhead + M_MMAP_THRESHOLD value in alloc.c, plus there is an extra overhead internal to glibc malloc and perhaps to Emacs malloc debugging. */ static struct charset charset_table_init[180]; diff --git a/src/coding.c b/src/coding.c index a7b040e271..582b9268db 100644 --- a/src/coding.c +++ b/src/coding.c @@ -252,7 +252,7 @@ decode_coding_XXXX (struct coding_system *coding) CODING_RESULT_XXX indicating how the encoding finished. DST_BYTES zero means that source area and destination area are - overlapped, which means that we can produce a encoded text until it + overlapped, which means that we can produce an encoded text until it reaches at the head of not-yet-encoded source text. Below is a template of these functions. */ diff --git a/src/dbusbind.c b/src/dbusbind.c index 63dda58352..ec3707d18f 100644 --- a/src/dbusbind.c +++ b/src/dbusbind.c @@ -1401,7 +1401,7 @@ usage: (dbus-message-internal &rest REST) */) if ((mtype == DBUS_MESSAGE_TYPE_ERROR) && (!dbus_message_set_error_name (dmessage, DBUS_ERROR_FAILED))) - XD_SIGNAL1 (build_string ("Unable to create a error message")); + XD_SIGNAL1 (build_string ("Unable to create an error message")); } /* Check for timeout parameter. */ diff --git a/src/image.c b/src/image.c index 6e86083437..37416c1616 100644 --- a/src/image.c +++ b/src/image.c @@ -8281,7 +8281,7 @@ extern WandExport void PixelGetMagickColor (const PixelWand *, #endif /* Log ImageMagick error message. - Useful when a ImageMagick function returns the status `MagickFalse'. */ + Useful when an ImageMagick function returns the status `MagickFalse'. */ static void imagemagick_error (MagickWand *wand) diff --git a/src/inotify.c b/src/inotify.c index 08da308c97..e06cc97c6a 100644 --- a/src/inotify.c +++ b/src/inotify.c @@ -503,7 +503,7 @@ DEFUN ("inotify-watch-list", Finotify_watch_list, Sinotify_watch_list, 0, 0, 0, } DEFUN ("inotify-allocated-p", Finotify_allocated_p, Sinotify_allocated_p, 0, 0, 0, - doc: /* Return non-nil, if a inotify instance is allocated. */) + doc: /* Return non-nil, if an inotify instance is allocated. */) { return inotifyfd < 0 ? Qnil : Qt; } diff --git a/src/keymap.c b/src/keymap.c index 80a899b575..c8cc933e78 100644 --- a/src/keymap.c +++ b/src/keymap.c @@ -1278,7 +1278,7 @@ append_key (Lisp_Object key_sequence, Lisp_Object key) return CALLN (Fvconcat, key_sequence, key_list); } -/* Given a event type C which is a symbol, +/* Given an event type C which is a symbol, signal an error if is a mistake such as RET or M-RET or C-DEL, etc. */ static void diff --git a/src/regex.c b/src/regex.c index d70a59cbb8..e8b99f6f02 100644 --- a/src/regex.c +++ b/src/regex.c @@ -5792,7 +5792,7 @@ re_match_2_internal (struct re_pattern_buffer *bufp, const_re_char *string1, EXTRACT_NUMBER (mcnt, p2 - 2); - /* Ensure this is a indeed the trivial kind of loop + /* Ensure this is indeed the trivial kind of loop we are expecting. */ assert (skip_one_char (p1) == p2 - 3); assert ((re_opcode_t) p2[-3] == jump && p2 + mcnt == p); diff --git a/src/syntax.c b/src/syntax.c index e6a21e5433..378064611c 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -3028,7 +3028,7 @@ Comments are ignored if `parse-sexp-ignore-comments' is non-nil. If we reach the beginning or end of the accessible part of the buffer before we have scanned over COUNT lists, return nil if the depth at -that point is zero, and signal a error if the depth is nonzero. */) +that point is zero, and signal an error if the depth is nonzero. */) (Lisp_Object from, Lisp_Object count, Lisp_Object depth) { CHECK_NUMBER (from); diff --git a/src/xdisp.c b/src/xdisp.c index bf1737b9cf..da9c31314c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -32479,7 +32479,7 @@ or `nobreak-hyphen' face respectively. U+00A0 (no-break space), U+00AD (soft hyphen), U+2010 (hyphen), and U+2011 (non-breaking hyphen) are affected. -Any other non-nil value means to display these characters as a escape +Any other non-nil value means to display these characters as an escape glyph followed by an ordinary space or hyphen. A value of nil means no special handling of these characters. */); commit 66a4e651f3cf38c320d1a9d5ae6f88dcc641792b Author: Glenn Morris Date: Fri Feb 16 15:16:15 2018 -0500 ; Fix doc typos related to indefinite articles diff --git a/lisp/calendar/holidays.el b/lisp/calendar/holidays.el index 8e2a6c9655..4ba49a9acb 100644 --- a/lisp/calendar/holidays.el +++ b/lisp/calendar/holidays.el @@ -399,7 +399,7 @@ use instead of point." (defun holidays (&optional arg) "Display the holidays for last month, this month, and next month. If called with an optional prefix argument ARG, prompts for month and year. -This function is suitable for execution in a init file." +This function is suitable for execution in an init file." (interactive "P") (save-excursion (let* ((completion-ignore-case t) diff --git a/lisp/cedet/ede/cpp-root.el b/lisp/cedet/ede/cpp-root.el index 76afe9b9bf..bcefb4e340 100644 --- a/lisp/cedet/ede/cpp-root.el +++ b/lisp/cedet/ede/cpp-root.el @@ -137,7 +137,7 @@ ;; Need a way to reconfigure a project, and have it affect all open buffers. ;; From Tobias Gerdin: ;; -;; >>3) Is there any way to refresh a ede-cpp-root-project dynamically? I have +;; >>3) Is there any way to refresh an ede-cpp-root-project dynamically? I have ;; >>some file open part of the project, fiddle with the include paths and would ;; >>like the open buffer to notice this when I re-evaluate the ;; >>ede-cpp-root-project constructor. diff --git a/lisp/cedet/ede/files.el b/lisp/cedet/ede/files.el index 36ec7a1d89..c95402e365 100644 --- a/lisp/cedet/ede/files.el +++ b/lisp/cedet/ede/files.el @@ -25,7 +25,7 @@ ;; ;; Basic Model: ;; -;; A directory belongs to a project if a ede-project-autoload structure +;; A directory belongs to a project if an ede-project-autoload structure ;; matches your directory. ;; ;; A toplevel project is one where there is no active project above diff --git a/lisp/cedet/semantic/util-modes.el b/lisp/cedet/semantic/util-modes.el index 6374a0cb08..54c9578773 100644 --- a/lisp/cedet/semantic/util-modes.el +++ b/lisp/cedet/semantic/util-modes.el @@ -782,7 +782,7 @@ If there is no function, disable the header line." (goto-char (semantic-tag-start tag)) ;; Klaus Berndl : ;; goto the tag name; this is especially needed for languages - ;; like c++ where a often used style is like: + ;; like c++ where an often used style is like: ;; void ;; ClassX::methodM(arg1...) ;; { diff --git a/lisp/cedet/srecode/el.el b/lisp/cedet/srecode/el.el index f5f1265ccd..ff9e1d53f9 100644 --- a/lisp/cedet/srecode/el.el +++ b/lisp/cedet/srecode/el.el @@ -24,7 +24,7 @@ ;; Emacs Lisp specific handlers. To use these handlers in your ;; template, add the :name part to your template argument list. ;; -;; Error if not in a Emacs Lisp mode +;; Error if not in an Emacs Lisp mode ;;; Code: diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 878256a696..3ede483dad 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1192,7 +1192,7 @@ For example, the MH-E package updates this alist as follows: The value of PACKAGE needs to be unique and it needs to match the PACKAGE value appearing in the :package-version keyword. Since -the user might see the value in a error message, a good choice is +the user might see the value in an error message, a good choice is the official name of the package, such as MH-E or Gnus.") ;;;###autoload diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 08e2b978ec..7e4d244f5e 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -641,7 +641,7 @@ list of a symbol.") (defun edebug-form-data-symbol () "Return the edebug data symbol of the form where point is in. -If point is not inside a edebuggable form, cause error." +If point is not inside an edebuggable form, signal an error." (or (edebug--form-data-name (edebug-get-form-data-entry (point))) (error "Not inside instrumented form"))) diff --git a/lisp/emacs-lisp/ewoc.el b/lisp/emacs-lisp/ewoc.el index b88a1a5097..262d4d8594 100644 --- a/lisp/emacs-lisp/ewoc.el +++ b/lisp/emacs-lisp/ewoc.el @@ -411,7 +411,7 @@ If the EWOC is empty, nil is returned." ((>= pos (ewoc--node-start-marker (ewoc--node-nth dll -2))) (ewoc--node-nth dll -2)) - ;; We now know that pos is within a elem. + ;; We now know that pos is within an elem. (t ;; Make an educated guess about which of the three known ;; node'es (the first, the last, or GUESS) is nearest. diff --git a/lisp/epa.el b/lisp/epa.el index 7878340fcd..a84e4f2b85 100644 --- a/lisp/epa.el +++ b/lisp/epa.el @@ -267,7 +267,7 @@ You should bind this variable with `let', but do not set it globally.") (defvar epa-exit-buffer-function #'quit-window) (define-widget 'epa-key 'push-button - "Button for representing a epg-key object." + "Button for representing an epg-key object." :format "%[%v%]" :button-face-get 'epa--key-widget-button-face-get :value-create 'epa--key-widget-value-create diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index ddab335049..61c0ebc71d 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -80,7 +80,7 @@ ;; ;; echo x$(+ 1 2) "String $(+ 1 2)" ;; -;; To pass a Lisp symbol as a argument, use the alternate quoting +;; To pass a Lisp symbol as an argument, use the alternate quoting ;; syntax, since the single quote character is far too overused in ;; shell syntax: ;; diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 841a95006f..59fb9b926d 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -87,7 +87,7 @@ variable's value to take effect." "Called each time a process is exec'd by `eshell-gather-process-output'. It is passed one argument, which is the process that was just started. It is useful for things that must be done each time a process is -executed in a eshell mode buffer (e.g., `process-kill-without-query'). +executed in an eshell mode buffer (e.g., `process-kill-without-query'). In contrast, `eshell-mode-hook' is only executed once when the buffer is created." :type 'hook diff --git a/lisp/faces.el b/lisp/faces.el index 0fe839d620..18b821a0b6 100644 --- a/lisp/faces.el +++ b/lisp/faces.el @@ -698,7 +698,7 @@ Otherwise, VALUE must be a property list of the form: `(:color COLOR :style STYLE)'. -COLOR can be a either a color name string or `foreground-color'. +COLOR can be either a color name string or `foreground-color'. STYLE can be either `line' or `wave'. If a keyword/value pair is missing from the property list, a default value will be used for the value. diff --git a/lisp/ffap.el b/lisp/ffap.el index d584692533..4e479d1b82 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -1081,7 +1081,7 @@ If a given RFC isn't in these then `ffap-rfc-path' is offered." ;; * strip trailing "@" and ":" ;; * no commas (good for latex) (file "--:\\\\${}+<>@-Z_[:alpha:]~*?" "<@" "@>;.,!:") - ;; An url, or maybe a email/news message-id: + ;; An url, or maybe an email/news message-id: (url "--:=&?$+@-Z_[:alpha:]~#,%;*()!'" "^[0-9a-zA-Z]" ":;.,!?") ;; Find a string that does *not* contain a colon: (nocolon "--9$+<>@-Z_[:alpha:]~" "<@" "@>;.,!?") diff --git a/lisp/filenotify.el b/lisp/filenotify.el index 562ac266e4..986dc093bc 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -420,7 +420,7 @@ DESCRIPTOR should be an object returned by `file-notify-add-watch'." ;; TODO: ;; * Watching a /dir/file may receive events for dir. ;; (This may be the desired behaviour.) -;; * Watching a file in a already watched directory +;; * Watching a file in an already watched directory ;; If the file is created and *then* a watch is added to that file, the ;; watch might receive events which occurred prior to it being created, ;; due to the way events are propagated during idle time. Note: This diff --git a/lisp/gnus/gnus-agent.el b/lisp/gnus/gnus-agent.el index 5dd4eaab9a..b2de119643 100644 --- a/lisp/gnus/gnus-agent.el +++ b/lisp/gnus/gnus-agent.el @@ -451,7 +451,7 @@ manipulated as follows: (defvar gnus-agent-mode-status '(gnus-agent-mode " Plugged")) (defun gnus-agent-mode () - "Minor mode for providing a agent support in Gnus buffers." + "Minor mode for providing agent support in Gnus buffers." (let* ((buffer (progn (string-match "^gnus-\\(.*\\)-mode$" (symbol-name major-mode)) (match-string 1 (symbol-name major-mode)))) diff --git a/lisp/gnus/gnus-cache.el b/lisp/gnus/gnus-cache.el index c5a2575b9a..c3e77ca59b 100644 --- a/lisp/gnus/gnus-cache.el +++ b/lisp/gnus/gnus-cache.el @@ -443,7 +443,7 @@ A group name is decoded according to decoded again according to `nnmail-pathname-coding-system', `file-name-coding-system', or `default-file-name-coding-system'. -It is used when asking for a original group name from a cache +It is used when asking for an original group name from a cache directory name, in which non-ASCII characters might have been unified into the ones of a certain charset particularly if the `utf-8' coding system for example was used.") diff --git a/lisp/gnus/gnus-fun.el b/lisp/gnus/gnus-fun.el index d0557dc7e4..40c6d51111 100644 --- a/lisp/gnus/gnus-fun.el +++ b/lisp/gnus/gnus-fun.el @@ -66,7 +66,7 @@ (defcustom gnus-convert-image-to-x-face-command "convert -scale 48x48! %s xbm:- | xbm2xface.pl" "Command for converting an image to an X-Face. -The command must take a image filename (use \"%s\") as input. +The command must take an image filename (use \"%s\") as input. The output must be the X-Face header data on stdout." :version "22.1" :group 'gnus-fun diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 1448ba2df3..4af818d916 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el @@ -2629,11 +2629,11 @@ a string, be sure to use a valid format, see RFC 2616." ;; Propagate flags to server, with the following exceptions: ;; `seen' is private to each gnus installation -;; `cache' is a internal gnus flag for each gnus installation -;; `download' is a agent flag private to each gnus installation +;; `cache' is an internal gnus flag for each gnus installation +;; `download' is an agent flag private to each gnus installation ;; `unsend' are for nndraft groups only ;; `score' is not a proper mark -;; `bookmark': don't propagated it, or fix the bug in update-mark. +;; `bookmark': don't propagate it, or fix the bug in update-mark. (defconst gnus-article-unpropagated-mark-lists '(seen cache download unsend score bookmark unexist) "Marks that shouldn't be propagated to back ends. diff --git a/lisp/hexl.el b/lisp/hexl.el index 681a26b680..d716405f97 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -890,7 +890,7 @@ This discards the buffer's undo information." (error "Invalid hex digit `%c'" ch))))) (defun hexl-oct-char-to-integer (character) - "Take a char and return its value as if it was a octal digit." + "Take a char and return its value as if it was an octal digit." (if (and (>= character ?0) (<= character ?7)) (- character ?0) (error "Invalid octal digit `%c'" character))) diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 82c0a89561..dfa6bde297 100644 --- a/lisp/htmlfontify.el +++ b/lisp/htmlfontify.el @@ -1630,7 +1630,7 @@ TEXT-ID marks a unique position within a block. It is set to value of `point' at the current buffer position. TEXT-BEGINS-BLOCK-P is a boolean and is non-nil if the current -span also begins a invisible portion of text. +span also begins an invisible portion of text. An implementation can use TEXT-BLOCK, TEXT-ID, TEXT-BEGINS-BLOCK-P to implement fold/unfold-on-mouse-click like diff --git a/lisp/international/fontset.el b/lisp/international/fontset.el index 45eabfcb40..6f91207451 100644 --- a/lisp/international/fontset.el +++ b/lisp/international/fontset.el @@ -823,7 +823,7 @@ '("FreeMono" . "iso10646-1") nil 'prepend) ;; Since standard-fontset-spec on X uses fixed-medium font, which - ;; gets mapped to a iso8859-1 variant, we would like to prefer its + ;; gets mapped to an iso8859-1 variant, we would like to prefer its ;; iso10646-1 variant for symbols, where the coverage is known to be ;; good. (dolist (symbol-subgroup diff --git a/lisp/mail/rmailedit.el b/lisp/mail/rmailedit.el index 623a829124..91aeb4187d 100644 --- a/lisp/mail/rmailedit.el +++ b/lisp/mail/rmailedit.el @@ -410,7 +410,7 @@ or else nil to insert it at the beginning. DELETED's elements are elements of OLD-HEADERS. CHANGED's elements have the form (OLD . NEW) -where OLD is a element of OLD-HEADERS and NEW is an element of NEW-HEADERS." +where OLD is an element of OLD-HEADERS and NEW is an element of NEW-HEADERS." (let ((reverse-new (reverse new-headers)) inserted deleted changed) diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 63d7a2973f..05ff672da5 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el @@ -831,7 +831,7 @@ This assumes that a temporary buffer is set up." (expand-file-name "flists" dir))))))))) (defun mh-file-command-p (file) - "Return t if file FILE is the name of a executable regular file." + "Return t if file FILE is the name of an executable regular file." (and (file-regular-p file) (file-executable-p file))) (defun mh-variant-set-variant (variant) diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 967eb869a2..e2c682a399 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el @@ -1242,7 +1242,7 @@ MESSAGE number." "message/rfc822" (if (string= "" description) nil description) "inline")) - (t (error "The message number, %s, is not a integer" msg))))) + (t (error "The message number, %s, is not an integer" msg))))) (defun mh-mh-forward-message (&optional description folder messages) "Add tag to forward a message. diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el index 3e591c6538..8b8ba96456 100644 --- a/lisp/mh-e/mh-search.el +++ b/lisp/mh-e/mh-search.el @@ -443,7 +443,7 @@ search all folders." (setq redo-flag t)) ((mh-folder-exists-p new-folder) ;; Folder exists but we don't have it open. That means they are - ;; stale results from a old flists search. Clear it out. + ;; stale results from an old flists search. Clear it out. (mh-exec-cmd-quiet nil "rmf" new-folder))) (setq message (mh-search "+" mh-flists-results-folder redo-flag window-config) @@ -1583,7 +1583,7 @@ If the folder returned doesn't exist then it is created." chosen-name)) (defun mh-index-folder-search-regexp (folder) - "If FOLDER was created by a index search, return the search regexp. + "If FOLDER was created by an index search, return the search regexp. Return nil if FOLDER doesn't exist or the .mhe_index file is garbled." (ignore-errors @@ -1912,7 +1912,7 @@ origin-index) map is updated too." (defun mh-index-update-single-msg (msg checksum origin-map) "Update various maps for one message. -MSG is a index folder message, CHECKSUM its MD5 hash and +MSG is an index folder message, CHECKSUM its MD5 hash and ORIGIN-MAP, if non-nil, a hash table containing which maps each message in the index folder to the folder and message that it was copied from. The function updates the hash tables diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index ea17fb518e..85c9308c0d 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -202,7 +202,7 @@ For the meaning of the rest of the parameters, see `gnutls-boot-parameters'." "boot: %s" params) (when (gnutls-errorp ret) - ;; This is a error from the underlying C code. + ;; This is an error from the underlying C code. (signal 'gnutls-error (list process ret))) process)) diff --git a/lisp/nxml/xsd-regexp.el b/lisp/nxml/xsd-regexp.el index f83dad5751..54f56dded3 100644 --- a/lisp/nxml/xsd-regexp.el +++ b/lisp/nxml/xsd-regexp.el @@ -208,7 +208,7 @@ Signal an error if it is not." (nreverse (xsdre-compile-regexp re nil)))) (defun xsdre-compile-regexp (re accum) - "Return a Emacs regular expression for the symbolic regexp RE. + "Return an Emacs regular expression for the symbolic regexp RE. Returns a list of strings whose head is the regexp for RE and whose tail is ACCUM." (cond ((not (consp re)) @@ -271,7 +271,7 @@ and whose tail is ACCUM." (t (xsdre-compile-char-class re accum)))) (defun xsdre-compile-char-class (cc accum) - "Return a Emacs regular expression for the symbolic character class CC. + "Return an Emacs regular expression for the symbolic character class CC. Returns a list of strings whose head is the regexp for CC and whose tail is ACCUM." (cons (if (integerp cc) @@ -450,7 +450,7 @@ LOWER ::= UNICODE UPPER ::= UNICODE SYMBOLIC-CHAR-CLASS ::= SYMBOL -where UNICODE is a integer specifying a Unicode code-point and +where UNICODE is an integer specifying a Unicode code-point and SYMBOLIC-CHAR-CLASS is a symbol which has either a `xsdre-char-class' property whose value is a CHAR-CLASS, or a `xsdre-ranges' property whose value is a range-list." diff --git a/lisp/org/ob-core.el b/lisp/org/ob-core.el index 5f378b2173..0e2e78a671 100644 --- a/lisp/org/ob-core.el +++ b/lisp/org/ob-core.el @@ -363,7 +363,7 @@ a window into the `org-babel-get-src-block-info' function." ;;;###autoload (defun org-babel-expand-src-block-maybe () "Conditionally expand a source block. -Detect if this is context for a org-babel src-block and if so +Detect if this is context for an org-babel src-block and if so then run `org-babel-expand-src-block'." (interactive) (org-babel-when-in-src-block @@ -372,7 +372,7 @@ then run `org-babel-expand-src-block'." ;;;###autoload (defun org-babel-load-in-session-maybe () "Conditionally load a source block in a session. -Detect if this is context for a org-babel src-block and if so +Detect if this is context for an org-babel src-block and if so then run `org-babel-load-in-session'." (interactive) (org-babel-when-in-src-block @@ -383,7 +383,7 @@ then run `org-babel-load-in-session'." ;;;###autoload (defun org-babel-pop-to-session-maybe () "Conditionally pop to a session. -Detect if this is context for a org-babel src-block and if so +Detect if this is context for an org-babel src-block and if so then run `org-babel-switch-to-session'." (interactive) (org-babel-when-in-src-block diff --git a/lisp/org/ob-org.el b/lisp/org/ob-org.el index e52283848e..310aaec3f3 100644 --- a/lisp/org/ob-org.el +++ b/lisp/org/ob-org.el @@ -34,7 +34,7 @@ (defvar org-babel-default-header-args:org '((:results . "raw silent") (:exports . "code")) - "Default arguments for evaluating a org source block.") + "Default arguments for evaluating an org source block.") (defvar org-babel-org-default-header "#+TITLE: default empty header\n" diff --git a/lisp/org/ob-picolisp.el b/lisp/org/ob-picolisp.el index b6dc8986f9..fd129b899b 100644 --- a/lisp/org/ob-picolisp.el +++ b/lisp/org/ob-picolisp.el @@ -35,7 +35,7 @@ ;; (http://picolisp.com/5000/-2.html). PicoLisp is included in some ;; GNU/Linux Distributions, and can be downloaded here: ;; http://software-lab.de/down.html. It ships with a picolisp-mode and -;; a inferior-picolisp-mode for Emacs (to be found in the /lib/el/ +;; an inferior-picolisp-mode for Emacs (to be found in the /lib/el/ ;; directory). ;; Although it might seem more natural to use Emacs Lisp for most diff --git a/lisp/org/org-eww.el b/lisp/org/org-eww.el index 0792c87a6a..3d9dddcac0 100644 --- a/lisp/org/org-eww.el +++ b/lisp/org/org-eww.el @@ -25,9 +25,9 @@ ;;; Commentary: ;; When this module is active `org-store-link' (often on key C-c l) in -;; a eww buffer stores a link to the current url of the eww buffer. +;; an EWW buffer stores a link to the current url of the eww buffer. -;; In an eww buffer function `org-eww-copy-for-org-mode' kills either +;; In an EWW buffer function `org-eww-copy-for-org-mode' kills either ;; a region or the whole buffer if no region is set and transforms the ;; text on the fly so that it can be pasted into an Org buffer with ;; hot links. @@ -58,7 +58,7 @@ ;; Store Org-link in eww-mode buffer (org-link-set-parameters "eww" :follow #'eww :store #'org-eww-store-link) (defun org-eww-store-link () - "Store a link to the url of a Eww buffer." + "Store a link to the url of an EWW buffer." (when (eq major-mode 'eww-mode) (org-store-link-props :type "eww" diff --git a/lisp/org/org-protocol.el b/lisp/org/org-protocol.el index 3cbbc78dce..27c2bb28d0 100644 --- a/lisp/org/org-protocol.el +++ b/lisp/org/org-protocol.el @@ -663,7 +663,7 @@ to deal with new-style links.") ;;; Org specific functions: (defun org-protocol-create-for-org () - "Create a Org protocol project for the current file's project. + "Create an Org protocol project for the current file's project. The visited file needs to be part of a publishing project in `org-publish-project-alist' for this to work. The function delegates most of the work to `org-protocol-create'." diff --git a/lisp/org/ox-html.el b/lisp/org/ox-html.el index 06edb821e1..83f6479bd4 100644 --- a/lisp/org/ox-html.el +++ b/lisp/org/ox-html.el @@ -2697,7 +2697,7 @@ holding contextual information." (defun org-html-format-inlinetask-default-function (todo todo-type priority text tags contents info) - "Default format function for a inlinetasks. + "Default format function for inlinetasks. See `org-html-format-inlinetask-function' for details." (format "
\n%s%s\n%s
" (org-html-format-headline-default-function diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el index a656e065b9..c32aa29804 100644 --- a/lisp/org/ox-latex.el +++ b/lisp/org/ox-latex.el @@ -2125,7 +2125,7 @@ holding contextual information." (defun org-latex-format-inlinetask-default-function (todo _todo-type priority title tags contents _info) - "Default format function for a inlinetasks. + "Default format function for inlinetasks. See `org-latex-format-inlinetask-function' for details." (let ((full-title (concat (when todo (format "\\textbf{\\textsf{\\textsc{%s}}} " todo)) diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el index fd4235a79d..d877c9c63a 100644 --- a/lisp/org/ox-texinfo.el +++ b/lisp/org/ox-texinfo.el @@ -958,7 +958,7 @@ holding contextual information." (defun org-texinfo-format-inlinetask-default-function (todo _todo-type priority title tags contents) - "Default format function for a inlinetasks. + "Default format function for inlinetasks. See `org-texinfo-format-inlinetask-function' for details." (let ((full-title (concat (when todo (format "@strong{%s} " todo)) diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el index d09ee52c97..2d3f6e22a6 100644 --- a/lisp/progmodes/ada-mode.el +++ b/lisp/progmodes/ada-mode.el @@ -2479,7 +2479,7 @@ and the offset." (forward-word-strictly -1)) ;; If there is a parameter list, and we have a function declaration - ;; or a access to subprogram declaration + ;; or access to subprogram declaration (let ((num-back 1)) (if (and (= (following-char) ?\() (save-excursion diff --git a/lisp/progmodes/ada-stmt.el b/lisp/progmodes/ada-stmt.el index 02f7e3954e..f1ed01e3cc 100644 --- a/lisp/progmodes/ada-stmt.el +++ b/lisp/progmodes/ada-stmt.el @@ -415,13 +415,13 @@ Invoke right after `ada-function-spec' or `ada-procedure-spec'." (define-skeleton ada-entry-family-prompt-discriminant - "Insert a entry specification, prompting for the entry name." + "Insert an entry specification, prompting for the entry name." "[discriminant name]: " str) (define-skeleton ada-entry-family - "Insert a entry specification, prompting for the entry name." + "Insert an entry specification, prompting for the entry name." "[entry name]: " "entry " str " (" (ada-entry-family-prompt-discriminant) ")" diff --git a/lisp/progmodes/antlr-mode.el b/lisp/progmodes/antlr-mode.el index 921db6b46d..1d4fd4f2bc 100644 --- a/lisp/progmodes/antlr-mode.el +++ b/lisp/progmodes/antlr-mode.el @@ -1562,7 +1562,7 @@ The search for a correct position is as follows: * If search is within an area where options can be inserted, use the position of point. Inside the options section and if point is in - the middle of a option definition, skip the rest of it. + the middle of an option definition, skip the rest of it. * If an options section already exists, insert the options at the end. If only the beginning of the area is visible, insert at the beginning. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index ed8dc6de23..c9e1cf2427 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -10327,7 +10327,7 @@ comment at the start of cc-engine.el for more info." b-pos))) (defun c-backward-typed-enum-colon () - ;; We're at a "{" which might be the opening brace of a enum which is + ;; We're at a "{" which might be the opening brace of an enum which is ;; strongly typed (by a ":" followed by a type). If this is the case, leave ;; point before the colon and return t. Otherwise leave point unchanged and return nil. ;; Match data will be clobbered. diff --git a/lisp/progmodes/cc-menus.el b/lisp/progmodes/cc-menus.el index ae7759ef45..a42fe27b96 100644 --- a/lisp/progmodes/cc-menus.el +++ b/lisp/progmodes/cc-menus.el @@ -360,7 +360,7 @@ Example: (setq char (aref method p) p (1+ p)) (cond - ;; Is CHAR part of a objc token? + ;; Is CHAR part of an objc token? ((and (not inargvar) ; Ignore if CHAR is part of an argument variable. (eq 0 betweenparen) ; Ignore if CHAR is in parentheses. (or (and (<= ?a char) (<= char ?z)) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 2ce3d96225..664f01012b 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -622,7 +622,7 @@ that requires a literal mode spec at compile time." ;; buffer local value has its own alist structure. (setq c-offsets-alist (copy-alist c-offsets-alist)) - ;; setup the comment indent variable in a Emacs version portable way + ;; setup the comment indent variable in an Emacs version portable way (set (make-local-variable 'comment-indent-function) 'c-comment-indent) ;; What sort of comments are default for M-;? (setq c-block-comment-flag c-block-comment-is-default) diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 92e202a025..422974379b 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -919,7 +919,7 @@ from a different message." ;; COLUMN and LINE are numbers parsed from an error message. COLUMN and maybe ;; LINE will be nil for a message that doesn't contain them. Then the -;; location refers to a indented beginning of line or beginning of file. +;; location refers to an indented beginning of line or beginning of file. ;; Once any location in some file has been jumped to, the list is extended to ;; (COLUMN LINE FILE-STRUCTURE MARKER TIMESTAMP . VISITED) ;; for all LOCs pertaining to that file. diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index 68bff26902..6e02392c15 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el @@ -90,7 +90,7 @@ :group 'icon) (defcustom icon-brace-imaginary-offset 0 - "Imagined indentation of a Icon open brace that actually follows a statement." + "Imagined indentation of an Icon open brace that actually follows a statement." :type 'integer :group 'icon) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 5baf6e0f80..c7bb2d97c8 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -422,7 +422,7 @@ (string-delimiter . ,(rx (and ;; Match even number of backslashes. (or (not (any ?\\ ?\' ?\")) point - ;; Quotes might be preceded by a escaped quote. + ;; Quotes might be preceded by an escaped quote. (and (or (not (any ?\\)) point) ?\\ (* ?\\ ?\\) (any ?\' ?\"))) (* ?\\ ?\\) @@ -925,7 +925,7 @@ keyword (back-to-indentation) (python-syntax-closing-paren-p)) (cons :inside-paren-at-closing-nested-paren start)) - ;; This line starts from a opening block in its own line. + ;; This line starts from an opening block in its own line. ((save-excursion (goto-char start) (when (and @@ -1640,7 +1640,7 @@ ARG move forward only one sexp, else move backwards." (defun python-nav--lisp-forward-sexp-safe (&optional arg) "Safe version of standard `forward-sexp'. -When at end of sexp (i.e. looking at a opening/closing paren) +When at end of sexp (i.e. looking at an opening/closing paren) skips it instead of throwing an error. With positive ARG move forward only one sexp, else move backwards." (let* ((arg (if (or (not arg) (> arg 0)) 1 -1)) diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 4dfc7682c0..a4cb4856a8 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -3020,7 +3020,7 @@ If INFO is supplied it is used, else it is calculated." ;; line -- it is the PREVIOUS line which is continued, not the one ;; we are going to! ;; Also, we want to treat a whole "here document" as one big line, -;; because we may want to a align to the beginning of it. +;; because we may want to align to the beginning of it. ;; ;; What we do: ;; - go back to previous non-empty line diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 7bc3a5a2f7..ae212bd8f8 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -4225,7 +4225,7 @@ the call to \\[sql-product-interactive] with (symbolp product)) product) (t sql-product))) ; Default to sql-product - ;; If we have a product and it has a interactive mode + ;; If we have a product and it has an interactive mode (if product (when (sql-get-product-feature product :sqli-comint-func) ;; If no new name specified, try to pop to an active SQL diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el index db29435bff..a841f87f3c 100644 --- a/lisp/progmodes/vhdl-mode.el +++ b/lisp/progmodes/vhdl-mode.el @@ -4890,7 +4890,7 @@ Key bindings: (set (make-local-variable 'indent-tabs-mode) vhdl-indent-tabs-mode) (set (make-local-variable 'hippie-expand-verbose) nil) - ;; setup the comment indent variable in a Emacs version portable way + ;; setup the comment indent variable in an Emacs version portable way ;; ignore any byte compiler warnings you might get here (when (boundp 'comment-indent-function) (set (make-local-variable 'comment-indent-function) 'vhdl-comment-indent)) diff --git a/lisp/tempo.el b/lisp/tempo.el index 6c39558290..5d4dea5325 100644 --- a/lisp/tempo.el +++ b/lisp/tempo.el @@ -154,7 +154,7 @@ setting it to (upcase), for example.") (defvar tempo-local-tags '((tempo-tags . nil)) "A list of locally installed tag completion lists. -It is a association list where the car of every element is a symbol +It is an association list where the car of every element is a symbol whose variable value is a template list. The cdr part, if non-nil, is a function or a regexp that defines the string to match. See the documentation for the function `tempo-complete-tag' for more info. diff --git a/lisp/textmodes/artist.el b/lisp/textmodes/artist.el index 7341907253..af7bcc77cd 100644 --- a/lisp/textmodes/artist.el +++ b/lisp/textmodes/artist.el @@ -1025,78 +1025,78 @@ If DRAW-HOW is `artist-do-poly': (defsubst artist-go-get-keyword (info-variant-part) "Retrieve the keyword component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part." +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part." (elt info-variant-part 0)) (defsubst artist-go-get-symbol (info-variant-part) "Retrieve the symbol component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part." +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part." (elt info-variant-part 1)) (defsubst artist-go-get-mode-line (info-variant-part) "Retrieve the mode line component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part." +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part." (elt info-variant-part 2)) (defsubst artist-go-get-arrow-pred (info-variant-part) "Retrieve the arrow predicate component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part." +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part." (elt info-variant-part 3)) (defsubst artist-go-get-arrow-set-fn (info-variant-part) "Retrieve the arrow set component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part." +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part." (elt info-variant-part 4)) (defsubst artist-go-get-init-fn (info-variant-part) "Retrieve the init function component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part." +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part." (elt info-variant-part 5)) (defsubst artist-go-get-prep-fill-fn (info-variant-part) "Retrieve the fill preparation function component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part." +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part." (elt info-variant-part 6)) (defsubst artist-go-get-exit-fn (info-variant-part) "Retrieve the exit component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part." +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part." (elt info-variant-part 7)) (defsubst artist-go-get-draw-how (info-variant-part) "Retrieve the draw how component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part." +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part." (elt info-variant-part 8)) (defsubst artist-go-get-draw-fn (info-variant-part) "Retrieve the draw function component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part." +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part." (elt info-variant-part 9)) (defsubst artist-go-get-undraw-fn (info-variant-part) "Retrieve the undraw function component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part. +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part. This interval function component is available only if the `draw-how' component is other than `artist-do-continously' or 1." (elt (elt info-variant-part 10) 0)) (defsubst artist-go-get-interval-fn (info-variant-part) "Retrieve the interval function component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part. +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part. This interval function component is available only if the `draw-how' component is `artist-do-continously'." (elt (elt info-variant-part 10) 0)) (defsubst artist-go-get-fill-pred (info-variant-part) "Retrieve the fill predicate component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part. +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part. This interval function component is available only if the `draw-how' component is other than `artist-do-continously' or 1." (elt (elt info-variant-part 10) 1)) (defsubst artist-go-get-fill-fn (info-variant-part) "Retrieve the fill function component from an INFO-VARIANT-PART. -An INFO-VARIANT-PART is the shifted or unshifted info from a info-part. +An INFO-VARIANT-PART is the shifted or unshifted info from an info-part. This interval function component is available only if the `draw-how' component is other than `artist-do-continously' or 1." (elt (elt info-variant-part 10) 2)) diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 6d253f1c20..01ee4f5fa4 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -1405,7 +1405,7 @@ the text, so that the text has to be repeated outside the index macro. Needed for `reftex-index-selection-or-word' and for indexing from the phrase buffer. -The final entry may also be a symbol if this entry has a association +The final entry may also be a symbol if this entry has an association in the variable `reftex-index-macros-builtin' to specify the main indexing package you are using. Valid values are currently default The LaTeX default - unnecessary to specify this one diff --git a/lisp/textmodes/rst.el b/lisp/textmodes/rst.el index 87ea1e827d..b1b4f1073e 100644 --- a/lisp/textmodes/rst.el +++ b/lisp/textmodes/rst.el @@ -652,7 +652,7 @@ After interpretation of ARGS the results are concatenated as for &aux (char (rst-Ado--validate-char char-arg)) (-style 'simple))) - ;; Construct a over-and-under section header. + ;; Construct an over-and-under section header. (:constructor rst-Ado-new-over-and-under (char-arg @@ -717,7 +717,7 @@ Return CHAR if so or signal an error otherwise." (defun rst-Ado-is-over-and-under (self) ;; testcover: ok. - "Return non-nil if SELF is a over-and-under section adornment." + "Return non-nil if SELF is an over-and-under section adornment." (cl-check-type self rst-Ado) (eq (rst-Ado--style self) 'over-and-under)) @@ -855,7 +855,7 @@ Return ADO if so or signal an error otherwise." (defun rst-Hdr-is-over-and-under (self) ;; testcover: ok. - "Return non-nil if SELF is a over-and-under section header." + "Return non-nil if SELF is an over-and-under section header." (cl-check-type self rst-Hdr) (rst-Ado-is-over-and-under (rst-Hdr-ado self))) @@ -958,7 +958,7 @@ This type is immutable." (or (null und-beg) (integer-or-marker-p und-beg)) (or (null und-end) (integer-or-marker-p und-end))) (signal 'args-out-of-range - '("For a over-and-under section adornment all match pairs must be set.")))))) + '("For an over-and-under section adornment all match pairs must be set.")))))) match) (defun rst-Ttl--validate-indent (indent ado) @@ -1245,7 +1245,7 @@ as well but give an additional message." ;; Makes paragraphs in region as a bullet list. (rst-define-key map [?\C-c ?\C-l ?\C-b] #'rst-bullet-list-region [?\C-c ?\C-b]) - ;; Makes paragraphs in region as a enumeration. + ;; Makes paragraphs in region an enumeration. (rst-define-key map [?\C-c ?\C-l ?\C-e] #'rst-enumerate-region [?\C-c ?\C-e]) ;; Converts bullets to an enumeration. @@ -1552,7 +1552,7 @@ file." (defcustom rst-default-indent 1 "Number of characters to indent the section title. This is only used while toggling adornment styles when switching -from a simple adornment style to a over-and-under adornment +from a simple adornment style to an over-and-under adornment style. In addition this is used in cases where the adornments found in the buffer are to be used but the indentation for over-and-under adornments is inconsistent across the buffer." diff --git a/lisp/thumbs.el b/lisp/thumbs.el index 7aaed28a2a..26c9935429 100644 --- a/lisp/thumbs.el +++ b/lisp/thumbs.el @@ -48,7 +48,7 @@ ;; That should be a directory containing image files. ;; from dired, C-t m enter in thumbs-mode with all marked files ;; C-t a enter in thumbs-mode with all files in current-directory -;; In thumbs-mode, pressing on a image will bring you in image view +;; In thumbs-mode, pressing on an image will bring you in image view ;; mode for that image. C-h m will give you a list of available keybinding. ;;; History: diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 2d0ea9ce60..efe853e5ee 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -223,7 +223,7 @@ Should be consistent with the Git config value i18n.logOutputEncoding." (concat name "\0")))))))) (defun vc-git--state-code (code) - "Convert from a string to a added/deleted/modified state." + "Convert from a string to an added/deleted/modified state." (pcase (string-to-char code) (?M 'edited) (?A 'added) commit 35e5c57db311c3d6c1c3a8dd4edc3d756d1d5d24 Author: Glenn Morris Date: Fri Feb 16 14:11:51 2018 -0500 ; Fix doc typos related to indefinite articles diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index 09cb034e37..e9371f39a9 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -1585,7 +1585,7 @@ use it, add the @samp{--tls} flag to @code{rmail-movemail-flags}. If your incoming mail is stored on a local machine in a format other than Unix mailbox, you will need the Mailutils @command{movemail} to retrieve it. @xref{Movemail}, for the detailed description of -@command{movemail} versions. For example, to access mail from a inbox in +@command{movemail} versions. For example, to access mail from an inbox in @code{maildir} format located in @file{/var/spool/mail/in}, you would include the following in the Rmail inbox list: diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index ab9144f61e..770478ddf9 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -11799,7 +11799,7 @@ Uses recursion." @end group @end smallexample -What happens when we call this function with a argument of 7? +What happens when we call this function with an argument of 7? The first instance of the @code{triangle-recursively} function adds the number 7 to the value returned by a second instance of @@ -20821,7 +20821,7 @@ The function @code{1+} which adds one to its argument, is executed on Contrast this with @code{apply}, which applies its first argument to all the remaining. -(@xref{Readying a Graph, , Readying a Graph}, for a explanation of +(@xref{Readying a Graph, , Readying a Graph}, for an explanation of @code{apply}.) @need 1250 diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 21dfe1c271..c1c61a1b5c 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi @@ -191,7 +191,7 @@ standard keyword from the @code{finder-known-keywords} list. as explained in @ref{Packaging Basics}. In the above example, a magic comment autoloads @code{superfrobnicator-mode}. - @xref{Package Archives}, for a explanation of how to add a + @xref{Package Archives}, for an explanation of how to add a single-file package to a package archive. @node Multi-file Packages diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index a004952c37..f45b81c983 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -2980,7 +2980,7 @@ optional argument @var{append} is non-@code{nil}, @var{face} is appended to the end of the list instead. Note that in a face list, the first occurring value for each attribute takes precedence. -For example, the following code would assign a italicized green face +For example, the following code would assign an italicized green face to the text between @var{start} and @var{end}: @example diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 5ab6d6ee6a..687d597192 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -862,7 +862,7 @@ If the optional argument @var{pixelwise} is non-@code{nil}, A positive @var{delta} moves the edge downwards or to the right; a negative @var{delta} moves it upwards or to the left. If the edge cannot be moved as far as specified by @var{delta}, this function -moves it as far as possible but does not signal a error. +moves it as far as possible but does not signal an error. This function tries to resize windows adjacent to the edge that is moved. If this is not possible for some reason (e.g., if that adjacent diff --git a/doc/misc/autotype.texi b/doc/misc/autotype.texi index 026c57126d..3d61d24fa9 100644 --- a/doc/misc/autotype.texi +++ b/doc/misc/autotype.texi @@ -243,7 +243,7 @@ Interesting point. When wrapping skeletons around successive regions, they are put at these places. Point is left at first @code{_} where nothing is wrapped. @item @code{>} Indent line according to major mode. When following element is @code{_}, and -there is a interregion that will be wrapped here, indent that interregion. +there is an interregion that will be wrapped here, indent that interregion. @item @code{&} Logical and. If preceding element moved point, i.e., usually inserted something, do following element. diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 0132ab1775..2de56fa05c 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -2408,7 +2408,7 @@ could achieve this with code like this in your @file{.emacs}: @end group @end example -In a programming team, a hook is a also a good place for each member +In a programming team, a hook is also a good place for each member to put his own personal preferences. For example, you might be the only person in your team who likes Auto-newline minor mode. You could have it enabled by default by placing the following in your diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 8014c2b71f..1e44822338 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -753,7 +753,7 @@ privileges, you have several options: Info files don't actually need to be installed before being used. You can use a prefix argument for the @code{info} command and specify the name of the Info file in the minibuffer. This goes to the node -named @samp{Top} in that file. For example, to view a Info file named +named @samp{Top} in that file. For example, to view an Info file named @file{@var{info-file}} in your home directory, you can type this: @example @@ -3389,7 +3389,7 @@ version of Emacs, and see @ref{Current GNU distributions}, for a list of archive sites that make GNU software available. @node Finding a package with particular functionality -@section How do I find a Emacs Lisp package that does XXX? +@section How do I find an Emacs Lisp package that does XXX? @cindex Package, finding @cindex Finding an Emacs Lisp package @cindex Functionality, finding a particular package diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 43f8cd6381..1789767dbe 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -1022,7 +1022,7 @@ So that the user can enter @samp{info chmod}, for example. @item Create a mode @code{eshell-browse} -It would treat the Eshell buffer as a outline. Collapsing the outline +It would treat the Eshell buffer as an outline. Collapsing the outline hides all of the output text. Collapsing again would show only the first command run in each directory diff --git a/doc/misc/gnus-faq.texi b/doc/misc/gnus-faq.texi index 14c0117191..318bb4474d 100644 --- a/doc/misc/gnus-faq.texi +++ b/doc/misc/gnus-faq.texi @@ -441,7 +441,7 @@ machine news.yourprovider.net login YourUserName password YourPassword @noindent . Make sure that the file isn't readable to others if you -work on a OS which is capable of doing so. (Under Unix +work on an OS which is capable of doing so. (Under Unix say @example chmod 600 ~/.authinfo @@ -2012,7 +2012,7 @@ server by typing @samp{J a}. If you make a mistake, or change your mind, you can undo this action by typing @samp{J r}. When you're done, type 'q' to return to the group buffer. -Now the next time you enter a group on a agentized +Now the next time you enter a group on an agentized server, the headers will be stored on disk and read from there the next time you enter the group. @@ -2293,7 +2293,7 @@ When the term Emacs is used in this FAQ, it means either GNU Emacs or XEmacs. @item Message -In this FAQ message means a either a mail or a posting to a +In this FAQ message means either a mail or a posting to a Usenet Newsgroup or to some other fancy back end, no matter of which kind it is. diff --git a/doc/misc/org.texi b/doc/misc/org.texi index 6d152970fe..b187bfcdbc 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi @@ -12991,7 +12991,7 @@ of these examples works: @subsubheading Embedding clickable images For clickable images, provide a link whose description is another link to an -image file. For example, to embed a image @file{org-mode-unicorn.png} which +image file. For example, to embed an image @file{org-mode-unicorn.png} which when clicked jumps to @uref{http://Orgmode.org} website, do the following @example diff --git a/doc/misc/sc.texi b/doc/misc/sc.texi index d8faad9099..f214152b5f 100644 --- a/doc/misc/sc.texi +++ b/doc/misc/sc.texi @@ -1340,7 +1340,7 @@ currently part of Supercite, but contributions are welcome! Regi works by interpreting frames with the function @code{regi-interpret}. A frame is a list of arbitrary size where each -element is a entry of the following form: +element is an entry of the following form: @example (@var{pred} @var{func} [@var{negate-p} [@var{case-fold-search}]]) @@ -1709,7 +1709,7 @@ of information from the info alist. @item @code{sc-mail-field-query} (@kbd{C-c C-p f}) Allows you to interactively view, modify, add, and delete info alist key-value pairs. With no argument, you are prompted (with completion) -for a info key. The value associated with that key is displayed in the +for an info key. The value associated with that key is displayed in the minibuffer. With an argument, this command will first ask if you want to view, modify, add, or delete an info key. Viewing is identical to running the command with no arguments.