commit d3e22a1210e2a054f6f6aed44a3b98f6bbcd4546 (HEAD, refs/remotes/origin/master) Author: Mark Oteiza Date: Mon Nov 7 22:11:39 2016 -0500 Prescribe history for read-regexp in query-replace In the fix for bug#24580, the history argument for read-regexp was removed erroneously; read-regexp's history argument defaults to regexp-history, not minibuffer-history. * lisp/replace.el (query-replace-read-from): Tell read-regexp to use minibuffer-history. Fixes bug#24873. diff --git a/lisp/replace.el b/lisp/replace.el index 4fc48d4..60948ef 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -198,7 +198,7 @@ wants to replace FROM with TO." (setq-local text-property-default-nonsticky (cons '(separator . t) text-property-default-nonsticky))) (if regexp-flag - (read-regexp prompt) + (read-regexp prompt nil 'minibuffer-history) (read-from-minibuffer prompt nil nil nil nil (car (if regexp-flag regexp-search-ring search-ring)) t))))) commit 73d47d22197175f08b2dd62e76d7138872e611d2 Author: Mark Oteiza Date: Mon Nov 7 21:31:47 2016 -0500 Remove obsolete default-FOO variables * etc/NEWS: Indicate the removed variables. * lisp/emacs-lisp/edebug.el (edebug-outside-mark): Fix comment. * lisp/subr.el (default-mode-line-format, default-header-line-format): (default-line-spacing, default-abbrev-mode, default-ctl-arrow): (default-truncate-lines, default-left-margin, default-tab-width): (default-case-fold-search, default-left-margin-width): (default-right-margin-width, default-left-fringe-width): (default-right-fringe-width, default-fringes-outside-margins): (default-scroll-bar-width, default-vertical-scroll-bar): (default-indicate-empty-lines, default-indicate-buffer-boundaries): (default-fringe-indicator-alist, default-fringe-cursor-alist): (default-scroll-up-aggressively, default-scroll-down-aggressively): (default-fill-column, default-cursor-type): (default-cursor-in-non-selected-windows): (default-buffer-file-coding-system, default-major-mode): (default-enable-multibyte-characters): Remove obsolete declarations. * src/buffer.c (default-mode-line-format, default-header-line-format): (default-line-spacing, default-abbrev-mode, default-ctl-arrow): (default-truncate-lines, default-left-margin, default-tab-width): (default-case-fold-search, default-left-margin-width): (default-right-margin-width, default-left-fringe-width): (default-right-fringe-width, default-fringes-outside-margins): (default-scroll-bar-width, default-vertical-scroll-bar): (default-indicate-empty-lines, default-indicate-buffer-boundaries): (default-fringe-indicator-alist, default-fringe-cursor-alist): (default-scroll-up-aggressively, default-scroll-down-aggressively): (default-fill-column, default-cursor-type): (default-cursor-in-non-selected-windows): (default-buffer-file-coding-system, default-major-mode): (default-enable-multibyte-characters): Remove. * src/fileio.c (choose_write_coding_system): Fix comment. * src/lisp.h (DEFVAR_BUFFER_DEFAULTS): Remove. diff --git a/etc/NEWS b/etc/NEWS index b88440a..197a694 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -530,6 +530,23 @@ variable. ** Some obsolete functions, variables, and faces have been removed: *** From subr.el: window-dot, set-window-dot, read-input, show-buffer, eval-current-buffer, string-to-int +*** All the default-FOO variables that hold the default value of the +FOO variable. Use 'default-value' and 'setq-default' to access and +change FOO, repectively. The exhaustive list of removed variables is: +'default-mode-line-format', 'default-header-line-format', +'default-line-spacing', 'default-abbrev-mode', 'default-ctl-arrow', +'default-truncate-lines', 'default-left-margin', 'default-tab-width', +'default-case-fold-search', 'default-left-margin-width', +'default-right-margin-width', 'default-left-fringe-width', +'default-right-fringe-width', 'default-fringes-outside-margins', +'default-scroll-bar-width', 'default-vertical-scroll-bar', +'default-indicate-empty-lines', 'default-indicate-buffer-boundaries', +'default-fringe-indicator-alist', 'default-fringe-cursor-alist', +'default-scroll-up-aggressively', 'default-scroll-down-aggressively', +'default-fill-column', 'default-cursor-type', +'default-cursor-in-non-selected-windows', +'default-buffer-file-coding-system', 'default-major-mode', and +'default-enable-multibyte-characters'. *** Many variables obsoleted in 22.1 referring to face symbols +++ diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index 6918539..db78d94 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -2363,7 +2363,7 @@ MSG is printed after `::::} '." (defvar edebug-window-data) ; window and window-start for current function (defvar edebug-outside-windows) ; outside window configuration (defvar edebug-eval-buffer) ; for the evaluation list. -(defvar edebug-outside-d-c-i-n-s-w) ; outside default-cursor-in-non-selected-windows +(defvar edebug-outside-d-c-i-n-s-w) ; outside default cursor-in-non-selected-windows (defvar edebug-eval-list nil) ;; List of expressions to evaluate. diff --git a/lisp/subr.el b/lisp/subr.el index b5c1189..b23f605 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1320,45 +1320,6 @@ be a list of the form returned by `event-start' and `event-end'." ;;;; Obsolescence declarations for variables, and aliases. -;; Special "default-FOO" variables which contain the default value of -;; the "FOO" variable are nasty. Their implementation is brittle, and -;; slows down several unrelated variable operations; furthermore, they -;; can lead to really odd behavior if you decide to make them -;; buffer-local. - -;; Not used at all in Emacs, last time I checked: -(make-obsolete-variable 'default-mode-line-format - "use (setq-default mode-line-format) or (default-value mode-line-format) instead" - "23.2") -(make-obsolete-variable 'default-header-line-format 'header-line-format "23.2") -(make-obsolete-variable 'default-line-spacing 'line-spacing "23.2") -(make-obsolete-variable 'default-abbrev-mode 'abbrev-mode "23.2") -(make-obsolete-variable 'default-ctl-arrow 'ctl-arrow "23.2") -(make-obsolete-variable 'default-truncate-lines 'truncate-lines "23.2") -(make-obsolete-variable 'default-left-margin 'left-margin "23.2") -(make-obsolete-variable 'default-tab-width 'tab-width "23.2") -(make-obsolete-variable 'default-case-fold-search 'case-fold-search "23.2") -(make-obsolete-variable 'default-left-margin-width 'left-margin-width "23.2") -(make-obsolete-variable 'default-right-margin-width 'right-margin-width "23.2") -(make-obsolete-variable 'default-left-fringe-width 'left-fringe-width "23.2") -(make-obsolete-variable 'default-right-fringe-width 'right-fringe-width "23.2") -(make-obsolete-variable 'default-fringes-outside-margins 'fringes-outside-margins "23.2") -(make-obsolete-variable 'default-scroll-bar-width 'scroll-bar-width "23.2") -(make-obsolete-variable 'default-vertical-scroll-bar 'vertical-scroll-bar "23.2") -(make-obsolete-variable 'default-indicate-empty-lines 'indicate-empty-lines "23.2") -(make-obsolete-variable 'default-indicate-buffer-boundaries 'indicate-buffer-boundaries "23.2") -(make-obsolete-variable 'default-fringe-indicator-alist 'fringe-indicator-alist "23.2") -(make-obsolete-variable 'default-fringe-cursor-alist 'fringe-cursor-alist "23.2") -(make-obsolete-variable 'default-scroll-up-aggressively 'scroll-up-aggressively "23.2") -(make-obsolete-variable 'default-scroll-down-aggressively 'scroll-down-aggressively "23.2") -(make-obsolete-variable 'default-fill-column 'fill-column "23.2") -(make-obsolete-variable 'default-cursor-type 'cursor-type "23.2") -(make-obsolete-variable 'default-cursor-in-non-selected-windows 'cursor-in-non-selected-windows "23.2") -(make-obsolete-variable 'default-buffer-file-coding-system 'buffer-file-coding-system "23.2") -(make-obsolete-variable 'default-major-mode 'major-mode "23.2") -(make-obsolete-variable 'default-enable-multibyte-characters - "use enable-multibyte-characters or set-buffer-multibyte instead" "23.2") - (make-obsolete-variable 'define-key-rebound-commands nil "23.2") (make-obsolete-variable 'redisplay-end-trigger-functions 'jit-lock-register "23.1") (make-obsolete-variable 'deferred-action-list 'post-command-hook "24.1") diff --git a/src/buffer.c b/src/buffer.c index 3d205bb..aa556b7 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -5413,144 +5413,6 @@ syms_of_buffer (void) Fput (Qprotected_field, Qerror_message, build_pure_c_string ("Attempt to modify a protected field")); - DEFVAR_BUFFER_DEFAULTS ("default-mode-line-format", - mode_line_format, - doc: /* Default value of `mode-line-format' for buffers that don't override it. -This is the same as (default-value \\='mode-line-format). */); - - DEFVAR_BUFFER_DEFAULTS ("default-header-line-format", - header_line_format, - doc: /* Default value of `header-line-format' for buffers that don't override it. -This is the same as (default-value \\='header-line-format). */); - - DEFVAR_BUFFER_DEFAULTS ("default-cursor-type", cursor_type, - doc: /* Default value of `cursor-type' for buffers that don't override it. -This is the same as (default-value \\='cursor-type). */); - - DEFVAR_BUFFER_DEFAULTS ("default-line-spacing", - extra_line_spacing, - doc: /* Default value of `line-spacing' for buffers that don't override it. -This is the same as (default-value \\='line-spacing). */); - - DEFVAR_BUFFER_DEFAULTS ("default-cursor-in-non-selected-windows", - cursor_in_non_selected_windows, - doc: /* Default value of `cursor-in-non-selected-windows'. -This is the same as (default-value \\='cursor-in-non-selected-windows). */); - - DEFVAR_BUFFER_DEFAULTS ("default-abbrev-mode", - abbrev_mode, - doc: /* Default value of `abbrev-mode' for buffers that do not override it. -This is the same as (default-value \\='abbrev-mode). */); - - DEFVAR_BUFFER_DEFAULTS ("default-ctl-arrow", - ctl_arrow, - doc: /* Default value of `ctl-arrow' for buffers that do not override it. -This is the same as (default-value \\='ctl-arrow). */); - - DEFVAR_BUFFER_DEFAULTS ("default-enable-multibyte-characters", - enable_multibyte_characters, - doc: /* Default value of `enable-multibyte-characters' for buffers not overriding it. -This is the same as (default-value \\='enable-multibyte-characters). */); - - DEFVAR_BUFFER_DEFAULTS ("default-buffer-file-coding-system", - buffer_file_coding_system, - doc: /* Default value of `buffer-file-coding-system' for buffers not overriding it. -This is the same as (default-value \\='buffer-file-coding-system). */); - - DEFVAR_BUFFER_DEFAULTS ("default-truncate-lines", - truncate_lines, - doc: /* Default value of `truncate-lines' for buffers that do not override it. -This is the same as (default-value \\='truncate-lines). */); - - DEFVAR_BUFFER_DEFAULTS ("default-fill-column", - fill_column, - doc: /* Default value of `fill-column' for buffers that do not override it. -This is the same as (default-value \\='fill-column). */); - - DEFVAR_BUFFER_DEFAULTS ("default-left-margin", - left_margin, - doc: /* Default value of `left-margin' for buffers that do not override it. -This is the same as (default-value \\='left-margin). */); - - DEFVAR_BUFFER_DEFAULTS ("default-tab-width", - tab_width, - doc: /* Default value of `tab-width' for buffers that do not override it. -NOTE: This controls the display width of a TAB character, and not -the size of an indentation step. -This is the same as (default-value \\='tab-width). */); - - DEFVAR_BUFFER_DEFAULTS ("default-case-fold-search", - case_fold_search, - doc: /* Default value of `case-fold-search' for buffers that don't override it. -This is the same as (default-value \\='case-fold-search). */); - - DEFVAR_BUFFER_DEFAULTS ("default-left-margin-width", - left_margin_cols, - doc: /* Default value of `left-margin-width' for buffers that don't override it. -This is the same as (default-value \\='left-margin-width). */); - - DEFVAR_BUFFER_DEFAULTS ("default-right-margin-width", - right_margin_cols, - doc: /* Default value of `right-margin-width' for buffers that don't override it. -This is the same as (default-value \\='right-margin-width). */); - - DEFVAR_BUFFER_DEFAULTS ("default-left-fringe-width", - left_fringe_width, - doc: /* Default value of `left-fringe-width' for buffers that don't override it. -This is the same as (default-value \\='left-fringe-width). */); - - DEFVAR_BUFFER_DEFAULTS ("default-right-fringe-width", - right_fringe_width, - doc: /* Default value of `right-fringe-width' for buffers that don't override it. -This is the same as (default-value \\='right-fringe-width). */); - - DEFVAR_BUFFER_DEFAULTS ("default-fringes-outside-margins", - fringes_outside_margins, - doc: /* Default value of `fringes-outside-margins' for buffers that don't override it. -This is the same as (default-value \\='fringes-outside-margins). */); - - DEFVAR_BUFFER_DEFAULTS ("default-scroll-bar-width", - scroll_bar_width, - doc: /* Default value of `scroll-bar-width' for buffers that don't override it. -This is the same as (default-value \\='scroll-bar-width). */); - - DEFVAR_BUFFER_DEFAULTS ("default-vertical-scroll-bar", - vertical_scroll_bar_type, - doc: /* Default value of `vertical-scroll-bar' for buffers that don't override it. -This is the same as (default-value \\='vertical-scroll-bar). */); - - DEFVAR_BUFFER_DEFAULTS ("default-indicate-empty-lines", - indicate_empty_lines, - doc: /* Default value of `indicate-empty-lines' for buffers that don't override it. -This is the same as (default-value \\='indicate-empty-lines). */); - - DEFVAR_BUFFER_DEFAULTS ("default-indicate-buffer-boundaries", - indicate_buffer_boundaries, - doc: /* Default value of `indicate-buffer-boundaries' for buffers that don't override it. -This is the same as (default-value \\='indicate-buffer-boundaries). */); - - DEFVAR_BUFFER_DEFAULTS ("default-fringe-indicator-alist", - fringe_indicator_alist, - doc: /* Default value of `fringe-indicator-alist' for buffers that don't override it. -This is the same as (default-value \\='fringe-indicator-alist). */); - - DEFVAR_BUFFER_DEFAULTS ("default-fringe-cursor-alist", - fringe_cursor_alist, - doc: /* Default value of `fringe-cursor-alist' for buffers that don't override it. -This is the same as (default-value \\='fringe-cursor-alist). */); - - DEFVAR_BUFFER_DEFAULTS ("default-scroll-up-aggressively", - scroll_up_aggressively, - doc: /* Default value of `scroll-up-aggressively'. -This value applies in buffers that don't have their own local values. -This is the same as (default-value \\='scroll-up-aggressively). */); - - DEFVAR_BUFFER_DEFAULTS ("default-scroll-down-aggressively", - scroll_down_aggressively, - doc: /* Default value of `scroll-down-aggressively'. -This value applies in buffers that don't have their own local values. -This is the same as (default-value \\='scroll-down-aggressively). */); - DEFVAR_PER_BUFFER ("header-line-format", &BVAR (current_buffer, header_line_format), Qnil, @@ -5621,9 +5483,6 @@ A string is printed verbatim in the mode line except for %-constructs: %% -- print %. %- -- print infinitely many dashes. Decimal digits after the % specify field width to which to pad. */); - DEFVAR_BUFFER_DEFAULTS ("default-major-mode", major_mode, - doc: /* Value of `major-mode' for new buffers. */); - DEFVAR_PER_BUFFER ("major-mode", &BVAR (current_buffer, major_mode), Qsymbolp, doc: /* Symbol for current buffer's major mode. diff --git a/src/fileio.c b/src/fileio.c index ea6e4ae..d3da0fb 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4649,8 +4649,7 @@ choose_write_coding_system (Lisp_Object start, Lisp_Object end, Lisp_Object file } /* If the decided coding-system doesn't specify end-of-line - format, we use that of - `default-buffer-file-coding-system'. */ + format, we use that of `buffer-file-coding-system'. */ if (! using_default_coding) { Lisp_Object dflt = BVAR (&buffer_defaults, buffer_file_coding_system); diff --git a/src/lisp.h b/src/lisp.h index 2e46592..aaa4423 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -3035,12 +3035,6 @@ extern void defvar_kboard (struct Lisp_Kboard_Objfwd *, const char *, int); defvar_int (&i_fwd, lname, &globals.f_ ## vname); \ } while (false) -#define DEFVAR_BUFFER_DEFAULTS(lname, vname, doc) \ - do { \ - static struct Lisp_Objfwd o_fwd; \ - defvar_lisp_nopro (&o_fwd, lname, &BVAR (&buffer_defaults, vname)); \ - } while (false) - #define DEFVAR_KBOARD(lname, vname, doc) \ do { \ static struct Lisp_Kboard_Objfwd ko_fwd; \ commit 8c9cc9f5c02133fe08f3a1743d5ce0d2019c4d81 Author: Eli Zaretskii Date: Mon Nov 7 19:55:25 2016 +0200 Improve the tutorial * etc/tutorials/TUTORIAL: Minor copyedits. (Bug#24890) * etc/tutorials/TUTORIAL.he: Follow suit. diff --git a/etc/tutorials/TUTORIAL b/etc/tutorials/TUTORIAL index ee328e8..af6ab4e 100644 --- a/etc/tutorials/TUTORIAL +++ b/etc/tutorials/TUTORIAL @@ -698,9 +698,9 @@ Emacs deletes its auto save file. If the computer crashes, you can recover your auto-saved editing by finding the file normally (the file you were editing, not the auto -save file) and then typing M-x recover-file . When it asks for -confirmation, type yes to go ahead and recover the auto-save -data. +save file) and then typing M-x recover-this-file . When it +asks fo confirmation, type yes to go ahead and recover the +auto-save data. * ECHO AREA @@ -947,13 +947,13 @@ most other applications call a "window". Multiple graphical frames can be shown on the screen at the same time. On a text terminal, only one frame can be shown at a time. ->> Type M-x make-frame . +>> Type C-x 5 2. See a new frame appear on your screen. You can do everything you did in the original frame in the new frame. There is nothing special about the first frame. ->> Type M-x delete-frame . +>> Type C-x 5 0. This removes the selected frame. You can also remove a frame by using the normal method provided by the @@ -1017,8 +1017,8 @@ are chosen to indicate what the command does, they can serve as very brief documentation--sufficient to remind you of commands you have already learned. -Multi-character commands such as C-x C-s and (if you have no META or -EDIT or ALT key) v are also allowed after C-h c. +Multi-character commands such as C-x C-s and v (instead of M-v, +if you have no META or EDIT or ALT key) are also allowed after C-h c. To get more information about a command, use C-h k instead of C-h c. @@ -1046,8 +1046,9 @@ You need to type in the name of the variable when Emacs prompts for it. C-h a Command Apropos. Type in a keyword and Emacs will list all the commands whose names contain that keyword. These commands can all be invoked with META-x. - For some commands, Command Apropos will also list a one - or two character sequence which runs the same command. + For some commands, Command Apropos will also list a + sequence of one or more characters which runs the same + command. >> Type C-h a file . @@ -1063,7 +1064,7 @@ corresponding command names (such as C-x C-f beside find-file). you into a special buffer called "*info*" where you can read manuals for the packages installed on your system. Type m emacs to read the Emacs manual. - If you have never before used Info, type ? and Emacs + If you have never before used Info, type h and Emacs will take you on a guided tour of Info mode facilities. Once you are through with this tutorial, you should consult the Emacs Info manual as your primary documentation. diff --git a/etc/tutorials/TUTORIAL.he b/etc/tutorials/TUTORIAL.he index 566207a..6acb7f2 100644 --- a/etc/tutorials/TUTORIAL.he +++ b/etc/tutorials/TUTORIAL.he @@ -623,8 +623,8 @@ replace-string (החלף מחרוזת) אשר מחליפה מחרוזת אחת אם המחשב אכן נתקע, תוכלו לנציל את השינויים שלא הספקתם לשמור. לשם כך, יש לפתוח את הקובץ כרגיל (את הקובץ בשמו המקורי, לא את קובץ השמירה -האוטומטית), ואחר־כך להקיש M-x recover-file ‎. כש־Emacs יבקש -אישור, הקישו yes‎ כדי ש־Emacs ישחזר את הקובץ כפי שנשמר +האוטומטית), ואחר־כך להקיש M-x recover-this-file ‎. כש־Emacs +יבקש אישור, הקישו yes‎ כדי ש־Emacs ישחזר את הקובץ כפי שנשמר אוטומטית. @@ -845,13 +845,13 @@ CONTROL ו־META גם יחד ואז להקיש v. הסדר שבו תלחצו ע "תבנית" נקרא בדרך־כלל "חלון". ניתן להציג תבניות אחדות על אותו צג גרפי בו־זמנית על צג טקסטואלי אפשר להציג רק תבנית אחת בכל עת. ->> הקישו M-x make-frame ‎. +>> הקישו C-x 5 2. כתוצאה, תבנית חדשה תופיע על המסך. כל מה שעשיתם בתבנית המקורית ניתן לעשות גם בתבנית החדשה. התבנית הראשונה אין בה שום דבר מיוחד. ->> הקישו M-x delete-frame ‎. +>> הקישו C-x 5 0. התבנית שבה הקשתם את הפקודה תיסגר ותיעלם מהמסך. כמו־כן, ניתן לסגור תבנית בדרך הרגילה הנתמכת ע״י התצוגה הגרפית של @@ -911,7 +911,8 @@ M-x help ‎ כתחליף.) לכם את הפקודות שלמדתם בעבר. ניתן לציין אחרי C-h c גם פקודות שמופעלות ע״י סדרת מקשים באורך גדול -מאחד, כגון C-x C-s או (אם אין מקש META או EDIT או ALT) ‏‎ v. +מאחד, כגון C-x C-s או ‏‎ v (כתחליף ל־M-v, אם אין מקש META או EDIT +או ALT). לקבלת מידע מפורט יותר על פקודה, השתמשו בפקודה C-h k במקום C-h c. @@ -951,7 +952,7 @@ find-file. ידועה גם בשם "Info".) פקודה זאת פותחת חוצץ מיוחד הקרוי "*info*" שבו תוכלו לקרוא מדריכים המותקנים במערכת שלכם. הקישו m emacs ‎ כדי לקרוא במדריך למשתמשי Emacs. - אם אינכם מכירים את Info, הקישו ? ו־Emacs יקח אתכם + אם אינכם מכירים את Info, הקישו h ו־Emacs יקח אתכם לשיעור על התכונות של Info mode. כשתסיימו עם השיעור הזה, אנו בהחלט ממליצים להשתמש במדריך Emacs בתור התיעוד העיקרי שלכם.