commit b937381e51df28551463da410577c72fb5fa6ace (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Mon Jan 29 23:01:11 2018 -0800 Recognize more system descriptions in report-emacs-bug * lisp/mail/emacsbug.el (report-emacs-bug--os-description): New function, split from report-emacs-bug. Also parse the standard /etc files that can contain release information. (report-emacs-bug): Call report-emacs-bug--os-description. diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index 43e8d3b526..d4caeed788 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -116,6 +116,71 @@ This requires either the macOS \"open\" command, or the freedesktop (concat "mailto:" to))) (error "Subject, To or body not found"))))) +(defun report-emacs-bug--os-description () + "Return a string describing the operating system, or nil." + (cond ((eq system-type 'darwin) + (let (os) + (with-temp-buffer + (when (eq 0 (ignore-errors + (call-process "sw_vers" nil '(t nil) nil))) + (dolist (s '("ProductName" "ProductVersion")) + (goto-char (point-min)) + (if (re-search-forward (format "^%s\\s-*:\\s-+\\(.*\\)$" s) + nil t) + (setq os (concat os " " (match-string 1))))))) + os)) + ;; TODO include other branches here. + ;; MS Windows: systeminfo ? + ;; Cygwin, *BSD, etc: ? + (t + (or (let ((file "/etc/os-release")) + (and (file-readable-p file) + (with-temp-buffer + (insert-file-contents file) + (if (re-search-forward + "^\\sw*PRETTY_NAME=\"?\\(.+?\\)\"?$" nil t) + (match-string 1) + (let (os) + (when (re-search-forward + "^\\sw*NAME=\"?\\(.+?\\)\"?$" nil t) + (setq os (match-string 1)) + (if (re-search-forward + "^\\sw*VERSION=\"?\\(.+?\\)\"?$" nil t) + (setq os (concat os " " (match-string 1)))) + os)))))) + (with-temp-buffer + (when (eq 0 (ignore-errors + (call-process "lsb_release" nil '(t nil) + nil "-d"))) + (goto-char (point-min)) + (if (looking-at "^\\sw+:\\s-+") + (goto-char (match-end 0))) + (buffer-substring (point) (line-end-position)))) + (let ((file "/etc/lsb-release")) + (and (file-readable-p file) + (with-temp-buffer + (insert-file-contents file) + (if (re-search-forward + "^\\sw*DISTRIB_DESCRIPTION=\"?\\(.*release.*?\\)\"?$" nil t) + (match-string 1))))) + (catch 'found + (dolist (f (append (file-expand-wildcards "/etc/*-release") + '("/etc/debian_version"))) + (and (not (member (file-name-nondirectory f) + '("lsb-release" "os-release"))) + (file-readable-p f) + (with-temp-buffer + (insert-file-contents f) + (if (not (zerop (buffer-size))) + (throw 'found + (format "%s%s" + (if (equal (file-name-nondirectory f) + "debian_version") + "Debian " "") + (buffer-substring + (line-beginning-position) + (line-end-position))))))))))))) + ;; It's the default mail mode, so it seems OK to use its features. (autoload 'message-bogus-recipient-p "message") (autoload 'message-make-address "message") @@ -232,30 +297,7 @@ usually do not have translators for other languages.\n\n"))) "', version " (mapconcat 'number-to-string (x-server-version) ".") "\n") (error t))) - (let (os) - ;; Maybe this should be factored out in a standalone function, - ;; eg emacs-os-description. - (cond ((eq system-type 'darwin) - (with-temp-buffer - (when (eq 0 (ignore-errors - (call-process "sw_vers" nil '(t nil) nil))) - (dolist (s '("ProductName" "ProductVersion")) - (goto-char (point-min)) - (if (re-search-forward (format "^%s\\s-*:\\s-+\\(.*\\)$" s) - nil t) - (setq os (concat os " " (match-string 1)))))))) - ;; TODO include other branches here. - ;; MS Windows: systeminfo ? - ;; Cygwin, *BSD, etc: ? - (t - (with-temp-buffer - (when (eq 0 (ignore-errors - (call-process "lsb_release" nil '(t nil) - nil "-d"))) - (goto-char (point-min)) - (if (looking-at "^\\sw+:\\s-+") - (goto-char (match-end 0))) - (setq os (buffer-substring (point) (line-end-position))))))) + (let ((os (ignore-errors (report-emacs-bug--os-description)))) (if (stringp os) (insert "System Description: " os "\n\n"))) (let ((message-buf (get-buffer "*Messages*"))) commit 29abae3572090a86beedb66822ccf34356c8a00c Author: Paul Eggert Date: Mon Jan 29 09:42:42 2018 -0800 Simplify Fcall_interactively * src/callint.c (Fcall_interactively): Use C99 constructs to simplify the code a bit. Stop worrying about circa-1990 compiler bugs. diff --git a/src/callint.c b/src/callint.c index 3d2ed0016c..08a8bba464 100644 --- a/src/callint.c +++ b/src/callint.c @@ -271,45 +271,16 @@ invoke it. If KEYS is omitted or nil, the return value of `this-command-keys-vector' is used. */) (Lisp_Object function, Lisp_Object record_flag, Lisp_Object keys) { - /* `args' will contain the array of arguments to pass to the function. - `visargs' will contain the same list but in a nicer form, so that if we - pass it to Fformat_message it will be understandable to a human. */ - Lisp_Object *args, *visargs; - Lisp_Object specs; - Lisp_Object filter_specs; - Lisp_Object teml; - Lisp_Object up_event; - Lisp_Object enable; - USE_SAFE_ALLOCA; ptrdiff_t speccount = SPECPDL_INDEX (); - /* The index of the next element of this_command_keys to examine for - the 'e' interactive code. */ - ptrdiff_t next_event; - - Lisp_Object prefix_arg; - char *string, *string_end; - ptrdiff_t string_len; - const char *tem; - - /* If varies[i] > 0, the i'th argument shouldn't just have its value - in this call quoted in the command history. It should be - recorded as a call to the function named callint_argfuns[varies[i]]. */ - signed char *varies; - - ptrdiff_t i, nargs; - ptrdiff_t mark; - bool arg_from_tty = 0; + bool arg_from_tty = false; ptrdiff_t key_count; - bool record_then_fail = 0; + bool record_then_fail = false; - Lisp_Object save_this_command, save_last_command; - Lisp_Object save_this_original_command, save_real_this_command; - - save_this_command = Vthis_command; - save_this_original_command = Vthis_original_command; - save_real_this_command = Vreal_this_command; - save_last_command = KVAR (current_kboard, Vlast_command); + Lisp_Object save_this_command = Vthis_command; + Lisp_Object save_this_original_command = Vthis_original_command; + Lisp_Object save_real_this_command = Vreal_this_command; + Lisp_Object save_last_command = KVAR (current_kboard, Vlast_command); if (NILP (keys)) keys = this_command_keys, key_count = this_command_key_count; @@ -320,55 +291,44 @@ invoke it. If KEYS is omitted or nil, the return value of } /* Save this now, since use of minibuffer will clobber it. */ - prefix_arg = Vcurrent_prefix_arg; - - if (SYMBOLP (function)) - enable = Fget (function, Qenable_recursive_minibuffers); - else - enable = Qnil; + Lisp_Object prefix_arg = Vcurrent_prefix_arg; - specs = Qnil; - string = 0; - /* The idea of FILTER_SPECS is to provide a way to - specify how to represent the arguments in command history. - The feature is not fully implemented. */ - filter_specs = Qnil; + Lisp_Object enable = (SYMBOLP (function) + ? Fget (function, Qenable_recursive_minibuffers) + : Qnil); /* If k or K discard an up-event, save it here so it can be retrieved with U. */ - up_event = Qnil; + Lisp_Object up_event = Qnil; /* Set SPECS to the interactive form, or barf if not interactive. */ - { - Lisp_Object form; - form = Finteractive_form (function); - if (CONSP (form)) - specs = filter_specs = Fcar (XCDR (form)); - else - wrong_type_argument (Qcommandp, function); - } + Lisp_Object form = Finteractive_form (function); + if (! CONSP (form)) + wrong_type_argument (Qcommandp, function); + Lisp_Object specs = Fcar (XCDR (form)); + + /* At this point the value of SPECS could help provide a way to + specify how to represent the arguments in command history. + The feature is not fully implemented. */ /* If SPECS is not a string, invent one. */ if (! STRINGP (specs)) { - Lisp_Object input; Lisp_Object funval = Findirect_function (function, Qt); uintmax_t events = num_input_events; - input = specs; + Lisp_Object input = specs; /* Compute the arg values using the user's expression. */ specs = Feval (specs, CONSP (funval) && EQ (Qclosure, XCAR (funval)) ? CAR_SAFE (XCDR (funval)) : Qnil); if (events != num_input_events || !NILP (record_flag)) { - /* We should record this command on the command history. */ - Lisp_Object values; - Lisp_Object this_cmd; - /* Make a copy of the list of values, for the command history, + /* We should record this command on the command history. + Make a copy of the list of values, for the command history, and turn them into things we can eval. */ - values = quotify_args (Fcopy_sequence (specs)); + Lisp_Object values = quotify_args (Fcopy_sequence (specs)); fix_command (input, values); - this_cmd = Fcons (function, values); + Lisp_Object this_cmd = Fcons (function, values); if (history_delete_duplicates) Vcommand_history = Fdelete (this_cmd, Vcommand_history); Vcommand_history = Fcons (this_cmd, Vcommand_history); @@ -376,7 +336,7 @@ invoke it. If KEYS is omitted or nil, the return value of /* Don't keep command history around forever. */ if (INTEGERP (Vhistory_length) && XINT (Vhistory_length) > 0) { - teml = Fnthcdr (Vhistory_length, Vcommand_history); + Lisp_Object teml = Fnthcdr (Vhistory_length, Vcommand_history); if (CONSP (teml)) XSETCDR (teml, Qnil); } @@ -387,48 +347,42 @@ invoke it. If KEYS is omitted or nil, the return value of Vreal_this_command = save_real_this_command; kset_last_command (current_kboard, save_last_command); - Lisp_Object result - = unbind_to (speccount, CALLN (Fapply, Qfuncall_interactively, - function, specs)); - SAFE_FREE (); - return result; + return unbind_to (speccount, CALLN (Fapply, Qfuncall_interactively, + function, specs)); } /* SPECS is set to a string; use it as an interactive prompt. Copy it so that STRING will be valid even if a GC relocates SPECS. */ - SAFE_ALLOCA_STRING (string, specs); - string_len = SBYTES (specs); - string_end = string + string_len; - - /* Here if function specifies a string to control parsing the defaults. */ + USE_SAFE_ALLOCA; + ptrdiff_t string_len = SBYTES (specs); + char *string = SAFE_ALLOCA (string_len + 1); + memcpy (string, SDATA (specs), string_len + 1); + char *string_end = string + string_len; - /* Set next_event to point to the first event with parameters. */ + /* The index of the next element of this_command_keys to examine for + the 'e' interactive code. Initialize it to point to the first + event with parameters. */ + ptrdiff_t next_event; for (next_event = 0; next_event < key_count; next_event++) if (EVENT_HAS_PARAMETERS (AREF (keys, next_event))) break; /* Handle special starting chars `*' and `@'. Also `-'. */ /* Note that `+' is reserved for user extensions. */ - while (1) + for (;; string++) { if (*string == '+') error ("`+' is not used in `interactive' for ordinary commands"); else if (*string == '*') { - string++; if (!NILP (BVAR (current_buffer, read_only))) { if (!NILP (record_flag)) { - char *p = string; - while (p < string_end) - { - if (! (*p == 'r' || *p == 'p' || *p == 'P' - || *p == '\n')) - Fbarf_if_buffer_read_only (Qnil); - p++; - } - record_then_fail = 1; + for (char *p = string + 1; p < string_end; p++) + if (! (*p == 'r' || *p == 'p' || *p == 'P' || *p == '\n')) + Fbarf_if_buffer_read_only (Qnil); + record_then_fail = true; } else Fbarf_if_buffer_read_only (Qnil); @@ -436,14 +390,12 @@ invoke it. If KEYS is omitted or nil, the return value of } /* Ignore this for semi-compatibility with Lucid. */ else if (*string == '-') - string++; + ; else if (*string == '@') { - Lisp_Object event, w; - - event = (next_event < key_count - ? AREF (keys, next_event) - : Qnil); + Lisp_Object w, event = (next_event < key_count + ? AREF (keys, next_event) + : Qnil); if (EVENT_HAS_PARAMETERS (event) && (w = XCDR (event), CONSP (w)) && (w = XCAR (w), CONSP (w)) @@ -458,32 +410,23 @@ invoke it. If KEYS is omitted or nil, the return value of Fselect_window (w, Qnil); } - string++; } else if (*string == '^') - { - call0 (Qhandle_shift_selection); - string++; - } + call0 (Qhandle_shift_selection); else break; } /* Count the number of arguments, which is two (the function itself and `funcall-interactively') plus the number of arguments the interactive spec would have us give to the function. */ - tem = string; - for (nargs = 2; tem < string_end; ) + ptrdiff_t nargs = 2; + for (char const *tem = string; tem < string_end; tem++) { /* 'r' specifications ("point and mark as 2 numeric args") produce *two* arguments. */ - if (*tem == 'r') - nargs += 2; - else - nargs++; + nargs += 1 + (*tem == 'r'); tem = memchr (tem, '\n', string_len - (tem - string)); - if (tem) - ++tem; - else + if (!tem) break; } @@ -491,11 +434,18 @@ invoke it. If KEYS is omitted or nil, the return value of && MOST_POSITIVE_FIXNUM < nargs) memory_full (SIZE_MAX); - /* Allocate them all at one go. This wastes a bit of memory, but + /* ARGS will contain the array of arguments to pass to the function. + VISARGS will contain the same list but in a nicer form, so that if we + pass it to Fformat_message it will be understandable to a human. + Allocate them all at one go. This wastes a bit of memory, but it's OK to trade space for speed. */ + Lisp_Object *args; SAFE_NALLOCA (args, 3, nargs); - visargs = args + nargs; - varies = (signed char *) (visargs + nargs); + Lisp_Object *visargs = args + nargs; + /* If varies[I] > 0, the Ith argument shouldn't just have its value + in this call quoted in the command history. It should be + recorded as a call to the function named callint_argfuns[varies[I]]. */ + signed char *varies = (signed char *) (visargs + nargs); memclear (args, nargs * (2 * word_size + 1)); args = ptr_bounds_clip (args, nargs * sizeof *args); @@ -505,8 +455,8 @@ invoke it. If KEYS is omitted or nil, the return value of if (!NILP (enable)) specbind (Qenable_recursive_minibuffers, Qt); - tem = string; - for (i = 2; tem < string_end; i++) + char const *tem = string; + for (ptrdiff_t i = 2; tem < string_end; i++) { char *pnl = memchr (tem + 1, '\n', string_len - (tem + 1 - string)); ptrdiff_t sz = pnl ? pnl - (tem + 1) : string_end - (tem + 1); @@ -520,9 +470,7 @@ invoke it. If KEYS is omitted or nil, the return value of visargs[i] = Fcompleting_read (callint_message, Vobarray, Qfboundp, Qt, Qnil, Qnil, Qnil, Qnil); - /* Passing args[i] directly stimulates compiler bug. */ - teml = visargs[i]; - args[i] = Fintern (teml, Qnil); + args[i] = Fintern (visargs[i], Qnil); break; case 'b': /* Name of existing buffer. */ @@ -534,7 +482,8 @@ invoke it. If KEYS is omitted or nil, the return value of case 'B': /* Name of buffer, possibly nonexistent. */ args[i] = Fread_buffer (callint_message, - Fother_buffer (Fcurrent_buffer (), Qnil, Qnil), + Fother_buffer (Fcurrent_buffer (), + Qnil, Qnil), Qnil, Qnil); break; @@ -545,20 +494,17 @@ invoke it. If KEYS is omitted or nil, the return value of Qface, Qminibuffer_prompt, callint_message); args[i] = Fread_char (callint_message, Qnil, Qnil); message1_nolog (0); - /* Passing args[i] directly stimulates compiler bug. */ - teml = args[i]; /* See bug#8479. */ - if (! CHARACTERP (teml)) error ("Non-character input-event"); - visargs[i] = Fchar_to_string (teml); + if (! CHARACTERP (args[i])) + error ("Non-character input-event"); + visargs[i] = Fchar_to_string (args[i]); break; case 'C': /* Command: symbol with interactive function. */ visargs[i] = Fcompleting_read (callint_message, Vobarray, Qcommandp, Qt, Qnil, Qnil, Qnil, Qnil); - /* Passing args[i] directly stimulates compiler bug. */ - teml = visargs[i]; - args[i] = Fintern (teml, Qnil); + args[i] = Fintern (visargs[i], Qnil); break; case 'd': /* Value of point. Does not do I/O. */ @@ -569,8 +515,8 @@ invoke it. If KEYS is omitted or nil, the return value of break; case 'D': /* Directory name. */ - args[i] = read_file_name (BVAR (current_buffer, directory), Qlambda, Qnil, - Qfile_directory_p); + args[i] = read_file_name (BVAR (current_buffer, directory), Qlambda, + Qnil, Qfile_directory_p); break; case 'f': /* Existing file name. */ @@ -601,21 +547,19 @@ invoke it. If KEYS is omitted or nil, the return value of args[i] = Fread_key_sequence (callint_message, Qnil, Qnil, Qnil, Qnil); unbind_to (speccount1, Qnil); - teml = args[i]; - visargs[i] = Fkey_description (teml, Qnil); + visargs[i] = Fkey_description (args[i], Qnil); /* If the key sequence ends with a down-event, discard the following up-event. */ - teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); + Lisp_Object teml + = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); if (CONSP (teml)) teml = XCAR (teml); if (SYMBOLP (teml)) { - Lisp_Object tem2; - teml = Fget (teml, Qevent_symbol_elements); /* Ignore first element, which is the base key. */ - tem2 = Fmemq (Qdown, Fcdr (teml)); + Lisp_Object tem2 = Fmemq (Qdown, Fcdr (teml)); if (! NILP (tem2)) up_event = Fread_event (Qnil, Qnil, Qnil); } @@ -632,22 +576,20 @@ invoke it. If KEYS is omitted or nil, the return value of Qface, Qminibuffer_prompt, callint_message); args[i] = Fread_key_sequence_vector (callint_message, Qnil, Qt, Qnil, Qnil); - teml = args[i]; - visargs[i] = Fkey_description (teml, Qnil); + visargs[i] = Fkey_description (args[i], Qnil); unbind_to (speccount1, Qnil); /* If the key sequence ends with a down-event, discard the following up-event. */ - teml = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); + Lisp_Object teml + = Faref (args[i], make_number (XINT (Flength (args[i])) - 1)); if (CONSP (teml)) teml = XCAR (teml); if (SYMBOLP (teml)) { - Lisp_Object tem2; - teml = Fget (teml, Qevent_symbol_elements); /* Ignore first element, which is the base key. */ - tem2 = Fmemq (Qdown, Fcdr (teml)); + Lisp_Object tem2 = Fmemq (Qdown, Fcdr (teml)); if (! NILP (tem2)) up_event = Fread_event (Qnil, Qnil, Qnil); } @@ -659,8 +601,7 @@ invoke it. If KEYS is omitted or nil, the return value of { args[i] = Fmake_vector (make_number (1), up_event); up_event = Qnil; - teml = args[i]; - visargs[i] = Fkey_description (teml, Qnil); + visargs[i] = Fkey_description (args[i], Qnil); } break; @@ -671,18 +612,18 @@ invoke it. If KEYS is omitted or nil, the return value of ? SSDATA (SYMBOL_NAME (function)) : "command")); args[i] = AREF (keys, next_event); - next_event++; varies[i] = -1; /* Find the next parameterized event. */ - while (next_event < key_count - && !(EVENT_HAS_PARAMETERS (AREF (keys, next_event)))) + do next_event++; + while (next_event < key_count + && ! EVENT_HAS_PARAMETERS (AREF (keys, next_event))); break; case 'm': /* Value of mark. Does not do I/O. */ - check_mark (0); + check_mark (false); /* visargs[i] = Qnil; */ args[i] = BVAR (current_buffer, mark); varies[i] = 2; @@ -700,9 +641,7 @@ invoke it. If KEYS is omitted or nil, the return value of FALLTHROUGH; case 'n': /* Read number from minibuffer. */ args[i] = call1 (Qread_number, callint_message); - /* Passing args[i] directly stimulates compiler bug. */ - teml = args[i]; - visargs[i] = Fnumber_to_string (teml); + visargs[i] = Fnumber_to_string (args[i]); break; case 'P': /* Prefix arg in raw form. Does no I/O. */ @@ -719,15 +658,16 @@ invoke it. If KEYS is omitted or nil, the return value of break; case 'r': /* Region, point and mark as 2 args. */ - check_mark (1); - set_marker_both (point_marker, Qnil, PT, PT_BYTE); - /* visargs[i+1] = Qnil; */ - mark = marker_position (BVAR (current_buffer, mark)); - /* visargs[i] = Qnil; */ - args[i] = PT < mark ? point_marker : BVAR (current_buffer, mark); - varies[i] = 3; - args[++i] = PT > mark ? point_marker : BVAR (current_buffer, mark); - varies[i] = 4; + { + check_mark (true); + set_marker_both (point_marker, Qnil, PT, PT_BYTE); + ptrdiff_t mark = marker_position (BVAR (current_buffer, mark)); + /* visargs[i] = visargs[i + 1] = Qnil; */ + args[i] = PT < mark ? point_marker : BVAR (current_buffer, mark); + varies[i] = 3; + args[++i] = PT > mark ? point_marker : BVAR (current_buffer, mark); + varies[i] = 4; + } break; case 's': /* String read via minibuffer without @@ -739,9 +679,7 @@ invoke it. If KEYS is omitted or nil, the return value of case 'S': /* Any symbol. */ visargs[i] = Fread_string (callint_message, Qnil, Qnil, Qnil, Qnil); - /* Passing args[i] directly stimulates compiler bug. */ - teml = visargs[i]; - args[i] = Fintern (teml, Qnil); + args[i] = Fintern (visargs[i], Qnil); break; case 'v': /* Variable name: symbol that is @@ -798,13 +736,14 @@ invoke it. If KEYS is omitted or nil, the return value of else letter = *((unsigned char *) tem); - error ("Invalid control letter `%c' (#o%03o, #x%04x) in interactive calling string", + error (("Invalid control letter `%c' (#o%03o, #x%04x)" + " in interactive calling string"), (int) letter, letter, letter); } } if (varies[i] == 0) - arg_from_tty = 1; + arg_from_tty = true; if (NILP (visargs[i]) && STRINGP (args[i])) visargs[i] = args[i]; @@ -825,19 +764,16 @@ invoke it. If KEYS is omitted or nil, the return value of /* We don't need `visargs' any more, so let's recycle it since we need an array of just the same size. */ visargs[1] = function; - for (i = 2; i < nargs; i++) - { - if (varies[i] > 0) - visargs[i] = list1 (intern (callint_argfuns[varies[i]])); - else - visargs[i] = quotify_arg (args[i]); - } + for (ptrdiff_t i = 2; i < nargs; i++) + visargs[i] = (varies[i] > 0 + ? list1 (intern (callint_argfuns[varies[i]])) + : quotify_arg (args[i])); Vcommand_history = Fcons (Flist (nargs - 1, visargs + 1), Vcommand_history); /* Don't keep command history around forever. */ if (INTEGERP (Vhistory_length) && XINT (Vhistory_length) > 0) { - teml = Fnthcdr (Vhistory_length, Vcommand_history); + Lisp_Object teml = Fnthcdr (Vhistory_length, Vcommand_history); if (CONSP (teml)) XSETCDR (teml, Qnil); } @@ -845,7 +781,7 @@ invoke it. If KEYS is omitted or nil, the return value of /* If we used a marker to hold point, mark, or an end of the region, temporarily, convert it to an integer now. */ - for (i = 2; i < nargs; i++) + for (ptrdiff_t i = 2; i < nargs; i++) if (varies[i] >= 1 && varies[i] <= 4) XSETINT (args[i], marker_position (args[i])); @@ -857,15 +793,11 @@ invoke it. If KEYS is omitted or nil, the return value of Vreal_this_command = save_real_this_command; kset_last_command (current_kboard, save_last_command); - { - Lisp_Object val; - specbind (Qcommand_debug_status, Qnil); + specbind (Qcommand_debug_status, Qnil); - val = Ffuncall (nargs, args); - val = unbind_to (speccount, val); - SAFE_FREE (); - return val; - } + Lisp_Object val = Ffuncall (nargs, args); + SAFE_FREE (); + return unbind_to (speccount, val); } DEFUN ("prefix-numeric-value", Fprefix_numeric_value, Sprefix_numeric_value, commit 81c2c2fa319b27550a2eb5021618c5eef3e813fd Merge: 0d342cbe38 8d4500087f Author: Glenn Morris Date: Mon Jan 29 07:50:21 2018 -0800 Merge from origin/emacs-26 8d45000 (origin/emacs-26) Fix some issues in the emacs/lispref manuals 194ded5 Fix multiple spaces in Emacs manual 57a5461 * lisp/files.el (save-some-buffers): Doc fix. (Bug#30215) 231474f Adjudicate comments to "International" chapter of Emacs manual commit 0d342cbe381be5a74f8a0be81bfc6ecb58e625b3 Merge: 9c2c7b1cdc 0510a78da5 Author: Glenn Morris Date: Mon Jan 29 07:50:21 2018 -0800 ; Merge from origin/emacs-26 The following commit was skipped: 0510a78 Revert "Signal error for symbol names with strange quotes (Bu... commit 9c2c7b1cdc733ea9277676e43ba458d173491b66 Merge: ea8c0e1b9e 6415b2d40c Author: Glenn Morris Date: Mon Jan 29 07:50:21 2018 -0800 Merge from origin/emacs-26 6415b2d Allow read-passwd to hide characters inserted by C-y. (Secur... 8cb4ffb * etc/PROBLEMS: Document issues with double-buffering. (Bug#... fd10070 * lisp/window.el (window-largest-empty-rectangle): Fix grammar. e1a4403 Minor changes in the Emacs manual 372fda6 Improve the "Files" chapter of the Emacs manual 9afc86d Improve the "Search" chapter of the Emacs manual 22f98b3 * src/indent.c (Findent_to): Doc fix. (Bug#30260) 085ee43 Improve documentation of 'edebug-defun' 4dd1b33 Mention crashes due to Noto Serif Kannada fonts commit ea8c0e1b9eaa6651919fb4e039e3fcb5a1fa73db Author: tino calancha Date: Mon Jan 29 22:31:50 2018 +0900 * test/lisp/simple-tests.el (simple-tests-async-shell-command-30280): Add test diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index d13b8599c6..91fdd5e816 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -511,5 +511,30 @@ See Bug#21722." (do-auto-fill) (should (string-equal (buffer-string) "foo bar")))) +(ert-deftest simple-tests-async-shell-command-30280 () + "Test for https://debbugs.gnu.org/30280 ." + :expected-result :failed + (let* ((async-shell-command-buffer 'new-buffer) + (async-shell-command-display-buffer nil) + (str "*Async Shell Command*") + (buffers-name + (cl-loop repeat 2 + collect (buffer-name + (generate-new-buffer str)))) + (inhibit-message t)) + (mapc #'kill-buffer buffers-name) + (async-shell-command + (format "%s -Q -batch -eval '(progn (sleep-for 3600) (message \"foo\"))'" + invocation-name)) + (async-shell-command + (format "%s -Q -batch -eval '(progn (sleep-for 1) (message \"bar\"))'" + invocation-name)) + (let ((buffers (mapcar #'get-buffer buffers-name)) + (processes (mapcar #'get-buffer-process buffers-name))) + (unwind-protect + (should (memq (cadr buffers) (mapcar #'window-buffer (window-list)))) + (mapc #'delete-process processes) + (mapc #'kill-buffer buffers))))) + (provide 'simple-test) ;;; simple-test.el ends here commit 8d4500087f547e203cfba03f61dcbe641bf650de Author: Martin Rudalics Date: Sun Jan 28 19:27:39 2018 +0100 Fix some issues in the emacs/lispref manuals * doc/emacs/basic.texi (Continuation Lines): * doc/emacs/building.texi (GDB User Interface Layout): * doc/emacs/dired.texi (Misc Dired Features): * doc/emacs/maintaining.texi (Identifier Search): * doc/emacs/mark.texi (Using Region): * doc/emacs/misc.texi (Document View, DocView Conversion): * doc/emacs/modes.texi (Major Modes): * doc/emacs/mule.texi (Input Methods, Unibyte Mode): * doc/emacs/sending.texi (Mail Methods): Replace @code by @kbd. * doc/emacs/frames.texi (Text-Only Mouse): * doc/lispref/maps.texi (Standard Keymaps): Replace @kbd by @key. * doc/lispref/compile.texi (Compiler Errors): Write non-@code{nil} instead of non-nil. * doc/lispref/debugging.texi (Internals of Debugger): 'backtrace' is not a command. 'debugger-stack-frame-as-list' is an option. * doc/lispref/display.texi (Size of Displayed Text): 'window-lines-pixel-dimensions' has a last argument 'left'. * doc/lispref/display.texi (Attribute Functions): 'set-face-underline' and 'set-face-inverse-video' are commands. (Tooltips): 'tooltip-frame-parameters' is an option. (Bidirectional Display): 'bidi-paragraph-direction' is an option. * doc/lispref/frames.texi (Cursor Parameters): 'cursor-type' is an option. (Input Focus): Argument FRAME of 'x-focus-frame' is not optional. (Child Frames): Both arguments of 'frame-ancestor-p' are non-optional. 'iconify-child-frame' is an option. * doc/lispref/os.texi (Killing Emacs): 'kill-emacs-query-functions' is an option. * doc/lispref/windows.texi (Mouse Window Auto-selection): 'mouse-autoselect-window' is an option. diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index dbcb8177a0..b59ccf6ccf 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -608,8 +608,8 @@ newlines. In that case, you can use Visual Line mode, which enables @dfn{word wrapping}: instead of wrapping long lines exactly at the right window edge, Emacs wraps them at the word boundaries (i.e., space or tab characters) nearest to the right window edge. Visual -Line mode also redefines editing commands such as @code{C-a}, -@code{C-n}, and @code{C-k} to operate on screen lines rather than +Line mode also redefines editing commands such as @kbd{C-a}, +@kbd{C-n}, and @kbd{C-k} to operate on screen lines rather than logical lines. @xref{Visual Line Mode}. @node Position Info diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index eb8d2027cf..65669ada50 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -926,8 +926,8 @@ premium. You may also specify additional GDB-related buffers to display, either in the same frame or a different one. Select the buffers you -want by typing @code{M-x gdb-display-@var{buffertype}-buffer} or -@code{M-x gdb-frame-@var{buffertype}-buffer}, where @var{buffertype} +want by typing @kbd{M-x gdb-display-@var{buffertype}-buffer} or +@kbd{M-x gdb-frame-@var{buffertype}-buffer}, where @var{buffertype} is the relevant buffer type, such as @samp{breakpoints}. You can do the same with the menu bar, with the @samp{GDB-Windows} and @samp{GDB-Frames} sub-menus of the @samp{GUD} menu. diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index b8450ce998..e3241452c8 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -1515,7 +1515,7 @@ function @code{file-attributes}). This expression is evaluated for each pair of like-named files, and files differ if the expression's value is non-@code{nil}. - For instance, the sequence @code{M-x dired-compare-directories + For instance, the sequence @kbd{M-x dired-compare-directories @key{RET} (> mtime1 mtime2) @key{RET}} marks files newer in this directory than in the other, and marks files older in the other directory than in this one. It also marks files with no counterpart, diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 1b63ee58de..7a7e1fd563 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -1381,7 +1381,7 @@ can use @kbd{M-x xterm-mouse-mode} to give Emacs control over simple uses of the mouse---basically, only non-modified single clicks are supported. Newer versions of @command{xterm} also support mouse-tracking. The normal @command{xterm} mouse functionality for -such clicks is still available by holding down the @kbd{SHIFT} key +such clicks is still available by holding down the @key{SHIFT} key when you press the mouse button. Xterm Mouse mode is a global minor mode (@pxref{Minor Modes}). Repeating the command turns the mode off again. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index cb53529cea..e61c7f9034 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1957,7 +1957,7 @@ query-replace-regexp}. It then performs the specified replacement in the names of the matching identifiers in all the places in all the files where these identifiers are referenced. This is useful when you rename your identifiers as part of refactoring. This command should -be invoked in the @file{*xref*} buffer generated by @code{M-?}. +be invoked in the @file{*xref*} buffer generated by @kbd{M-?}. @findex tags-search @kbd{M-x tags-search} reads a regexp using the minibuffer, then diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi index 072a3bc4b1..7cb48a67e7 100644 --- a/doc/emacs/mark.texi +++ b/doc/emacs/mark.texi @@ -273,7 +273,7 @@ active. If you change the value to @code{kill}, these commands @vindex mark-even-if-inactive Other commands always operate on the region, and have no default behavior. Such commands usually have the word @code{region} in their -names, like @kbd{C-w} (@code{kill-region}) and @code{C-x C-u} +names, like @kbd{C-w} (@code{kill-region}) and @kbd{C-x C-u} (@code{upcase-region}). If the mark is inactive, they operate on the @dfn{inactive region}---that is, on the text between point and the position at which the mark was last set (@pxref{Mark Ring}). To diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index fb39a78de9..aeb8560ea0 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -434,8 +434,8 @@ by typing @kbd{C-c C-c} you switch to the fallback mode. With another also be displayed from within DocView mode by typing @kbd{C-c C-t} (@code{doc-view-open-text}). - You can explicitly enable DocView mode with the command @code{M-x -doc-view-mode}. You can toggle DocView minor mode with @code{M-x + You can explicitly enable DocView mode with the command @kbd{M-x +doc-view-mode}. You can toggle DocView minor mode with @kbd{M-x doc-view-minor-mode}. When DocView mode starts, it displays a welcome screen and begins @@ -576,7 +576,7 @@ including its entire margins. For efficiency, DocView caches the images produced by @command{gs}. The name of this directory is given by the variable @code{doc-view-cache-directory}. You can clear the cache directory by -typing @code{M-x doc-view-clear-cache}. +typing @kbd{M-x doc-view-clear-cache}. @findex doc-view-kill-proc @findex doc-view-kill-proc-and-buffer diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index 97fe4cb708..f0986702d5 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi @@ -104,7 +104,7 @@ value for the variable @code{comment-start}, which determines how source code comments are delimited (@pxref{Comments}). To view the documentation for the current major mode, including a -list of its key bindings, type @code{C-h m} (@code{describe-mode}). +list of its key bindings, type @kbd{C-h m} (@code{describe-mode}). @xref{Misc Help}. @cindex mode hook diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index be07bcc5bb..fd25604c70 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -477,7 +477,7 @@ display the next row or the previous row. Type @kbd{C-f} and @kbd{C-b} to move forward and backward among the alternatives in the current row. As you do this, Emacs highlights -the current alternative with a special color; type @code{C-@key{SPC}} +the current alternative with a special color; type @kbd{C-@key{SPC}} to select the current alternative and use it as input. The alternatives in the row are also numbered; the number appears before the alternative. Typing a number selects the associated alternative @@ -1658,24 +1658,25 @@ characters: @cindex 8-bit input @item You can use an input method for the selected language environment. -@xref{Input Methods}. When you use an input method in a unibyte buffer, -the non-@acronym{ASCII} character you specify with it is converted to unibyte. +@xref{Input Methods}. When you use an input method in a unibyte +buffer, the non-@acronym{ASCII} character you specify with it is +converted to unibyte. @item If your keyboard can generate character codes 128 (decimal) and up, -representing non-@acronym{ASCII} characters, you can type those character codes -directly. +representing non-@acronym{ASCII} characters, you can type those +character codes directly. On a graphical display, you should not need to do anything special to use these keys; they should simply work. On a text terminal, you -should use the command @code{M-x set-keyboard-coding-system} or customize the -variable @code{keyboard-coding-system} to specify which coding system -your keyboard uses (@pxref{Terminal Coding}). Enabling this feature -will probably require you to use @key{ESC} to type Meta characters; -however, on a console terminal or in @code{xterm}, you can arrange for -Meta to be converted to @key{ESC} and still be able type 8-bit -characters present directly on the keyboard or using @key{Compose} or -@key{AltGr} keys. @xref{User Input}. +should use the command @kbd{M-x set-keyboard-coding-system} or +customize the variable @code{keyboard-coding-system} to specify which +coding system your keyboard uses (@pxref{Terminal Coding}). Enabling +this feature will probably require you to use @key{ESC} to type Meta +characters; however, on a console terminal or in @code{xterm}, you can +arrange for Meta to be converted to @key{ESC} and still be able to +type 8-bit characters present directly on the keyboard or using +@key{Compose} or @key{AltGr} keys. @xref{User Input}. @cindex @code{iso-transl} library @cindex compose character diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi index 6f6ef5f3da..299f789617 100644 --- a/doc/emacs/sending.texi +++ b/doc/emacs/sending.texi @@ -676,8 +676,8 @@ such as MIME support. Another available mode is MH-E @vindex mail-user-agent You can choose any of these @dfn{mail user agents} as your preferred -method for editing and sending mail. The commands @code{C-x m}, -@code{C-x 4 m} and @code{C-x 5 m} use whichever agent you have +method for editing and sending mail. The commands @kbd{C-x m}, +@kbd{C-x 4 m} and @kbd{C-x 5 m} use whichever agent you have specified; so do various other parts of Emacs that send mail, such as the bug reporter (@pxref{Bugs}). To specify a mail user agent, customize the variable @code{mail-user-agent}. Currently, legitimate diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 212b5a45dc..0e39866d34 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -527,7 +527,7 @@ string for details. @vindex byte-compile-error-on-warn Sometimes you may wish the byte-compiler warnings to be reported using @code{error}. If so, set @code{byte-compile-error-on-warn} to a -non-nil value. +non-@code{nil} value. @node Byte-Code Objects @section Byte-Code Function Objects diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index fbc5238dc0..2c757dd39d 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -619,7 +619,7 @@ was called. The convention for arguments is detailed in the description of @code{debug} (@pxref{Invoking the Debugger}). @end defvar -@deffn Command backtrace +@defun backtrace @cindex run time stack @cindex call stack This function prints a trace of Lisp function calls currently active. @@ -669,9 +669,9 @@ forms are elided. ----------- Buffer: backtrace-output ------------ @end group @end smallexample -@end deffn +@end defun -@defvar debugger-stack-frame-as-list +@defopt debugger-stack-frame-as-list If this variable is non-@code{nil}, every stack frame of the backtrace is displayed as a list. This aims at improving the backtrace readability at the cost of special forms no longer being visually @@ -700,7 +700,7 @@ example would look as follows: ----------- Buffer: backtrace-output ------------ @end group @end smallexample -@end defvar +@end defopt @defvar debug-on-next-call @cindex @code{eval}, and debugging diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 921fd10454..fbf943a08c 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -1980,7 +1980,7 @@ height of both, if present, in the return value. whole and does not care about the size of individual lines. The following function does. -@defun window-lines-pixel-dimensions &optional window first last body inverse +@defun window-lines-pixel-dimensions &optional window first last body inverse left This function calculates the pixel dimensions of each line displayed in the specified @var{window}. It does so by walking @var{window}'s current glyph matrix---a matrix storing the glyph (@pxref{Glyphs}) of @@ -2775,15 +2775,15 @@ This sets the @code{:slant} attribute of @var{face} to @var{normal} if @var{italic-p} is @code{nil}, and to @var{italic} otherwise. @end defun -@defun set-face-underline face underline &optional frame +@deffn Command set-face-underline face underline &optional frame This sets the @code{:underline} attribute of @var{face} to @var{underline}. -@end defun +@end deffn -@defun set-face-inverse-video face inverse-video-p &optional frame +@deffn Command set-face-inverse-video face inverse-video-p &optional frame This sets the @code{:inverse-video} attribute of @var{face} to @var{inverse-video-p}. -@end defun +@end deffn @deffn Command invert-face face &optional frame This swaps the foreground and background colors of face @var{face}. @@ -7362,7 +7362,7 @@ have their own frame parameters (@pxref{Frame Parameters}). Unlike other frames, the default parameters for tooltip frames are stored in a special variable. -@defvar tooltip-frame-parameters +@defopt tooltip-frame-parameters This customizable option holds the default frame parameters used for displaying tooltips. Any font and color parameters are ignored, and the corresponding attributes of the @code{tooltip} face are used instead. @@ -7372,7 +7372,7 @@ absolute frame-relative coordinates where the tooltip should be shown. variables described in @ref{Tooltips,,, emacs, The GNU Emacs Manual}.) Note that the @code{left} and @code{top} parameters, if present, override the values of mouse-relative offsets. -@end defvar +@end defopt @vindex tooltip@r{ face} The @code{tooltip} face determines the appearance of text shown in @@ -7547,7 +7547,7 @@ for its paragraphs. For example, buffers containing program source code should force all paragraphs to be displayed left-to-right. You can use following variable to do this: -@defvar bidi-paragraph-direction +@defopt bidi-paragraph-direction If the value of this buffer-local variable is the symbol @code{right-to-left} or @code{left-to-right}, all paragraphs in the buffer are assumed to have that specified direction. Any other value @@ -7558,7 +7558,7 @@ the base direction of each paragraph from its contents. Modes for program source code should set this to @code{left-to-right}. Prog mode does this by default, so modes derived from Prog mode do not need to set this explicitly (@pxref{Basic Major Modes}). -@end defvar +@end defopt @defun current-bidi-paragraph-direction &optional buffer This function returns the paragraph direction at point in the named diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi index 9c25f4da4d..43fdd8f9d5 100644 --- a/doc/lispref/frames.texi +++ b/doc/lispref/frames.texi @@ -2201,13 +2201,13 @@ The @code{cursor-type} frame parameter may be overridden by the variables @code{cursor-type} and @code{cursor-in-non-selected-windows}: -@defvar cursor-type +@defopt cursor-type This buffer-local variable controls how the cursor looks in a selected window showing the buffer. If its value is @code{t}, that means to use the cursor specified by the @code{cursor-type} frame parameter. Otherwise, the value should be one of the cursor types listed above, and it overrides the @code{cursor-type} frame parameter. -@end defvar +@end defopt @defopt cursor-in-non-selected-windows This buffer-local variable controls how the cursor looks in a window @@ -2725,7 +2725,7 @@ Ideally, the function described next should focus a frame without also raising it above other frames. Unfortunately, many window-systems or window managers may refuse to comply. -@defun x-focus-frame &optional frame noactivate +@defun x-focus-frame frame &optional noactivate This function gives @var{frame} the focus of the X server without necessarily raising it. @var{frame} @code{nil} means use the selected frame. Under X, the optional argument @var{noactivate}, if @@ -3261,13 +3261,12 @@ exists, @var{frame} is considered a child frame of that frame. This function returns @code{nil} if @var{frame} has no parent frame. @end defun -@defun frame-ancestor-p &optional ancestor descendant +@defun frame-ancestor-p ancestor descendant This functions returns non-@code{nil} if @var{ancestor} is an ancestor of @var{descendant}. @var{ancestor} is an ancestor of @var{descendant} when it is either @var{descendant}'s parent frame or it is an ancestor of @var{descendant}'s parent frame. Both, @var{ancestor} and -@var{descendant} must specify live frames and default to the selected -frame. +@var{descendant} must specify live frames. @end defun Note also the function @code{window-largest-empty-rectangle} @@ -3279,7 +3278,7 @@ window. Customizing the following option can be useful to tweak the behavior of @code{iconify-frame} for child frames. -@defvar iconify-child-frame +@defopt iconify-child-frame This option tells Emacs how to proceed when it is asked to iconify a child frame. If it is @code{nil}, @code{iconify-frame} will do nothing when invoked on a child frame. If it is @code{iconify-top-level}, Emacs @@ -3291,7 +3290,7 @@ Any other value means to try iconifying the child frame. Since such an attempt may not be honored by all window managers and can even lead to making the child frame unresponsive to user actions, the default is to iconify the top level frame instead. -@end defvar +@end defopt @node Mouse Tracking diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi index 275b018b15..fc40f28ded 100644 --- a/doc/lispref/maps.texi +++ b/doc/lispref/maps.texi @@ -51,7 +51,7 @@ A sparse keymap for subcommands of the prefix @kbd{C-x r}.@* @xref{Registers,,, emacs, The GNU Emacs Manual}. @item esc-map -A full keymap for @kbd{ESC} (or @kbd{Meta}) commands. +A full keymap for @key{ESC} (or @key{Meta}) commands. @item facemenu-keymap A sparse keymap used for the @kbd{M-o} prefix key. diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 0854468835..1a4e2db44a 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -699,7 +699,7 @@ inadvertently can lose a lot of work, the you have buffers that need saving or subprocesses that are running. It also runs the abnormal hook @code{kill-emacs-query-functions}: -@defvar kill-emacs-query-functions +@defopt kill-emacs-query-functions When @code{save-buffers-kill-terminal} is killing Emacs, it calls the functions in this hook, after asking the standard questions and before calling @code{kill-emacs}. The functions are called in order of @@ -708,7 +708,7 @@ confirmation from the user. If any of them returns @code{nil}, @code{save-buffers-kill-emacs} does not kill Emacs, and does not run the remaining functions in this hook. Calling @code{kill-emacs} directly does not run this hook. -@end defvar +@end defopt @node Suspending Emacs @subsection Suspending Emacs diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 170924f606..3691a2c04f 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -4701,7 +4701,7 @@ managers that give focus to a frame (and thus trigger its subsequent selection) whenever the mouse pointer enters its window-system window (@pxref{Input Focus}). -@defvar mouse-autoselect-window +@defopt mouse-autoselect-window If this variable is non-@code{nil}, Emacs will try to automatically select the window under the mouse pointer. The following values are meaningful: @@ -4729,7 +4729,7 @@ mode line of a window conceptually should not cause its auto-selection. Mouse auto-selection selects the minibuffer window only if it is active, and never deselects the active minibuffer window. -@end defvar +@end defopt Mouse auto-selection can be used to emulate a focus follows mouse policy for child frames (@pxref{Child Frames}) which usually are not tracked by commit 194ded59904b77e7073e697ebf8eac08e05a7ed3 Author: Eli Zaretskii Date: Sun Jan 28 19:29:07 2018 +0200 Fix multiple spaces in Emacs manual * doc/emacs/search.texi (Lax Search): Fix multiple consecutive spaces in printed manual. diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index bb01f10d2c..daaded1929 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1187,15 +1187,16 @@ tailor them to your needs. By default, search commands perform @dfn{lax space matching}: each space, or sequence of spaces, matches any sequence of one or more whitespace characters in the text. (Incremental regexp search has a -separate default; see @ref{Regexp Search}.) Hence, @samp{foo bar} -matches @samp{foo bar}, @samp{foo@w{ }bar}, @samp{foo@w{ }bar}, and -so on (but not @samp{foobar}). More precisely, Emacs matches each -sequence of space characters in the search string to a regular -expression specified by the variable @code{search-whitespace-regexp}. -For example, to make spaces match sequences of newlines as well as -spaces, set it to @samp{"[[:space:]\n]+"}. The default value of this -variable depends on the buffer's major mode; most major modes classify -spaces, tabs, and formfeed characters as whitespace. +separate default; see @ref{Regexp Search}.) Hence, @w{@samp{foo bar}} +matches @w{@samp{foo bar}}, @w{@samp{foo@ @ bar}}, +@w{@samp{foo@ @ @ bar}}, and so on (but not @samp{foobar}). More +precisely, Emacs matches each sequence of space characters in the +search string to a regular expression specified by the variable +@code{search-whitespace-regexp}. For example, to make spaces match +sequences of newlines as well as spaces, set it to +@samp{"[[:space:]\n]+"}. The default value of this variable depends +on the buffer's major mode; most major modes classify spaces, tabs, +and formfeed characters as whitespace. If you want whitespace characters to match exactly, you can turn lax space matching off by typing @kbd{M-s @key{SPC}} commit 57a5461e6ea83d159dfb3d901722b846c6f4c931 Author: Eli Zaretskii Date: Sun Jan 28 19:22:17 2018 +0200 * lisp/files.el (save-some-buffers): Doc fix. (Bug#30215) diff --git a/lisp/files.el b/lisp/files.el index 66420e7259..882eaa6967 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -5209,7 +5209,8 @@ view the differences using `diff-buffer-with-file'. This command first saves any buffers where `buffer-save-without-query' is non-nil, without asking. -Optional argument (the prefix) non-nil means save all with no questions. +Optional argument ARG (interactively, prefix argument) non-nil means save +all with no questions. Optional second argument PRED determines which buffers are considered: If PRED is nil, all the file-visiting buffers are considered. If PRED is t, then certain non-file buffers will also be considered. commit 231474fb76dc1794e74f2701756a86db71b10fea Author: Eli Zaretskii Date: Sun Jan 28 19:14:14 2018 +0200 Adjudicate comments to "International" chapter of Emacs manual * doc/emacs/mule.texi (International Chars) (Language Environments, Input Methods, Defining Fontsets) (Modifying Fontsets): Minor wording changes and typo fixes. Reported by Francis Wright in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index bccba596d3..be07bcc5bb 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -124,7 +124,7 @@ can insert characters that your keyboard does not support, using @kbd{C-x 8 @key{RET}} (@code{insert-char}). @xref{Inserting Text}. Shorthands are available for some common characters; for example, you can insert a left single quotation mark @t{‘} by typing @kbd{C-x 8 -[}, or in Electric Quote mode often by simply typing @kbd{`}. +[}, or in Electric Quote mode, usually by simply typing @kbd{`}. @xref{Quotation Marks}. Emacs also supports various @dfn{input methods}, typically one for each script or language, which make it easier to type characters in the script. @@ -379,7 +379,7 @@ least---the way Emacs decodes non-@acronym{ASCII} characters sent by your keyboa If you modify the @env{LC_ALL}, @env{LC_CTYPE}, or @env{LANG} environment variables while running Emacs (by using @kbd{M-x setenv}), you may want to invoke the @code{set-locale-environment} -function afterwards to readjust the language environment from the new +command afterwards to readjust the language environment from the new locale. @vindex locale-preferred-coding-systems @@ -508,11 +508,10 @@ entering the separate letter and accent. For example, @kbd{o ^ ^} gives you the two characters @samp{o^}. Another way is to type another letter after the @kbd{o}---something that won't combine with that---and immediately delete it. For example, you could type @kbd{o o @key{DEL} -^} to get separate @samp{o} and @samp{^}. - - Another method, more general but not quite as easy to type, is to use -@kbd{C-\ C-\} between two characters to stop them from combining. This -is the command @kbd{C-\} (@code{toggle-input-method}) used twice. +^} to get separate @samp{o} and @samp{^}. Another method, more +general but not quite as easy to type, is to use @kbd{C-\ C-\} between +two characters to stop them from combining. This is the command +@kbd{C-\} (@code{toggle-input-method}) used twice. @ifnottex @xref{Select Input Method}. @end ifnottex @@ -1377,7 +1376,7 @@ hex code or thin space or an empty box instead. (@xref{Text Display, , glyphless characters}, for details.) @node Defining Fontsets -@section Defining fontsets +@section Defining Fontsets @vindex standard-fontset-spec @vindex w32-standard-fontset-spec @@ -1408,8 +1407,8 @@ created automatically. Their names have @samp{bold} instead of @acronym{ASCII} font that you specify with the @samp{Font} resource or the @samp{-fn} argument, or the default font that Emacs found when it started. This is the @dfn{startup fontset} and its name is -@code{fontset-startup}. It does this by replacing the -@var{charset_registry} field with @samp{fontset}, and replacing +@code{fontset-startup}. Emacs generates this fontset by replacing the +@var{charset_registry} field with @samp{fontset}, and replacing the @var{charset_encoding} field with @samp{startup}, then using the resulting string to specify a fontset. @@ -1455,14 +1454,15 @@ The resource value should have this form: @end smallexample @noindent -@var{fontpattern} should have the form of a standard X font name (see -the previous fontset-startup example), except -for the last two fields. They should have the form -@samp{fontset-@var{alias}}. +where @var{fontpattern} should have the form of a standard X font name +(see the previous fontset-startup example), except for the last two +fields. They should have the form @samp{fontset-@var{alias}}. - The fontset has two names, one long and one short. The long name is -@var{fontpattern}. The short name is @samp{fontset-@var{alias}}. You -can refer to the fontset by either name. + Each fontset has two names, one long and one short. The long name +is @var{fontpattern}. The short name is @samp{fontset-@var{alias}}, +the last 2 fields of the long name (e.g., @samp{fontset-startup} for +the fontset automatically created at startup). You can refer to the +fontset by either name. The construct @samp{@var{charset}:@var{font}} specifies which font to use (in this fontset) for one particular character set. Here, @@ -1478,7 +1478,7 @@ that describe the character set. For the @acronym{ASCII} character font, In addition, when several consecutive fields are wildcards, Emacs collapses them into a single wildcard. This is to prevent use of auto-scaled fonts. Fonts made by scaling larger fonts are not usable -for editing, and scaling a smaller font is not also useful, because it is +for editing, and scaling a smaller font is also not useful, because it is better to use the smaller font in its own size, which is what Emacs does. @@ -1547,7 +1547,7 @@ used. Some examples are: (set-fontset-font "fontset-default" 'iso-8859-3 "Liberation Mono") -;; Prefer a big5 font for han characters +;; Prefer a big5 font for han characters. (set-fontset-font "fontset-default" 'han (font-spec :registry "big5") nil 'prepend) commit 0510a78da5faaa40ebfdf59d0ac6107a72c1be1d Author: Noam Postavsky Date: Sun Jan 28 10:23:18 2018 -0500 Revert "Signal error for symbol names with strange quotes (Bug#2967)" That commit did not make the corresponding change to printing, thus breaking the (eq (read (prin1-to-string SYM)) SYM) invariant for those symbols. It's too late in the release cycle to change printing behavior, therefore revert the reader change. Don't merge to master, the print function will be updated there (see "Fix round tripping of read->print for symbols with strange quotes"). diff --git a/etc/NEWS b/etc/NEWS index 46762d65e1..76e6316ca2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1377,11 +1377,6 @@ second argument instead of its first. renamed to 'lread--old-style-backquotes'. No user code should use this variable. ---- -** To avoid confusion caused by "smart quotes", the reader no longer -accepts Lisp symbols which begin with the following quotation -characters: ‘’‛“”‟〞"', unless they are escaped with backslash. - +++ ** 'default-file-name-coding-system' now defaults to a coding system that does not process CRLF. For example, it defaults to 'utf-8-unix' diff --git a/src/lread.c b/src/lread.c index 45d60647be..3104c441ec 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3479,24 +3479,6 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list) if (! NILP (result)) return unbind_to (count, result); } - if (!quoted && multibyte) - { - int ch = STRING_CHAR ((unsigned char *) read_buffer); - switch (ch) - { - case 0x2018: /* LEFT SINGLE QUOTATION MARK */ - case 0x2019: /* RIGHT SINGLE QUOTATION MARK */ - case 0x201B: /* SINGLE HIGH-REVERSED-9 QUOTATION MARK */ - case 0x201C: /* LEFT DOUBLE QUOTATION MARK */ - case 0x201D: /* RIGHT DOUBLE QUOTATION MARK */ - case 0x201F: /* DOUBLE HIGH-REVERSED-9 QUOTATION MARK */ - case 0x301E: /* DOUBLE PRIME QUOTATION MARK */ - case 0xFF02: /* FULLWIDTH QUOTATION MARK */ - case 0xFF07: /* FULLWIDTH APOSTROPHE */ - xsignal2 (Qinvalid_read_syntax, build_string ("strange quote"), - CALLN (Fstring, make_number (ch))); - } - } { Lisp_Object result; ptrdiff_t nbytes = p - read_buffer; diff --git a/test/src/lread-tests.el b/test/src/lread-tests.el index 4fec9286e4..5c3fea7e68 100644 --- a/test/src/lread-tests.el +++ b/test/src/lread-tests.el @@ -142,23 +142,6 @@ literals (Bug#20852)." "unescaped character literals " "`?\"', `?(', `?)', `?;', `?[', `?]' detected!"))))) -(ert-deftest lread-tests--funny-quote-symbols () - "Check that 'smart quotes' or similar trigger errors in symbol names." - (dolist (quote-char - '(#x2018 ;; LEFT SINGLE QUOTATION MARK - #x2019 ;; RIGHT SINGLE QUOTATION MARK - #x201B ;; SINGLE HIGH-REVERSED-9 QUOTATION MARK - #x201C ;; LEFT DOUBLE QUOTATION MARK - #x201D ;; RIGHT DOUBLE QUOTATION MARK - #x201F ;; DOUBLE HIGH-REVERSED-9 QUOTATION MARK - #x301E ;; DOUBLE PRIME QUOTATION MARK - #xFF02 ;; FULLWIDTH QUOTATION MARK - #xFF07 ;; FULLWIDTH APOSTROPHE - )) - (let ((str (format "%cfoo" quote-char))) - (should-error (read str) :type 'invalid-read-syntax) - (should (eq (read (concat "\\" str)) (intern str)))))) - (ert-deftest lread-test-bug26837 () "Test for https://debbugs.gnu.org/26837 ." (let ((load-path (cons commit 6415b2d40c13be2c5cd5f797718c391d1c4ce9e6 Author: Alan Mackenzie Date: Sat Jan 27 22:02:45 2018 +0000 Allow read-passwd to hide characters inserted by C-y. (Security fix.) This fixes bug #30186. The with-silent-modifications was there to prevent records of text property manipulations being put into buffer-undo-list. These had been causing a significant slowdown in CC Mode with C-_ after a large C-y. This CC Mode problem has since been solved by a different workaround. * lisp/subr.el (remove-yank-excluded-properties): Remove the invocation of with-silent-modifications around the text property manipulations. diff --git a/lisp/subr.el b/lisp/subr.el index 052d9cd821..64cbbd52ab 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -3019,10 +3019,9 @@ remove properties specified by `yank-excluded-properties'." run-start prop nil end))) (funcall fun value run-start run-end) (setq run-start run-end))))) - (with-silent-modifications - (if (eq yank-excluded-properties t) - (set-text-properties start end nil) - (remove-list-of-text-properties start end yank-excluded-properties))))) + (if (eq yank-excluded-properties t) + (set-text-properties start end nil) + (remove-list-of-text-properties start end yank-excluded-properties)))) (defvar yank-undo-function) commit 8cb4ffb26208b855729aadc09b0e5a9306930c7b Author: Eli Zaretskii Date: Sat Jan 27 17:26:29 2018 +0200 * etc/PROBLEMS: Document issues with double-buffering. (Bug#30088) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index c194ba5314..1aa497e6e3 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -478,6 +478,21 @@ The solution was to upgrade Semantic to version 2.0pre4 (distributed with CEDET 1.0pre4) or later. Note that Emacs includes Semantic since 23.2, and this issue does not apply to the included version. +*** Display artifacts on GUI frames on X-based systems. + +This is known to be caused by using double-buffering (which is enabled +by default in Emacs 26 and later). The artifacts typically appear +after commands that cause Emacs to scroll the display. + +You can disable double-buffering by evaluating the following form: + + (modify-all-frames-parameters '((inhibit-double-buffering . t))) + +To make this permanent, add it to your ~/.emacs init file. + +Note that disabling double-buffering will cause flickering of the +display in some situations. + *** Self-documentation messages are garbled. This means that the file 'etc/DOC' doesn't properly correspond commit fd10070bf20dd73825ad3b3d4e7cd56306154034 Author: Charles A. Roelli Date: Sat Jan 27 14:52:03 2018 +0100 * lisp/window.el (window-largest-empty-rectangle): Fix grammar. diff --git a/lisp/window.el b/lisp/window.el index d7fdceb205..abd1a68b1f 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8452,7 +8452,7 @@ of WINDOW. Optional argument LEFT, if non-nil, means to return values suitable for buffers displaying right to left text." ;; Process lines as returned by ‘window-lines-pixel-dimensions’. - ;; STACK is a stack that contains rows that have to be processed yet. + ;; STACK is a stack that contains rows that have yet to be processed. (let* ((window (window-normalize-window window t)) (disjoint (and (consp count) (cdr count))) (count (or (and (numberp count) count) commit e1a44033a8dbb53588c77a9e41c11725b2ed53b0 Author: Eli Zaretskii Date: Sat Jan 27 14:06:02 2018 +0200 Minor changes in the Emacs manual * doc/emacs/search.texi (Search Customizations): Minor wording change. * doc/emacs/files.texi (Customize Save): Add a cross-reference for batch mode. diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index f6813a4aee..1418a639fb 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -738,7 +738,7 @@ survive a crash even if @code{fsync} works properly. The @code{write-region-inhibit-fsync} variable controls whether Emacs invokes @code{fsync} after saving a file. The variable's default value is @code{nil} when Emacs is interactive, and @code{t} -when Emacs runs in batch mode. +when Emacs runs in batch mode (@pxref{Initial Options, batch mode}). Emacs never uses @code{fsync} when writing auto-save files, as these files might lose data anyway. diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index a146e42185..bb01f10d2c 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1911,4 +1911,4 @@ window Emacs pops up for displaying the search results; the default is that displays the buffer where you start searching, but if the value of @code{search-slow-window-lines} is negative, that means to put the window at the top and give it the number of lines that is the absolute -value of that value. +value of @code{search-slow-window-lines}. commit 372fda682a2a80f4cf946dfa6d57853a68b6982e Author: Eli Zaretskii Date: Sat Jan 27 13:17:24 2018 +0200 Improve the "Files" chapter of the Emacs manual * doc/emacs/files.texi (File Shadowing): Rearrange text to explain the notion of shadowing before describing the commands. Suggested by Will Korteland in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 586086dda2..f6813a4aee 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -824,6 +824,25 @@ diff-buffer-with-file} command. @xref{Comparing Files}. @cindex file shadows @findex shadow-initialize + You can arrange to keep identical @dfn{shadow} copies of certain +files in more than one place---possibly on different machines. To do +this, first you must set up a @dfn{shadow file group}, which is a set +of identically-named files shared between a list of sites. The file +group is permanent and applies to further Emacs sessions as well as +the current one. Once the group is set up, every time you exit Emacs, +it will copy the file you edited to the other files in its group. You +can also do the copying without exiting Emacs, by typing @w{@kbd{M-x +shadow-copy-files}}. + +@cindex shadow cluster +A @dfn{shadow cluster} is a group of hosts that share directories, so +that copying to or from one of them is sufficient to update the file +on all of them. Each shadow cluster has a name, and specifies the +network address of a primary host (the one we copy files to), and a +regular expression that matches the host names of all the other hosts +in the cluster. You can define a shadow cluster with @w{@kbd{M-x +shadow-define-cluster}}. + @table @kbd @item M-x shadow-initialize Set up file shadowing. @@ -839,32 +858,15 @@ Copy all pending shadow files. Cancel the instruction to shadow some files. @end table -You can arrange to keep identical @dfn{shadow} copies of certain files -in more than one place---possibly on different machines. To do this, -first you must set up a @dfn{shadow file group}, which is a set of -identically-named files shared between a list of sites. The file -group is permanent and applies to further Emacs sessions as well as -the current one. Once the group is set up, every time you exit Emacs, -it will copy the file you edited to the other files in its group. You -can also do the copying without exiting Emacs, by typing @kbd{M-x -shadow-copy-files}. - -To set up a shadow file group, use @kbd{M-x -shadow-define-literal-group} or @kbd{M-x shadow-define-regexp-group}. -See their documentation strings for further information. +To set up a shadow file group, use @w{@kbd{M-x +shadow-define-literal-group}} or @w{@kbd{M-x +shadow-define-regexp-group}}. See their documentation strings for +further information. Before copying a file to its shadows, Emacs asks for confirmation. You can answer ``no'' to bypass copying of this file, this time. If you want to cancel the shadowing permanently for a certain file, use -@kbd{M-x shadow-cancel} to eliminate or change the shadow file group. - -A @dfn{shadow cluster} is a group of hosts that share directories, so -that copying to or from one of them is sufficient to update the file -on all of them. Each shadow cluster has a name, and specifies the -network address of a primary host (the one we copy files to), and a -regular expression that matches the host names of all the other hosts -in the cluster. You can define a shadow cluster with @kbd{M-x -shadow-define-cluster}. +@w{@kbd{M-x shadow-cancel}} to eliminate or change the shadow file group. @node Time Stamps @subsection Updating Time Stamps Automatically commit 9afc86d1face8dfe738b1792a752124b1168b277 Author: Eli Zaretskii Date: Sat Jan 27 12:53:29 2018 +0200 Improve the "Search" chapter of the Emacs manual * doc/emacs/search.texi (Regexps, Regexp Backslash): Improve and clarify wording. (Search Customizations): Fix a typo. Reported by Will Korteland in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index b351a741aa..a146e42185 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -776,16 +776,16 @@ Search}. @cindex regular expression @cindex regexp - This manual describes regular expression features that users -typically use. @xref{Regular Expressions,,, elisp, The Emacs Lisp -Reference Manual}, for additional features used mainly in Lisp -programs. + This section (and this manual in general) describes regular +expression features that users typically use. @xref{Regular +Expressions,,, elisp, The Emacs Lisp Reference Manual}, for additional +features used mainly in Lisp programs. Regular expressions have a syntax in which a few characters are special constructs and the rest are @dfn{ordinary}. An ordinary character matches that same character and nothing else. The special characters are @samp{$^.*+?[\}. The character @samp{]} is special if -it ends a character alternative (see later). The character @samp{-} +it ends a character alternative (see below). The character @samp{-} is special inside a character alternative. Any other character appearing in a regular expression is ordinary, unless a @samp{\} precedes it. (When you use regular expressions in a Lisp program, @@ -803,11 +803,11 @@ of ``the same string'', rather than an exception.) Any two regular expressions @var{a} and @var{b} can be concatenated. The result is a regular expression which matches a string if @var{a} matches some amount of the beginning of that string and @var{b} -matches the rest of the string. For example, concatenating the -regular expressions @samp{f} and @samp{o} gives the regular expression -@samp{fo}, which matches only the string @samp{fo}. Still trivial. -To do something nontrivial, you need to use one of the special -characters. Here is a list of them. +matches the rest of the string. As a trivial example, concatenating +the regular expressions @samp{f} and @samp{o} gives the regular +expression @samp{fo}, which matches only the string @samp{fo}. To do +something less trivial, you need to use one of the special characters. +Here is a list of them. @table @asis @item @kbd{.}@: @r{(Period)} @@ -1025,13 +1025,13 @@ To record a matched substring for future reference. This last application is not a consequence of the idea of a parenthetical grouping; it is a separate feature that is assigned as a -second meaning to the same @samp{\( @dots{} \)} construct. In practice +second meaning to the same @w{@samp{\( @dots{} \)}} construct. In practice there is usually no conflict between the two meanings; when there is -a conflict, you can use a shy group. +a conflict, you can use a shy group, described below. @item \(?: @dots{} \) @cindex shy group, in regexp -specifies a shy group that does not record the matched substring; +specifies a @dfn{shy group} that does not record the matched substring; you can't refer back to it with @samp{\@var{d}} (see below). This is useful in mechanically combining regular expressions, so that you can add groups for syntactic purposes without interfering with the @@ -1908,7 +1908,7 @@ which Emacs will use this display mode. The variable @code{search-slow-window-lines} controls the number of lines in the window Emacs pops up for displaying the search results; the default is 1 line. Normally, this window will pop up at the bottom of the window -that displays the buffer where you start searching, bit if the value +that displays the buffer where you start searching, but if the value of @code{search-slow-window-lines} is negative, that means to put the window at the top and give it the number of lines that is the absolute value of that value. commit 22f98b31e333eacb2f23f872b149c76a781449a1 Author: Eli Zaretskii Date: Sat Jan 27 12:11:28 2018 +0200 * src/indent.c (Findent_to): Doc fix. (Bug#30260) diff --git a/src/indent.c b/src/indent.c index 1a8bcebddc..316171e609 100644 --- a/src/indent.c +++ b/src/indent.c @@ -813,7 +813,7 @@ DEFUN ("indent-to", Findent_to, Sindent_to, 1, 2, "NIndent to column: ", Optional second argument MINIMUM says always do at least MINIMUM spaces even if that goes past COLUMN; by default, MINIMUM is zero. -The return value is COLUMN. */) +The return value is the column where the insertion ends. */) (Lisp_Object column, Lisp_Object minimum) { EMACS_INT mincol; commit 085ee439bfe78b78ed50f58dc56285b839153322 Author: Eli Zaretskii Date: Sat Jan 27 12:01:54 2018 +0200 Improve documentation of 'edebug-defun' * doc/lispref/edebug.texi (Instrumenting): Document a workaround for a failure to instrument due to unknown macros. (Bug#30243) (Bug#10577) diff --git a/doc/lispref/edebug.texi b/doc/lispref/edebug.texi index 1b0d314ee7..39430deb48 100644 --- a/doc/lispref/edebug.texi +++ b/doc/lispref/edebug.texi @@ -209,6 +209,20 @@ session, it runs the hook @code{edebug-setup-hook}, then sets it to @code{nil}. You can use this to load Edebug specifications associated with a package you are using, but only when you use Edebug. +@cindex edebug, failure to instrument + If Edebug detects a syntax error while instrumenting, it leaves point +at the erroneous code and signals an @code{invalid-read-syntax} error. +@c FIXME? I can't see that it "leaves point at the erroneous code". +Example: + +@example +@error{} Invalid read syntax: "Expected lambda expression" +@end example + + One potential reason for such a failure to instrument is that some +macro definitions are not yet known to Emacs. To work around this, +load the file which defines the function you are about to instrument. + @findex eval-expression @r{(Edebug)} To remove instrumentation from a definition, simply re-evaluate its definition in a way that does not instrument. There are two ways of @@ -216,10 +230,6 @@ evaluating forms that never instrument them: from a file with @code{load}, and from the minibuffer with @code{eval-expression} (@kbd{M-:}). - If Edebug detects a syntax error while instrumenting, it leaves point -at the erroneous code and signals an @code{invalid-read-syntax} error. -@c FIXME? I can't see that it "leaves point at the erroneous code". - @xref{Edebug Eval}, for other evaluation functions available inside of Edebug. commit 4dd1b33a488782ef3890d37ce1303761ed827c88 Author: Eli Zaretskii Date: Sat Jan 27 11:18:59 2018 +0200 Mention crashes due to Noto Serif Kannada fonts * etc/PROBLEMS: Mention crashes due to Noto Serif Kannada fonts, and the respective workarounds. (Bug#30193) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 32f12eab62..c194ba5314 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -241,12 +241,33 @@ before starting Emacs, or run Emacs as root. ** Emacs crashes when you try to view a file with complex characters. -For example, the etc/HELLO file (as shown by C-h h). -The message "symbol lookup error: /usr/bin/emacs: undefined symbol: OTF_open" -is shown in the terminal from which you launched Emacs. -This problem only happens when you use a graphical display (ie not -with -nw) and compiled Emacs with the "libotf" library for complex -text handling. +One possible reason for this could be a bug in the libotf or the +libm17n-flt/m17n-db libraries Emacs uses for displaying complex +scripts. Make sure you have the latest versions of these libraries +installed. If the problem still persists with the latest released +versions of these libraries, you can try building these libraries from +their CVS repository: + + cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/m17n co libotf + cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/m17n co m17n-db + cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/m17n co m17n-lib + +One known problem that causes such crashes is with using Noto Serif +Kannada fonts. To work around that, force Emacs not to select these +fonts, by adding the following to your ~/.emacs init file: + + (push "Noto Serif Kannada" face-ignored-fonts) + +You can try this interactively in a running Emacs session like this: + + M-: (push "Noto Serif Kannada" face-ignored-fonts) RET + +Another set of problems is caused by an incompatible libotf library. +In this case, displaying the etc/HELLO file (as shown by C-h h) +triggers the following message to be shown in the terminal from which +you launched Emacs: + + symbol lookup error: /usr/bin/emacs: undefined symbol: OTF_open This problem occurs because unfortunately there are two libraries called "libotf". One is the library for handling OpenType fonts,