commit cc130d13d4b2b4c20d22401364f9814871819791 (HEAD, refs/remotes/origin/master) Merge: e5ff7f788e e3f00f5637 Author: Glenn Morris Date: Wed May 23 01:37:54 2018 -0700 Merge from origin/emacs-26 e3f00f5 (origin/emacs-26) Clarify when to use advice-add vs add-function c0f3e6b Minor formatting tweak in the Emacs manual fadf653 Update comments in Intro to Emacs Lisp 52ccb24 ; * doc/os.texi (Batch Mode): use = after --eval d65430f * etc/NEWS: Mention change in `edebug-prin1-to-string'. ef4aec1 ; * doc/lispref/hash.texi (Defining Hash): Fix typos. 2981952 Another attempt to fix sql.el b1b96d7 Update binding of 'M-.' in Intro to Emacs Lisp b239a09 Fix a typo in last change in sql.el 0d8bae5 Fix capitalization of mail headers 845fe03 Fix buffer names in sql.el a3885f5 Minor fixes in the Emacs manual 542f830 Fix a typo in rmail.texi eb0bc6f * etc/PROBLEMS: Document Bug#31305. Conflicts: doc/emacs/sending.texi etc/NEWS commit e5ff7f788e8d6e58000a3f8b2a005cb5f5124dd8 Merge: c120037be0 152a5569c8 Author: Glenn Morris Date: Wed May 23 01:35:06 2018 -0700 ; Merge from origin/emacs-26 The following commit was skipped: 152a556 (gnus-blocked-images): Clarify privacy implications commit c120037be0029d2c28d73b0e5a672981e0fb2aad Merge: c73e6a3111 73bc6f8693 Author: Glenn Morris Date: Wed May 23 01:35:05 2018 -0700 Merge from origin/emacs-26 73bc6f8 Fix a typo in describing input methods 6b4bafe ; Add a comment to emacs-lisp-intro.texi commit e3f00f5637a2790923a9c4c1d4b7dbf65027d8ce (refs/remotes/origin/emacs-26) Author: Noam Postavsky Date: Tue May 22 20:08:01 2018 -0400 Clarify when to use advice-add vs add-function * lisp/emacs-lisp/nadvice.el (add-function): Note in docstring that advice-add should be used for named functions. diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index e2e6825057..e20cc6570d 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -288,6 +288,9 @@ a special meaning: If PLACE is a symbol, its `default-value' will be affected. Use (local \\='SYMBOL) if you want to apply FUNCTION to SYMBOL buffer-locally. Use (var VAR) if you want to apply FUNCTION to the (lexical) VAR. +If you are trying to modify an existing named function rather +than a function value, you probably want to use `advice-add' +instead (see Info node `(elisp) Advising Named Functions'). If one of FUNCTION or OLDFUN is interactive, then the resulting function is also interactive. There are 3 cases: commit c73e6a3111bc53d213467479984f72cfed674c6f Author: João Távora Date: Tue May 22 22:40:48 2018 +0100 More helpful docstrings for tests of electric-tests.el * test/lisp/electric-tests.el (electric-pair-define-test-form): Improve automatically generated docstring. diff --git a/test/lisp/electric-tests.el b/test/lisp/electric-tests.el index 60191bfbba..2f64b2c08e 100644 --- a/test/lisp/electric-tests.el +++ b/test/lisp/electric-tests.el @@ -114,14 +114,30 @@ mode extra-desc)) () - ,(format "With |%s|, try input %c at point %d. \ -Should %s |%s| and point at %d" + ,(format "Electricity test in a `%s' buffer.\n +Start with point at %d in a %d-char-long buffer +like this one: + + |%s| (buffer start and end are denoted by `|') +%s +%s +Now press the key for: %c + +The buffer's contents should %s: + + |%s| + +, and point should be at %d." + mode + (1+ pos) + (length fixture) fixture + (if fixture-fn (format "\nNow call this:\n\n%s" + (pp-to-string fixture-fn)) "") + (if bindings (format "\nEnsure the following bindings:\n\n%s" + (pp-to-string bindings)) "") char - (1+ pos) - (if (string= fixture expected-string) - "stay" - "become") + (if (string= fixture expected-string) "stay" "become") (replace-regexp-in-string "\n" "\\\\n" expected-string) expected-point) (electric-pair-test-for ,fixture commit e18600dfbd31316f30cf98f6d7a90aad33bc1981 Author: Paul Eggert Date: Tue May 22 13:05:19 2018 -0700 Work around GCC bug with function attributes * src/alloc.c (PNTR_ADD): Put attributes after ‘static’ and before returned type. Problem reported by Eli Zaretskii in: https://lists.gnu.org/r/emacs-devel/2018-05/msg00559.html diff --git a/src/alloc.c b/src/alloc.c index d959c55350..4186347440 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -513,7 +513,7 @@ pointer_align (void *ptr, int alignment) #define macro_PNTR_ADD(p, i) ((p) + (i)) -static char * ATTRIBUTE_NO_SANITIZE_UNDEFINED ATTRIBUTE_UNUSED +static ATTRIBUTE_NO_SANITIZE_UNDEFINED ATTRIBUTE_UNUSED char * PNTR_ADD (char *p, EMACS_UINT i) { return macro_PNTR_ADD (p, i); commit 02f303d75f876517b7802f787413cbb418203315 Author: Paul Eggert Date: Tue May 22 12:26:22 2018 -0700 Fix failed assertion when load-force-doc-strings Problem reported by Philipp Stephani (Bug#31556). * src/lread.c (read_vector): When load_force_doc_strings, check for byte code vectors that are invalid because they are too short. * test/src/lread-tests.el (lread-invalid-bytecodes): New test. diff --git a/src/lread.c b/src/lread.c index b8db117c79..239c66ccb8 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3829,9 +3829,11 @@ read_vector (Lisp_Object readcharfun, bool bytecodeflag) tem = read_list (1, readcharfun); len = Flength (tem); + if (bytecodeflag && XFASTINT (len) <= COMPILED_STACK_DEPTH) + error ("Invalid byte code"); vector = Fmake_vector (len, Qnil); - size = ASIZE (vector); + size = XFASTINT (len); ptr = XVECTOR (vector)->contents; for (i = 0; i < size; i++) { diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index 647e886d34..639a6da93a 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el @@ -207,4 +207,8 @@ literals (Bug#20852)." ;; bug was fixed. (eval-buffer)))) +(ert-deftest lread-invalid-bytecodes () + (should-error + (let ((load-force-doc-strings t)) (read "#[0 \"\"]")))) + ;;; lread-tests.el ends here commit c0f3e6b56b2643730b724647df950631d73484bc Author: Eli Zaretskii Date: Tue May 22 20:27:28 2018 +0300 Minor formatting tweak in the Emacs manual * doc/emacs/custom.texi (Directory Variables): Don't have 2 footnotes back to back, it looks bad in HTML. (Bug#31555) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index e64686fe8b..141fa045b6 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -1313,16 +1313,13 @@ accomplished with @dfn{directory-local variables}. @cindex @file{.dir-locals.el} file The usual way to define directory-local variables is to put a file -named @file{.dir-locals.el}@footnote{ On MS-DOS, the name of this file -should be @file{_dir-locals.el}, due to limitations of the DOS -filesystems. If the filesystem is limited to 8+3 file names, the name -of the file will be truncated by the OS to @file{_dir-loc.el}. -}@footnote{ You can also use @file{.dir-locals-2.el}, which -is loaded in addition. This is useful when @file{.dir-locals.el} is -under version control in a shared repository and can't be used for -personal customizations. } in a -directory. Whenever Emacs visits any file in that directory or any of -its subdirectories, it will apply the directory-local variables +named @file{.dir-locals.el}@footnote{ +On MS-DOS, the name of this file should be @file{_dir-locals.el}, due +to limitations of the DOS filesystems. If the filesystem is limited +to 8+3 file names, the name of the file will be truncated by the OS to +@file{_dir-loc.el}. +}in a directory. Whenever Emacs visits any file in that directory or +any of its subdirectories, it will apply the directory-local variables specified in @file{.dir-locals.el}, as though they had been defined as file-local variables for that file (@pxref{File Variables}). Emacs searches for @file{.dir-locals.el} starting in the directory of the @@ -1331,6 +1328,11 @@ this search is skipped for remote files. If needed, the search can be extended for remote files by setting the variable @code{enable-remote-dir-locals} to @code{t}. + You can also use @file{.dir-locals-2.el}; if found, Emacs loads it +in addition to @file{.dir-locals.el}. This is useful when +@file{.dir-locals.el} is under version control in a shared repository +and can't be used for personal customizations. + The @file{.dir-locals.el} file should hold a specially-constructed list, which maps major mode names (symbols) to alists (@pxref{Association Lists,,, elisp, The Emacs Lisp Reference Manual}). commit fadf6535c0b629fe63d821ff86f0da25fae3fb6c Author: Eli Zaretskii Date: Tue May 22 20:03:09 2018 +0300 Update comments in Intro to Emacs Lisp * doc/lispintro/emacs-lisp-intro.texi: Explain in the comments what are roman page numbers in Preface about. (Bug#31541) diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 918e46205f..e4ebbe234a 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -245,6 +245,10 @@ This master menu first lists each chapter and index; then it lists every node in every chapter. @end ifnottex +@c Uncomment the 3 lines below, starting with @iftex, if you want the +@c pages of Preface to be numbered in roman numerals. Use -9 instead +@c of -11 for smallbook format. + @c >>>> Set pageno appropriately <<<< @c The first page of the Preface is a roman numeral; it is the first @@ -1012,6 +1016,8 @@ bob@@gnu.org @c makes a link to something in the first 4 pages though?). @c E.g., note that the Emacs manual has a preface, but does not bother @c resetting the page numbers back to 1 after that. +@c Alternatively, uncomment the 3 lines above (search for ``pageno'') +@c to have the preface numbered in roman numerals. @iftex @headings off @evenheading @thispage @| @| @thischapter commit a51725280ac3f4db3b9a1a552f25fb4204f45a4d Author: Paul Eggert Date: Tue May 22 09:13:20 2018 -0700 Minor tweaks to recent fix for Bug#31545 * src/xwidget.c (webkit_javascript_finished_cb) (Fxwidget_webkit_execute_script): Use intptr_t to avoid warnings in the (unlikely) event that ptrdiff_t and void * differ in width. (save_script_callback): Simplify by using xlispdstrdup and larger_vector. diff --git a/src/xwidget.c b/src/xwidget.c index 16243b7789..32022abf34 100644 --- a/src/xwidget.c +++ b/src/xwidget.c @@ -370,7 +370,7 @@ webkit_javascript_finished_cb (GObject *webview, GError *error = NULL; struct xwidget *xw = g_object_get_data (G_OBJECT (webview), XG_XWIDGET); - ptrdiff_t script_idx = (ptrdiff_t) arg; + ptrdiff_t script_idx = (intptr_t) arg; Lisp_Object script_callback = AREF (xw->script_callbacks, script_idx); ASET (xw->script_callbacks, script_idx, Qnil); if (!NILP (script_callback)) @@ -711,33 +711,20 @@ DEFUN ("xwidget-webkit-zoom", static ptrdiff_t save_script_callback (struct xwidget *xw, Lisp_Object script, Lisp_Object fun) { - ptrdiff_t script_bytes = STRING_BYTES (XSTRING (script)); - char *script_data = xmalloc (script_bytes + 1); - memcpy (script_data, SSDATA (script), script_bytes + 1); - - ptrdiff_t idx; Lisp_Object cbs = xw->script_callbacks; if (NILP (cbs)) xw->script_callbacks = cbs = Fmake_vector (make_number (32), Qnil); /* Find first free index. */ - for (idx = 0; ; idx++) - { - if (idx >= ASIZE (cbs)) - { - /* Resize script/callback save vector. */ - Lisp_Object new_cbs = Fmake_vector (make_number (idx + 32), Qnil); - ptrdiff_t n; - for (n = 0; n < idx; n++) - ASET (new_cbs, n, AREF (cbs, n)); - xw->script_callbacks = cbs = new_cbs; - } - if (NILP (AREF (cbs, idx))) - { - ASET (cbs, idx, Fcons (make_save_ptr (script_data), fun)); - break; - } - } + ptrdiff_t idx; + for (idx = 0; !NILP (AREF (cbs, idx)); idx++) + if (idx + 1 == ASIZE (cbs)) + { + xw->script_callbacks = cbs = larger_vector (cbs, 1, -1); + break; + } + + ASET (cbs, idx, Fcons (make_save_ptr (xlispstrdup (script)), fun)); return idx; } @@ -757,7 +744,7 @@ argument procedure FUN.*/) script = ENCODE_SYSTEM (script); /* Protect script and fun during GC. */ - ptrdiff_t idx = save_script_callback (xw, script, fun); + intptr_t idx = save_script_callback (xw, script, fun); /* JavaScript execution happens asynchronously. If an elisp callback function is provided we pass it to the C callback commit 52ccb24aba8d5b2cda89aa48fb1c813bec5e2321 Author: Philipp Stephani Date: Tue May 22 15:33:22 2018 +0200 ; * doc/os.texi (Batch Mode): use = after --eval diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 396d7dd045..ed73a1c031 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -2314,7 +2314,7 @@ to be outputting to an erasable screen. The idea is that you specify Lisp programs to run; when they are finished, Emacs should exit. The way to specify the programs to run is with @samp{-l @var{file}}, which loads the library named @var{file}, or @samp{-f @var{function}}, which -calls @var{function} with no arguments, or @samp{--eval @var{form}}. +calls @var{function} with no arguments, or @samp{--eval=@var{form}}. Any Lisp program output that would normally go to the echo area, either using @code{message}, or using @code{prin1}, etc., with commit 19e642fdb07b0b6522983e2fa35872ba5fb9f75e Author: Michael Albinus Date: Tue May 22 11:32:33 2018 +0200 Extend secrets.el by searching for object paths. * lisp/net/secrets.el (secrets-search-item-paths): New function. (secrets-search-items): Use it. (secrets-create-item): Adapt docstring. * test/lisp/net/secrets-tests.el (secrets-test04-search): Extend test. diff --git a/lisp/net/secrets.el b/lisp/net/secrets.el index 45c98cae60..ca75d953c4 100644 --- a/lisp/net/secrets.el +++ b/lisp/net/secrets.el @@ -602,16 +602,16 @@ If successful, return the object path of the collection." (secrets-get-item-property item-path "Label")) (secrets-get-items collection-path))))) -(defun secrets-search-items (collection &rest attributes) +(defun secrets-search-item-paths (collection &rest attributes) "Search items in COLLECTION with ATTRIBUTES. ATTRIBUTES are key-value pairs. The keys are keyword symbols, starting with a colon. Example: - (secrets-search-items \"Tramp collection\" :user \"joe\") + (secrets-search-item-paths \"Tramp collection\" :user \"joe\") -The object labels of the found items are returned as list." +The object paths of the found items are returned as list." (let ((collection-path (secrets-unlock-collection collection)) - result props) + props) (unless (secrets-empty-path collection-path) ;; Create attributes list. (while (consp (cdr attributes)) @@ -626,23 +626,30 @@ The object labels of the found items are returned as list." ,(cadr attributes)))) attributes (cddr attributes))) ;; Search. The result is a list of object paths. - (setq result - (dbus-call-method - :session secrets-service collection-path - secrets-interface-collection "SearchItems" - (if props - (cons :array props) - '(:array :signature "{ss}")))) - ;; Return the found items. - (mapcar - (lambda (item-path) (secrets-get-item-property item-path "Label")) - result)))) + (dbus-call-method + :session secrets-service collection-path + secrets-interface-collection "SearchItems" + (if props + (cons :array props) + '(:array :signature "{ss}")))))) + +(defun secrets-search-items (collection &rest attributes) + "Search items in COLLECTION with ATTRIBUTES. +ATTRIBUTES are key-value pairs. The keys are keyword symbols, +starting with a colon. Example: + + (secrets-search-items \"Tramp collection\" :user \"joe\") + +The object labels of the found items are returned as list." + (mapcar + (lambda (item-path) (secrets-get-item-property item-path "Label")) + (apply 'secrets-search-item-paths collection attributes))) (defun secrets-create-item (collection item password &rest attributes) "Create a new item in COLLECTION with label ITEM and password PASSWORD. -The label ITEM must not be unique in COLLECTION. ATTRIBUTES are -key-value pairs set for the created item. The keys are keyword -symbols, starting with a colon. Example: +The label ITEM does not have to be unique in COLLECTION. +ATTRIBUTES are key-value pairs set for the created item. The +keys are keyword symbols, starting with a colon. Example: (secrets-create-item \"Tramp collection\" \"item\" \"geheim\" :method \"sudo\" :user \"joe\" :host \"remote-host\") diff --git a/test/lisp/net/secrets-tests.el b/test/lisp/net/secrets-tests.el index 9a61bca435..b501fa602d 100644 --- a/test/lisp/net/secrets-tests.el +++ b/test/lisp/net/secrets-tests.el @@ -232,7 +232,10 @@ "session" "baz" "secret" :method "ssh" :user "joe" :host "other-host")) - ;; Search the items. + ;; Search the items. `secrets-search-items' uses + ;; `secrets-search-item-paths' internally, it is sufficient to + ;; test only one of them. + (should-not (secrets-search-item-paths "session" :user "john")) (should-not (secrets-search-items "session" :user "john")) (should-not (secrets-search-items "session" :xdg:schema "org.gnu.Emacs.foo")) commit d65430f6cb48d009c28cc27c5171f6fc82c79663 Author: Noam Postavsky Date: Mon May 21 16:48:18 2018 -0400 * etc/NEWS: Mention change in `edebug-prin1-to-string'. diff --git a/etc/NEWS b/etc/NEWS index 65a7210f5e..10afb7b420 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -719,6 +719,13 @@ breakpoint (e.g. with "f" and "o") by customizing the new option This allows you to enlarge the maximum recursion depth when instrumenting code. +*** 'edebug-prin1-to-string' now aliases 'cl-prin1-to-string'. +This means edebug output is affected by variables 'cl-print-readably' +and 'cl-print-compiled'. To completely restore the previous printing +behavior, use + + (fset 'edebug-prin1-to-string #'prin1-to-string) + ** Eshell *** 'eshell-input-filter's value is now a named function commit ef4aec14d159b1ac66f4bca97955fc6a9a9a07d6 Author: Eli Zaretskii Date: Mon May 21 21:08:39 2018 +0300 ; * doc/lispref/hash.texi (Defining Hash): Fix typos. diff --git a/doc/lispref/hash.texi b/doc/lispref/hash.texi index ddd46a55ed..f7d33eafa3 100644 --- a/doc/lispref/hash.texi +++ b/doc/lispref/hash.texi @@ -293,8 +293,8 @@ This function returns a hash code for Lisp object @var{obj}. Its result reflects identity of @var{obj}, but not its contents. If two objects @var{obj1} and @var{obj2} are @code{eq}, then -@code{(xhash @var{obj1})} and @code{(xhash @var{obj2})} are the same -integer. +@code{(sxhash-eq @var{obj1})} and @code{(sxhash-eq @var{obj2})} are +the same integer. @end defun @defun sxhash-eql obj @@ -304,8 +304,8 @@ except for the case where the object is a float number, in which case hash code is generated for the value. If two objects @var{obj1} and @var{obj2} are @code{eql}, then -@code{(xhash @var{obj1})} and @code{(xhash @var{obj2})} are the same -integer. +@code{(sxhash-eql @var{obj1})} and @code{(sxhash-eql @var{obj2})} are +the same integer. @end defun This example creates a hash table whose keys are strings that are commit 2981952b6ceaf3d93ed018fc7b7b2034cd10194b Author: Eli Zaretskii Date: Mon May 21 18:43:03 2018 +0300 Another attempt to fix sql.el * lisp/progmodes/sql.el (sql-product-interactive): Fix calculation of the SQL buffer name. (Bug#31446) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index 1b2cdaf5f6..e7d7494d2c 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -4270,8 +4270,13 @@ the call to \\[sql-product-interactive] with (if (string-prefix-p "*SQL: " new-name t) new-name (concat "*SQL: " new-name "*"))) - ((eq new-name '(4)) - (sql-rename-buffer new-name)) + ((equal new-name '(4)) + (concat + "*SQL: " + (read-string + "Buffer name (\"*SQL: XXX*\"; enter `XXX'): " + sql-alternate-buffer-name) + "*")) (t (format "*SQL: %s*" new-name))))) commit b1b96d7cd9433b6424ad12019f86c0eea29ab621 Author: Eli Zaretskii Date: Mon May 21 18:01:57 2018 +0300 Update binding of 'M-.' in Intro to Emacs Lisp * doc/lispintro/emacs-lisp-intro.texi (On Reading this Text) (Finding More, Buffer Related Review, Buffer Exercises) (Find a File, Conclusion): 'M-.' is now bound to 'xref-find-definitions'. (Bug#31542) diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 1a3081ca9f..918e46205f 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -822,10 +822,10 @@ programming language, the examples and guided tours will give you an opportunity to get acquainted with Emacs as a Lisp programming environment. GNU Emacs supports programming and provides tools that you will want to become comfortable using, such as @kbd{M-.} (the key -which invokes the @code{find-tag} command). You will also learn about -buffers and other objects that are part of the environment. -Learning about these features of Emacs is like learning new routes -around your home town. +which invokes the @code{xref-find-definitions} command). You will +also learn about buffers and other objects that are part of the +environment. Learning about these features of Emacs is like learning +new routes around your home town. @ignore In addition, I have written several programs as extended examples. @@ -5357,7 +5357,7 @@ Here is a brief summary of the various functions discussed in this chapter. Print the documentation for a function or variable. Conventionally bound to @kbd{C-h f} and @kbd{C-h v}. -@item find-tag +@item xref-find-definitions Find the file containing the source for a function or variable and switch buffers to it, positioning point at the beginning of the item. Conventionally bound to @kbd{M-.} (that's a period following the @@ -5411,8 +5411,8 @@ Use @code{if} and @code{get-buffer} to write a function that prints a message telling you whether a buffer exists. @item -Using @code{find-tag}, find the source for the @code{copy-to-buffer} -function. +Using @code{xref-find-definitions}, find the source for the +@code{copy-to-buffer} function. @end itemize @node More Complex @@ -14753,10 +14753,11 @@ creating one if none already exists." @noindent (The most recent version of the @code{find-file} function definition -permits you to specify optional wildcards to visit multiple files; that -makes the definition more complex and we will not discuss it here, -since it is not relevant. You can see its source using either -@kbd{M-.} (@code{find-tag}) or @kbd{C-h f} (@code{describe-function}).) +permits you to specify optional wildcards to visit multiple files; +that makes the definition more complex and we will not discuss it +here, since it is not relevant. You can see its source using either +@kbd{M-.} (@code{xref-find-definitions}) or @kbd{C-h f} +(@code{describe-function}).) @ignore In Emacs 22 @@ -18543,8 +18544,8 @@ introduction, it comes as a Texinfo source file, so you can read it on your computer and as a typeset, printed book.) Go to the other built-in help that is part of GNU Emacs: the built-in -documentation for all functions and variables, and @code{find-tag}, -the program that takes you to sources. +documentation for all functions and variables, and +@code{xref-find-definitions}, the program that takes you to sources. Here is an example of how I explore the sources. Because of its name, @file{simple.el} is the file I looked at first, a long time ago. As @@ -18580,7 +18581,7 @@ contains the name of the library containing the function's source. You can put point over the name of the library and press the @key{RET} key, which in this situation is bound to @code{help-follow}, and be taken directly to the source, in the same way as @kbd{M-.} -(@code{find-tag}). +(@code{xref-find-definitions}). The definition for @code{describe-function} illustrates how to customize the @code{interactive} expression without using the standard @@ -18588,13 +18589,14 @@ character codes; and it shows how to create a temporary buffer. (The @code{indent-to} function is written in C rather than Emacs Lisp; it is a built-in function. @code{help-follow} takes you to its -source as does @code{find-tag}, when properly set up.) - -You can look at a function's source using @code{find-tag}, which is -bound to @kbd{M-.} Finally, you can find out what the Reference -Manual has to say by visiting the manual in Info, and typing @kbd{i} -(@code{Info-index}) and the name of the function, or by looking up the -function in the index to a printed copy of the manual. +source as does @code{xref-find-definitions}, when properly set up.) + +You can look at a function's source using +@code{xref-find-definitions}, which is bound to @kbd{M-.} Finally, +you can find out what the Reference Manual has to say by visiting the +manual in Info, and typing @kbd{i} (@code{Info-index}) and the name of +the function, or by looking up the function in the index to a printed +copy of the manual. Similarly, you can find out what is meant by @code{insert-and-inherit}. commit b239a096f1a4f8a05db859019a048190ea2f94a0 Author: Eli Zaretskii Date: Mon May 21 05:33:57 2018 +0300 Fix a typo in last change in sql.el * lisp/progmodes/sql.el (sql-product-interactive): Use 'null', not 'zerop'. (Bug#31446) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index d783f6542e..1b2cdaf5f6 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -4264,7 +4264,7 @@ the call to \\[sql-product-interactive] with product (sql-get-product-feature product :sqli-options) (cond - ((zerop new-name) + ((null new-name) "*SQL*") ((stringp new-name) (if (string-prefix-p "*SQL: " new-name t) commit 0d8bae5c5543e67aebc773a114aedb2f215aba73 Author: Eli Zaretskii Date: Sun May 20 12:08:03 2018 +0300 Fix capitalization of mail headers * doc/emacs/sending.texi (Mail Format, Mail Headers) (Mail Aliases, Header Editing): Use consistent capitalization of CC, BCC, and FCC. (Bug#31532) diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index b7bdd69c7c..0c5caf0ff9 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -82,7 +82,7 @@ hear the lamentation of their women. At the top of the mail buffer is a set of @dfn{header fields}, which are used for specifying information about the email's recipient(s), subject, and so on. The above buffer contains header fields for -@samp{To}, @samp{Cc}, @samp{Subject}, and @samp{From}. Some header +@samp{To}, @samp{CC}, @samp{Subject}, and @samp{From}. Some header fields are automatically pre-initialized in the mail buffer, when appropriate. @@ -152,23 +152,23 @@ more than one address, use commas to separate them. @item Subject The subject of the message. -@item Cc +@item CC Additional mailing address(es) to send the message to. This is like @samp{To}, except that these readers should not regard the message as directed at them. -@item Bcc +@item BCC Additional mailing address(es) to send the message to, which should -not appear in the header of the message actually sent. @samp{Bcc} stands +not appear in the header of the message actually sent. @samp{BCC} stands for @dfn{blind carbon copies}. -@item Fcc +@item FCC The name of a file, to which a copy of the sent message should be appended. Emacs writes the message in mbox format, unless the file is in Babyl format (used by Rmail before Emacs 23), in which case Emacs writes in Babyl format. If an Rmail buffer is visiting the file, Emacs updates it accordingly. To specify more than one file, use -several @samp{Fcc} fields, with one file name in each field. +several @samp{FCC} fields, with one file name in each field. @item Reply-to An address to which replies should be sent, instead of @samp{From}. @@ -198,7 +198,7 @@ this is normally filled in automatically for you. @end table @noindent -The @samp{To}, @samp{Cc}, and @samp{Bcc} fields can appear any number +The @samp{To}, @samp{CC}, and @samp{BCC} fields can appear any number of times, and each such header field can contain multiple addresses, separated by commas. This way, you can specify any number of places to send the message. These fields can also have continuation lines: @@ -221,11 +221,11 @@ To: foo@@example.net, this@@example.net, buffer by setting the variable @code{mail-default-headers} to a string. Then @kbd{C-x m} inserts this string into the message headers. For example, here is how to add a @samp{Reply-to} and -@samp{Fcc} header to each message: +@samp{FCC} header to each message: @smallexample (setq mail-default-headers - "Reply-to: foo@@example.com\nFcc: ~/Mail/sent") + "Reply-to: foo@@example.com\nFCC: ~/Mail/sent") @end smallexample @noindent @@ -293,7 +293,7 @@ alias definitions and include commands. Mail aliases expand as abbrevs---that is to say, as soon as you type a word-separator character after an alias (@pxref{Abbrevs}). This expansion takes place only within the @samp{To}, @samp{From}, -@samp{Cc}, @samp{Bcc}, and @samp{Reply-to} header fields (plus their +@samp{CC}, @samp{BCC}, and @samp{Reply-to} header fields (plus their @samp{Resent-} variants); it does not take place in other header fields, such as @samp{Subject}. @@ -418,16 +418,16 @@ Move to the @samp{To} header (@code{message-goto-to}). @item C-c C-f C-s Move to the @samp{Subject} header (@code{message-goto-subject}). @item C-c C-f C-c -Move to the @samp{Cc} header (@code{message-goto-cc}). +Move to the @samp{CC} header (@code{message-goto-cc}). @item C-c C-f C-b -Move to the @samp{Bcc} header (@code{message-goto-bcc}). +Move to the @samp{BCC} header (@code{message-goto-bcc}). @item C-c C-f C-r Move to the @samp{Reply-to} header (@code{message-goto-reply-to}). @item C-c C-f C-f Move to the @samp{Mail-Followup-To} header field (@code{message-goto-followup-to}). @item C-c C-f C-w -Add a new @samp{Fcc} header field, with file-name completion +Add a new @samp{FCC} header field, with file-name completion (@code{message-goto-fcc}). @item C-c C-b Move to the start of the message body (@code{message-goto-body}). @@ -463,7 +463,7 @@ the body. @findex message-tab @kindex TAB @r{(Message mode)} While editing a header field that contains addresses, such as -@samp{To:}, @samp{Cc:} and @samp{Bcc:}, you can complete an address by +@samp{To:}, @samp{CC:} and @samp{BCC:}, you can complete an address by typing @key{TAB} (@code{message-tab}). This attempts to insert the full name corresponding to the address based on a couple of methods, including EUDC, a library that recognizes a number of directory server commit 845fe038e790c7c62c6b294f88648644a4ae7ddd Author: Eli Zaretskii Date: Sun May 20 10:25:26 2018 +0300 Fix buffer names in sql.el * lisp/progmodes/sql.el (sql-product-interactive): Fix the way the buffer name is determined by prefix arg. (Bug#31446) diff --git a/lisp/progmodes/sql.el b/lisp/progmodes/sql.el index e4db6cc38a..d783f6542e 100644 --- a/lisp/progmodes/sql.el +++ b/lisp/progmodes/sql.el @@ -4263,9 +4263,17 @@ the call to \\[sql-product-interactive] with (funcall (sql-get-product-feature product :sqli-comint-func) product (sql-get-product-feature product :sqli-options) - (if (and new-name (string-prefix-p "SQL" new-name t)) - new-name - (concat "SQL: " new-name)))) + (cond + ((zerop new-name) + "*SQL*") + ((stringp new-name) + (if (string-prefix-p "*SQL: " new-name t) + new-name + (concat "*SQL: " new-name "*"))) + ((eq new-name '(4)) + (sql-rename-buffer new-name)) + (t + (format "*SQL: %s*" new-name))))) ;; Set SQLi mode. (let ((sql-interactive-product product)) commit a3885f56534400e8adacf199476ccc407eb20286 Author: Eli Zaretskii Date: Sun May 20 10:11:05 2018 +0300 Minor fixes in the Emacs manual * doc/emacs/misc.texi (Gnus Group Buffer): Fix a typo. (Bug#31534) (Single Shell): Rephrase an unclear sentence. (Bug#31535) (Remote Host): Use @command where appropriate. (Bug#31536) diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index cd9b67bcde..32cd96d421 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -183,7 +183,7 @@ are not shown in the @kbd{l} or @kbd{L} listings. @kindex DEL @r{(Gnus Group mode)} @item @key{DEL} Move point to the previous group containing unread articles -(@code{gnus-group-prev-unread-group}.) +(@code{gnus-group-prev-unread-group}). @kindex n @r{(Gnus Group mode)} @findex gnus-group-next-unread-group @@ -686,7 +686,7 @@ either in the echo area (if it is short), or in an Emacs buffer named @file{*Shell Command Output*}, displayed in another window (if the output is long). The variables @code{resize-mini-windows} and @code{max-mini-window-height} (@pxref{Minibuffer Edit}) control when -the output is considered too long for the echo area. +Emacs should consider the output to be too long for the echo area. For instance, one way to decompress a file named @file{foo.gz} is to type @kbd{M-! gunzip foo.gz @key{RET}}. That shell command normally @@ -1512,8 +1512,8 @@ interface is similar to the @code{more} program. @cindex Rlogin You can login to a remote computer, using whatever commands you -would from a regular terminal (e.g., using the @code{ssh} or -@code{telnet} or @code{rlogin} commands), from a Term window. +would from a regular terminal (e.g., using the @command{ssh} or +@command{telnet} or @code{rlogin} commands), from a Term window. A program that asks you for a password will normally suppress echoing of the password, so the password will not show up in the commit 542f830247715b617594a542961a3bd24ebe4a4f Author: Eli Zaretskii Date: Sat May 19 23:08:38 2018 +0300 Fix a typo in rmail.texi * doc/emacs/rmail.texi (Rmail Summary Edit): Add markup to 'nil'. (Bug#31533) diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi index 0a8bf7cc26..c0ea12f622 100644 --- a/doc/emacs/rmail.texi +++ b/doc/emacs/rmail.texi @@ -999,8 +999,8 @@ summary buffer using @key{SPC} and @key{DEL}. However, in the summary buffer scrolling past the end or the beginning of a message with @key{SPC} or @key{DEL} goes, respectively, to the next or previous undeleted message. Customize the -@code{rmail-summary-scroll-between-messages} option to nil to disable -scrolling to next/previous messages. +@code{rmail-summary-scroll-between-messages} option to @code{nil} to +disable scrolling to next/previous messages. @findex rmail-summary-undelete-many @kbd{M-u} (@code{rmail-summary-undelete-many}) undeletes all deleted commit eb0bc6f7b38b76a2d3a4b76c46242252331d334b Author: Paul Eggert Date: Fri May 18 09:24:04 2018 -0700 * etc/PROBLEMS: Document Bug#31305. diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 1f7fe00bd6..09027332d8 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -3213,6 +3213,15 @@ them to DOS 8+3 limits. To be useful on NT, the MSDOS port of Emacs must be unzipped by a DOS utility, so that long file names are properly truncated. +** Apple Macintosh operating systems + +*** OS X 10.9 and earlier: symlinks autocomplete as directories + +Autocompleting the name of a symbolic link incorrectly appends "/". +Building and running Emacs on OS X 10.10 (or later) fixes the problem. +Older operating systems are no longer supported by Apple. +https://bugs.gnu.org/31305 + ** Archaic window managers and toolkits *** Open Look: Under Open Look, the Emacs window disappears when you type M-q. commit 152a5569c87332f6641b768c2b1eb0cabaada26a Author: Lars Ingebrigtsen Date: Fri May 18 16:05:02 2018 +0200 (gnus-blocked-images): Clarify privacy implications * lisp/gnus/gnus-art.el (gnus-blocked-images): Clarify the privacy implication of altering the value of this variable. (cherry picked from commit f4d9fd3dd45f767eca33fbf1beee40da790fa74e) diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 79b2ade62b..15e88a3422 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el @@ -1635,6 +1635,16 @@ It is a string, such as \"PGP\". If nil, ask user." (defcustom gnus-blocked-images 'gnus-block-private-groups "Images that have URLs matching this regexp will be blocked. +Note that the main reason external images are included in HTML +emails (these days) is to allow tracking whether you've read the +email message or not. If you allow loading images in HTML +emails, you give up privacy. + +The default value of this variable blocks loading external +resources when reading email groups (and therefore stops +tracking), but allows loading external resources when reading +from NNTP newsgroups and the like. + This can also be a function to be evaluated. If so, it will be called with the group name as the parameter, and should return a regexp." commit 73bc6f8693fcbb98b41ee67ab35a4dd8c3940355 Author: Eli Zaretskii Date: Fri May 18 10:58:11 2018 +0300 Fix a typo in describing input methods * lisp/help-mode.el (help-make-xrefs): Fix a typo. (Bug#31448) diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 68fc319e68..a13494aa46 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -474,7 +474,7 @@ that." (and sym (charsetp sym) (help-xref-button 7 'help-character-set sym))) ((assoc data input-method-alist) - (help-xref-button 7 'help-character-set data)) + (help-xref-button 7 'help-input-method data)) ((and sym (coding-system-p sym)) (help-xref-button 7 'help-coding-system sym)) ((and sym (charsetp sym)) commit 6b4bafedbc76ea32228e27d94eeee8da25bf91f0 Author: Eli Zaretskii Date: Fri May 18 09:31:24 2018 +0300 ; Add a comment to emacs-lisp-intro.texi * doc/lispintro/emacs-lisp-intro.texi: Add a comment with the rationale for the manual's seemingly too large size. diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index ebc4c7f009..1a3081ca9f 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi @@ -198,6 +198,31 @@ supports it in developing GNU and promoting software freedom.'' @end ifset @end ifnothtml +@c If you think this manual is too large for an introduction, please +@c consider this email exchange: +@c +@c >> The intro is almost 300 pages in full. I had expected 60 pages. +@c > +@c > This is an important point in its own right. Could you +@c > write a simplified introduction that is only 50 pages or so? +@c > That would be helpful to many potential users, I'd think. +@c +@c > The problem with the introduction is that it was written when +@c > programming was only starting to be a skill "normal" people could +@c > have access to. So the text is extremely verbose and is +@c > sometimes hard to follow because of that. The gist of the +@c > document could be summarized in 50 pages. +@c +@c This book is intentionally addressed to people who don't know how to +@c program. That is its purpose. We recommend people start learning to +@c program using this book. +@c +@c If you DO know how to program in some other language, you can probably +@c learn Emacs Lisp starting with the Emacs Lisp Reference Manual. +@c +@c Richard Stallman , +@c https://lists.gnu.org/archive/html/emacs-devel/2018-05/msg00374.html + @shortcontents @contents