diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/cus-edit.el | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 2 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 18 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 6 | ||||
| -rw-r--r-- | lisp/indent.el | 17 | ||||
| -rw-r--r-- | lisp/progmodes/flymake-proc.el | 141 | ||||
| -rw-r--r-- | lisp/progmodes/flymake.el | 6 | ||||
| -rw-r--r-- | lisp/progmodes/prog-mode.el | 49 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 72 | ||||
| -rw-r--r-- | lisp/progmodes/ruby-mode.el | 1 | ||||
| -rw-r--r-- | lisp/textmodes/mhtml-mode.el | 4 | ||||
| -rw-r--r-- | lisp/winner.el | 2 |
12 files changed, 136 insertions, 185 deletions
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index e0a00d4337f..f9f4063e962 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -4825,6 +4825,8 @@ If several parents are listed, go to the first of them." | |||
| 4825 | (parent (downcase (widget-get button :tag)))) | 4825 | (parent (downcase (widget-get button :tag)))) |
| 4826 | (customize-group parent))))) | 4826 | (customize-group parent))))) |
| 4827 | 4827 | ||
| 4828 | (define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1") | ||
| 4829 | |||
| 4828 | (defcustom Custom-mode-hook nil | 4830 | (defcustom Custom-mode-hook nil |
| 4829 | "Hook called when entering Custom mode." | 4831 | "Hook called when entering Custom mode." |
| 4830 | :type 'hook | 4832 | :type 'hook |
| @@ -4853,7 +4855,6 @@ If several parents are listed, go to the first of them." | |||
| 4853 | (setq-local widget-link-suffix "")) | 4855 | (setq-local widget-link-suffix "")) |
| 4854 | (setq show-trailing-whitespace nil)) | 4856 | (setq show-trailing-whitespace nil)) |
| 4855 | 4857 | ||
| 4856 | (define-obsolete-variable-alias 'custom-mode-hook 'Custom-mode-hook "23.1") | ||
| 4857 | (define-derived-mode Custom-mode nil "Custom" | 4858 | (define-derived-mode Custom-mode nil "Custom" |
| 4858 | "Major mode for editing customization buffers. | 4859 | "Major mode for editing customization buffers. |
| 4859 | 4860 | ||
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 25f738cb8ec..e08e0d92863 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -1253,7 +1253,7 @@ function directly; use `byte-compile-warn' or | |||
| 1253 | (defun byte-compile-report-error (error-info &optional fill) | 1253 | (defun byte-compile-report-error (error-info &optional fill) |
| 1254 | "Report Lisp error in compilation. | 1254 | "Report Lisp error in compilation. |
| 1255 | ERROR-INFO is the error data, in the form of either (ERROR-SYMBOL . DATA) | 1255 | ERROR-INFO is the error data, in the form of either (ERROR-SYMBOL . DATA) |
| 1256 | or STRING. If FILL is non-nil, set ‘warning-fill-prefix’ to four spaces | 1256 | or STRING. If FILL is non-nil, set `warning-fill-prefix' to four spaces |
| 1257 | when printing the error message." | 1257 | when printing the error message." |
| 1258 | (setq byte-compiler-error-flag t) | 1258 | (setq byte-compiler-error-flag t) |
| 1259 | (byte-compile-log-warning | 1259 | (byte-compile-log-warning |
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index bda8dc1e714..493d69b8e08 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el | |||
| @@ -36,7 +36,7 @@ | |||
| 36 | 36 | ||
| 37 | ;; For more information, see the following URLs: | 37 | ;; For more information, see the following URLs: |
| 38 | ;; * https://sv.gnu.org/projects/erc/ | 38 | ;; * https://sv.gnu.org/projects/erc/ |
| 39 | ;; * http://www.emacswiki.org/cgi-bin/wiki/ERC | 39 | ;; * https://www.emacswiki.org/emacs/ERC |
| 40 | 40 | ||
| 41 | 41 | ||
| 42 | 42 | ||
| @@ -77,12 +77,12 @@ | |||
| 77 | (require 'erc-compat) | 77 | (require 'erc-compat) |
| 78 | 78 | ||
| 79 | (defvar erc-official-location | 79 | (defvar erc-official-location |
| 80 | "https://emacswiki.org/cgi-bin/wiki/ERC (mailing list: erc-discuss@gnu.org)" | 80 | "https://www.emacswiki.org/emacs/ERC (mailing list: erc-discuss@gnu.org)" |
| 81 | "Location of the ERC client on the Internet.") | 81 | "Location of the ERC client on the Internet.") |
| 82 | 82 | ||
| 83 | (defgroup erc nil | 83 | (defgroup erc nil |
| 84 | "Emacs Internet Relay Chat client." | 84 | "Emacs Internet Relay Chat client." |
| 85 | :link '(url-link "http://www.emacswiki.org/cgi-bin/wiki/ERC") | 85 | :link '(url-link "https://www.emacswiki.org/emacs/ERC") |
| 86 | :link '(custom-manual "(erc) Top") | 86 | :link '(custom-manual "(erc) Top") |
| 87 | :prefix "erc-" | 87 | :prefix "erc-" |
| 88 | :group 'applications) | 88 | :group 'applications) |
| @@ -124,8 +124,6 @@ | |||
| 124 | "Running scripts at startup and with /LOAD" | 124 | "Running scripts at startup and with /LOAD" |
| 125 | :group 'erc) | 125 | :group 'erc) |
| 126 | 126 | ||
| 127 | (require 'erc-backend) | ||
| 128 | |||
| 129 | ;; compatibility with older ERC releases | 127 | ;; compatibility with older ERC releases |
| 130 | 128 | ||
| 131 | (define-obsolete-variable-alias 'erc-announced-server-name | 129 | (define-obsolete-variable-alias 'erc-announced-server-name |
| @@ -137,6 +135,8 @@ | |||
| 137 | (define-obsolete-function-alias 'erc-send-command | 135 | (define-obsolete-function-alias 'erc-send-command |
| 138 | 'erc-server-send "ERC 5.1") | 136 | 'erc-server-send "ERC 5.1") |
| 139 | 137 | ||
| 138 | (require 'erc-backend) | ||
| 139 | |||
| 140 | ;; tunable connection and authentication parameters | 140 | ;; tunable connection and authentication parameters |
| 141 | 141 | ||
| 142 | (defcustom erc-server nil | 142 | (defcustom erc-server nil |
| @@ -6260,11 +6260,11 @@ This should be a string with substitution variables recognized by | |||
| 6260 | :group 'erc-mode-line-and-header | 6260 | :group 'erc-mode-line-and-header |
| 6261 | :type 'string) | 6261 | :type 'string) |
| 6262 | 6262 | ||
| 6263 | (defun erc-shorten-server-name (server-name) | 6263 | (defun erc-shorten-server-name (server) |
| 6264 | "Shorten SERVER-NAME according to `erc-common-server-suffixes'." | 6264 | "Shorten SERVER name according to `erc-common-server-suffixes'." |
| 6265 | (if (stringp server-name) | 6265 | (if (stringp server) |
| 6266 | (with-temp-buffer | 6266 | (with-temp-buffer |
| 6267 | (insert server-name) | 6267 | (insert server) |
| 6268 | (let ((alist erc-common-server-suffixes)) | 6268 | (let ((alist erc-common-server-suffixes)) |
| 6269 | (while alist | 6269 | (while alist |
| 6270 | (goto-char (point-min)) | 6270 | (goto-char (point-min)) |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index 6053d33223a..c4bbf3c898b 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -6246,14 +6246,14 @@ they are." | |||
| 6246 | (declare-function beginning-of-visual-line "simple" (&optional n)) | 6246 | (declare-function beginning-of-visual-line "simple" (&optional n)) |
| 6247 | 6247 | ||
| 6248 | (defun message-beginning-of-header (handle-folded) | 6248 | (defun message-beginning-of-header (handle-folded) |
| 6249 | "Move point to beginning of header’s value. | 6249 | "Move point to beginning of header's value. |
| 6250 | 6250 | ||
| 6251 | When point is at the first header line, moves it after the colon | 6251 | When point is at the first header line, moves it after the colon |
| 6252 | and spaces separating header name and header value. | 6252 | and spaces separating header name and header value. |
| 6253 | 6253 | ||
| 6254 | When point is in a continuation line of a folded header (i.e. the | 6254 | When point is in a continuation line of a folded header (i.e. the |
| 6255 | line starts with a space), the behavior depends on HANDLE-FOLDED | 6255 | line starts with a space), the behavior depends on HANDLE-FOLDED |
| 6256 | argument. If it’s nil, function moves the point to the start of | 6256 | argument. If it's nil, function moves the point to the start of |
| 6257 | the header continuation; otherwise, function locates the | 6257 | the header continuation; otherwise, function locates the |
| 6258 | beginning of the header and moves point past the colon as is the | 6258 | beginning of the header and moves point past the colon as is the |
| 6259 | case of single-line headers. | 6259 | case of single-line headers. |
| @@ -6261,7 +6261,7 @@ case of single-line headers. | |||
| 6261 | No check whether point is inside of a header or body of the | 6261 | No check whether point is inside of a header or body of the |
| 6262 | message is performed. | 6262 | message is performed. |
| 6263 | 6263 | ||
| 6264 | Returns point or nil if beginning of header’s value could not be | 6264 | Returns point or nil if beginning of header's value could not be |
| 6265 | found. In the latter case, the point is still moved to the | 6265 | found. In the latter case, the point is still moved to the |
| 6266 | beginning of line (possibly after attempting to move it to the | 6266 | beginning of line (possibly after attempting to move it to the |
| 6267 | beginning of a folded header)." | 6267 | beginning of a folded header)." |
diff --git a/lisp/indent.el b/lisp/indent.el index d5ba0bd8491..400280f615a 100644 --- a/lisp/indent.el +++ b/lisp/indent.el | |||
| @@ -69,6 +69,8 @@ variable is `indent-relative' or `indent-relative-maybe', handle | |||
| 69 | it specially (since those functions are used for tabbing); in | 69 | it specially (since those functions are used for tabbing); in |
| 70 | that case, indent by aligning to the previous non-blank line." | 70 | that case, indent by aligning to the previous non-blank line." |
| 71 | (interactive) | 71 | (interactive) |
| 72 | (save-restriction | ||
| 73 | (widen) | ||
| 72 | (syntax-propertize (line-end-position)) | 74 | (syntax-propertize (line-end-position)) |
| 73 | (if (memq indent-line-function | 75 | (if (memq indent-line-function |
| 74 | '(indent-relative indent-relative-maybe)) | 76 | '(indent-relative indent-relative-maybe)) |
| @@ -84,7 +86,7 @@ that case, indent by aligning to the previous non-blank line." | |||
| 84 | (indent-line-to column) | 86 | (indent-line-to column) |
| 85 | (save-excursion (indent-line-to column)))) | 87 | (save-excursion (indent-line-to column)))) |
| 86 | ;; The normal case. | 88 | ;; The normal case. |
| 87 | (funcall indent-line-function))) | 89 | (funcall indent-line-function)))) |
| 88 | 90 | ||
| 89 | (defun indent--default-inside-comment () | 91 | (defun indent--default-inside-comment () |
| 90 | (unless (or (> (current-column) (current-indentation)) | 92 | (unless (or (> (current-column) (current-indentation)) |
| @@ -140,11 +142,11 @@ prefix argument is ignored." | |||
| 140 | (old-indent (current-indentation))) | 142 | (old-indent (current-indentation))) |
| 141 | 143 | ||
| 142 | ;; Indent the line. | 144 | ;; Indent the line. |
| 143 | (or (not (eq (funcall indent-line-function) 'noindent)) | 145 | (or (not (eq (indent--funcall-widened indent-line-function) 'noindent)) |
| 144 | (indent--default-inside-comment) | 146 | (indent--default-inside-comment) |
| 145 | (when (or (<= (current-column) (current-indentation)) | 147 | (when (or (<= (current-column) (current-indentation)) |
| 146 | (not (eq tab-always-indent 'complete))) | 148 | (not (eq tab-always-indent 'complete))) |
| 147 | (funcall (default-value 'indent-line-function)))) | 149 | (indent--funcall-widened (default-value 'indent-line-function)))) |
| 148 | 150 | ||
| 149 | (cond | 151 | (cond |
| 150 | ;; If the text was already indented right, try completion. | 152 | ;; If the text was already indented right, try completion. |
| @@ -166,6 +168,11 @@ prefix argument is ignored." | |||
| 166 | (< (point) end-marker)) | 168 | (< (point) end-marker)) |
| 167 | (indent-rigidly (point) end-marker indentation-change)))))))))) | 169 | (indent-rigidly (point) end-marker indentation-change)))))))))) |
| 168 | 170 | ||
| 171 | (defun indent--funcall-widened (func) | ||
| 172 | (save-restriction | ||
| 173 | (widen) | ||
| 174 | (funcall func))) | ||
| 175 | |||
| 169 | (defun insert-tab (&optional arg) | 176 | (defun insert-tab (&optional arg) |
| 170 | (let ((count (prefix-numeric-value arg))) | 177 | (let ((count (prefix-numeric-value arg))) |
| 171 | (if (and abbrev-mode | 178 | (if (and abbrev-mode |
| @@ -538,7 +545,9 @@ column to indent to; if it is nil, use one of the three methods above." | |||
| 538 | (forward-line 1))))) | 545 | (forward-line 1))))) |
| 539 | ;; Use indent-region-function is available. | 546 | ;; Use indent-region-function is available. |
| 540 | (indent-region-function | 547 | (indent-region-function |
| 541 | (funcall indent-region-function start end)) | 548 | (save-restriction |
| 549 | (widen) | ||
| 550 | (funcall indent-region-function start end))) | ||
| 542 | ;; Else, use a default implementation that calls indent-line-function on | 551 | ;; Else, use a default implementation that calls indent-line-function on |
| 543 | ;; each line. | 552 | ;; each line. |
| 544 | (t (indent-region-line-by-line start end))) | 553 | (t (indent-region-line-by-line start end))) |
diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el index e207de5da6c..b11ae09bed2 100644 --- a/lisp/progmodes/flymake-proc.el +++ b/lisp/progmodes/flymake-proc.el | |||
| @@ -45,11 +45,17 @@ | |||
| 45 | 45 | ||
| 46 | (require 'flymake) | 46 | (require 'flymake) |
| 47 | 47 | ||
| 48 | (define-obsolete-variable-alias 'flymake-compilation-prevents-syntax-check | ||
| 49 | 'flymake-proc-compilation-prevents-syntax-check "26.1") | ||
| 50 | |||
| 48 | (defcustom flymake-proc-compilation-prevents-syntax-check t | 51 | (defcustom flymake-proc-compilation-prevents-syntax-check t |
| 49 | "If non-nil, don't start syntax check if compilation is running." | 52 | "If non-nil, don't start syntax check if compilation is running." |
| 50 | :group 'flymake | 53 | :group 'flymake |
| 51 | :type 'boolean) | 54 | :type 'boolean) |
| 52 | 55 | ||
| 56 | (define-obsolete-variable-alias 'flymake-xml-program | ||
| 57 | 'flymake-proc-xml-program "26.1") | ||
| 58 | |||
| 53 | (defcustom flymake-proc-xml-program | 59 | (defcustom flymake-proc-xml-program |
| 54 | (if (executable-find "xmlstarlet") "xmlstarlet" "xml") | 60 | (if (executable-find "xmlstarlet") "xmlstarlet" "xml") |
| 55 | "Program to use for XML validation." | 61 | "Program to use for XML validation." |
| @@ -57,11 +63,17 @@ | |||
| 57 | :group 'flymake | 63 | :group 'flymake |
| 58 | :version "24.4") | 64 | :version "24.4") |
| 59 | 65 | ||
| 66 | (define-obsolete-variable-alias 'flymake-master-file-dirs | ||
| 67 | 'flymake-proc-master-file-dirs "26.1") | ||
| 68 | |||
| 60 | (defcustom flymake-proc-master-file-dirs '("." "./src" "./UnitTest") | 69 | (defcustom flymake-proc-master-file-dirs '("." "./src" "./UnitTest") |
| 61 | "Dirs where to look for master files." | 70 | "Dirs where to look for master files." |
| 62 | :group 'flymake | 71 | :group 'flymake |
| 63 | :type '(repeat (string))) | 72 | :type '(repeat (string))) |
| 64 | 73 | ||
| 74 | (define-obsolete-variable-alias 'flymake-master-file-count-limit | ||
| 75 | 'flymake-proc-master-file-count-limit "26.1") | ||
| 76 | |||
| 65 | (defcustom flymake-proc-master-file-count-limit 32 | 77 | (defcustom flymake-proc-master-file-count-limit 32 |
| 66 | "Max number of master files to check." | 78 | "Max number of master files to check." |
| 67 | :group 'flymake | 79 | :group 'flymake |
| @@ -74,6 +86,9 @@ Overrides `flymake-proc-allowed-file-name-masks'." | |||
| 74 | :type '(repeat (regexp)) | 86 | :type '(repeat (regexp)) |
| 75 | :version "27.1") | 87 | :version "27.1") |
| 76 | 88 | ||
| 89 | (define-obsolete-variable-alias 'flymake-allowed-file-name-masks | ||
| 90 | 'flymake-proc-allowed-file-name-masks "26.1") | ||
| 91 | |||
| 77 | (defcustom flymake-proc-allowed-file-name-masks | 92 | (defcustom flymake-proc-allowed-file-name-masks |
| 78 | '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" | 93 | '(("\\.\\(?:c\\(?:pp\\|xx\\|\\+\\+\\)?\\|CC\\)\\'" |
| 79 | flymake-proc-simple-make-init | 94 | flymake-proc-simple-make-init |
| @@ -1133,76 +1148,62 @@ Use CREATE-TEMP-F for creating temp copy." | |||
| 1133 | 1148 | ||
| 1134 | ;;;; | 1149 | ;;;; |
| 1135 | 1150 | ||
| 1136 | (progn | 1151 | (define-obsolete-variable-alias 'flymake-check-file-limit |
| 1137 | (define-obsolete-variable-alias 'flymake-compilation-prevents-syntax-check | 1152 | 'flymake-proc-check-file-limit "26.1") |
| 1138 | 'flymake-proc-compilation-prevents-syntax-check "26.1") | 1153 | (define-obsolete-function-alias 'flymake-reformat-err-line-patterns-from-compile-el |
| 1139 | (define-obsolete-variable-alias 'flymake-xml-program | 1154 | 'flymake-proc-reformat-err-line-patterns-from-compile-el "26.1") |
| 1140 | 'flymake-proc-xml-program "26.1") | 1155 | (define-obsolete-variable-alias 'flymake-err-line-patterns |
| 1141 | (define-obsolete-variable-alias 'flymake-master-file-dirs | 1156 | 'flymake-proc-err-line-patterns "26.1") |
| 1142 | 'flymake-proc-master-file-dirs "26.1") | 1157 | (define-obsolete-function-alias 'flymake-parse-line |
| 1143 | (define-obsolete-variable-alias 'flymake-master-file-count-limit | 1158 | 'flymake-proc-parse-line "26.1") |
| 1144 | 'flymake-proc-master-file-count-limit "26.1" | 1159 | (define-obsolete-function-alias 'flymake-get-include-dirs |
| 1145 | "Max number of master files to check.") | 1160 | 'flymake-proc-get-include-dirs "26.1") |
| 1146 | (define-obsolete-variable-alias 'flymake-allowed-file-name-masks | 1161 | (define-obsolete-function-alias 'flymake-stop-all-syntax-checks |
| 1147 | 'flymake-proc-allowed-file-name-masks "26.1") | 1162 | 'flymake-proc-stop-all-syntax-checks "26.1") |
| 1148 | (define-obsolete-variable-alias 'flymake-check-file-limit | 1163 | (define-obsolete-function-alias 'flymake-compile |
| 1149 | 'flymake-proc-check-file-limit "26.1") | 1164 | 'flymake-proc-compile "26.1") |
| 1150 | (define-obsolete-function-alias 'flymake-reformat-err-line-patterns-from-compile-el | 1165 | (define-obsolete-function-alias 'flymake-create-temp-inplace |
| 1151 | 'flymake-proc-reformat-err-line-patterns-from-compile-el "26.1") | 1166 | 'flymake-proc-create-temp-inplace "26.1") |
| 1152 | (define-obsolete-variable-alias 'flymake-err-line-patterns | 1167 | (define-obsolete-function-alias 'flymake-create-temp-with-folder-structure |
| 1153 | 'flymake-proc-err-line-patterns "26.1") | 1168 | 'flymake-proc-create-temp-with-folder-structure "26.1") |
| 1154 | (define-obsolete-function-alias 'flymake-parse-line | 1169 | (define-obsolete-function-alias 'flymake-init-create-temp-buffer-copy |
| 1155 | 'flymake-proc-parse-line "26.1") | 1170 | 'flymake-proc-init-create-temp-buffer-copy "26.1") |
| 1156 | (define-obsolete-function-alias 'flymake-get-include-dirs | 1171 | (define-obsolete-function-alias 'flymake-simple-cleanup |
| 1157 | 'flymake-proc-get-include-dirs "26.1") | 1172 | 'flymake-proc-simple-cleanup "26.1") |
| 1158 | (define-obsolete-function-alias 'flymake-stop-all-syntax-checks | 1173 | (define-obsolete-function-alias 'flymake-get-real-file-name |
| 1159 | 'flymake-proc-stop-all-syntax-checks "26.1") | 1174 | 'flymake-proc-get-real-file-name "26.1") |
| 1160 | (define-obsolete-function-alias 'flymake-compile | 1175 | (define-obsolete-function-alias 'flymake-master-cleanup |
| 1161 | 'flymake-proc-compile "26.1") | 1176 | 'flymake-proc-master-cleanup "26.1") |
| 1162 | (define-obsolete-function-alias 'flymake-create-temp-inplace | 1177 | (define-obsolete-function-alias 'flymake-get-make-cmdline |
| 1163 | 'flymake-proc-create-temp-inplace "26.1") | 1178 | 'flymake-proc-get-make-cmdline "26.1") |
| 1164 | (define-obsolete-function-alias 'flymake-create-temp-with-folder-structure | 1179 | (define-obsolete-function-alias 'flymake-get-ant-cmdline |
| 1165 | 'flymake-proc-create-temp-with-folder-structure "26.1") | 1180 | 'flymake-proc-get-ant-cmdline "26.1") |
| 1166 | (define-obsolete-function-alias 'flymake-init-create-temp-buffer-copy | 1181 | (define-obsolete-function-alias 'flymake-simple-make-init-impl |
| 1167 | 'flymake-proc-init-create-temp-buffer-copy "26.1") | 1182 | 'flymake-proc-simple-make-init-impl "26.1") |
| 1168 | (define-obsolete-function-alias 'flymake-simple-cleanup | 1183 | (define-obsolete-function-alias 'flymake-simple-make-init |
| 1169 | 'flymake-proc-simple-cleanup "26.1") | 1184 | 'flymake-proc-simple-make-init "26.1") |
| 1170 | (define-obsolete-function-alias 'flymake-get-real-file-name | 1185 | (define-obsolete-function-alias 'flymake-master-make-init |
| 1171 | 'flymake-proc-get-real-file-name "26.1") | 1186 | 'flymake-proc-master-make-init "26.1") |
| 1172 | (define-obsolete-function-alias 'flymake-master-cleanup | 1187 | (define-obsolete-function-alias 'flymake-find-make-buildfile |
| 1173 | 'flymake-proc-master-cleanup "26.1") | 1188 | 'flymake-proc--find-make-buildfile "26.1") |
| 1174 | (define-obsolete-function-alias 'flymake-get-make-cmdline | 1189 | (define-obsolete-function-alias 'flymake-master-make-header-init |
| 1175 | 'flymake-proc-get-make-cmdline "26.1") | 1190 | 'flymake-proc-master-make-header-init "26.1") |
| 1176 | (define-obsolete-function-alias 'flymake-get-ant-cmdline | 1191 | (define-obsolete-function-alias 'flymake-simple-make-java-init |
| 1177 | 'flymake-proc-get-ant-cmdline "26.1") | 1192 | 'flymake-proc-simple-make-java-init "26.1") |
| 1178 | (define-obsolete-function-alias 'flymake-simple-make-init-impl | 1193 | (define-obsolete-function-alias 'flymake-simple-ant-java-init |
| 1179 | 'flymake-proc-simple-make-init-impl "26.1") | 1194 | 'flymake-proc-simple-ant-java-init "26.1") |
| 1180 | (define-obsolete-function-alias 'flymake-simple-make-init | 1195 | (define-obsolete-function-alias 'flymake-simple-java-cleanup |
| 1181 | 'flymake-proc-simple-make-init "26.1") | 1196 | 'flymake-proc-simple-java-cleanup "26.1") |
| 1182 | (define-obsolete-function-alias 'flymake-master-make-init | 1197 | (define-obsolete-function-alias 'flymake-perl-init |
| 1183 | 'flymake-proc-master-make-init "26.1") | 1198 | 'flymake-proc-perl-init "26.1") |
| 1184 | (define-obsolete-function-alias 'flymake-find-make-buildfile | 1199 | (define-obsolete-function-alias 'flymake-php-init |
| 1185 | 'flymake-proc--find-make-buildfile "26.1") | 1200 | 'flymake-proc-php-init "26.1") |
| 1186 | (define-obsolete-function-alias 'flymake-master-make-header-init | 1201 | (define-obsolete-function-alias 'flymake-simple-tex-init |
| 1187 | 'flymake-proc-master-make-header-init "26.1") | 1202 | 'flymake-proc-simple-tex-init "26.1") |
| 1188 | (define-obsolete-function-alias 'flymake-simple-make-java-init | 1203 | (define-obsolete-function-alias 'flymake-master-tex-init |
| 1189 | 'flymake-proc-simple-make-java-init "26.1") | 1204 | 'flymake-proc-master-tex-init "26.1") |
| 1190 | (define-obsolete-function-alias 'flymake-simple-ant-java-init | 1205 | (define-obsolete-function-alias 'flymake-xml-init |
| 1191 | 'flymake-proc-simple-ant-java-init "26.1") | 1206 | 'flymake-proc-xml-init "26.1") |
| 1192 | (define-obsolete-function-alias 'flymake-simple-java-cleanup | ||
| 1193 | 'flymake-proc-simple-java-cleanup "26.1") | ||
| 1194 | (define-obsolete-function-alias 'flymake-perl-init | ||
| 1195 | 'flymake-proc-perl-init "26.1") | ||
| 1196 | (define-obsolete-function-alias 'flymake-php-init | ||
| 1197 | 'flymake-proc-php-init "26.1") | ||
| 1198 | (define-obsolete-function-alias 'flymake-simple-tex-init | ||
| 1199 | 'flymake-proc-simple-tex-init "26.1") | ||
| 1200 | (define-obsolete-function-alias 'flymake-master-tex-init | ||
| 1201 | 'flymake-proc-master-tex-init "26.1") | ||
| 1202 | (define-obsolete-function-alias 'flymake-xml-init | ||
| 1203 | 'flymake-proc-xml-init "26.1")) | ||
| 1204 | |||
| 1205 | |||
| 1206 | 1207 | ||
| 1207 | (provide 'flymake-proc) | 1208 | (provide 'flymake-proc) |
| 1208 | ;;; flymake-proc.el ends here | 1209 | ;;; flymake-proc.el ends here |
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index f23af82d354..608074281f9 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el | |||
| @@ -124,15 +124,15 @@ If nil, never start checking buffer automatically like this." | |||
| 124 | (make-obsolete-variable 'flymake-gui-warnings-enabled | 124 | (make-obsolete-variable 'flymake-gui-warnings-enabled |
| 125 | "it no longer has any effect." "26.1") | 125 | "it no longer has any effect." "26.1") |
| 126 | 126 | ||
| 127 | (define-obsolete-variable-alias 'flymake-start-syntax-check-on-find-file | ||
| 128 | 'flymake-start-on-flymake-mode "26.1") | ||
| 129 | |||
| 127 | (defcustom flymake-start-on-flymake-mode t | 130 | (defcustom flymake-start-on-flymake-mode t |
| 128 | "Start syntax check when `flymake-mode' is enabled. | 131 | "Start syntax check when `flymake-mode' is enabled. |
| 129 | Specifically, start it when the buffer is actually displayed." | 132 | Specifically, start it when the buffer is actually displayed." |
| 130 | :version "26.1" | 133 | :version "26.1" |
| 131 | :type 'boolean) | 134 | :type 'boolean) |
| 132 | 135 | ||
| 133 | (define-obsolete-variable-alias 'flymake-start-syntax-check-on-find-file | ||
| 134 | 'flymake-start-on-flymake-mode "26.1") | ||
| 135 | |||
| 136 | (defcustom flymake-log-level -1 | 136 | (defcustom flymake-log-level -1 |
| 137 | "Obsolete and ignored variable." | 137 | "Obsolete and ignored variable." |
| 138 | :type 'integer) | 138 | :type 'integer) |
diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index f727e458b2b..f46e6da73da 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el | |||
| @@ -53,8 +53,8 @@ | |||
| 53 | "When non-nil, provides context for indenting embedded code chunks. | 53 | "When non-nil, provides context for indenting embedded code chunks. |
| 54 | 54 | ||
| 55 | There are languages where part of the code is actually written in | 55 | There are languages where part of the code is actually written in |
| 56 | a sub language, e.g., a Yacc/Bison or ANTLR grammar also consists | 56 | a sub language, e.g., a Yacc/Bison or ANTLR grammar can also include |
| 57 | of plain C code. This variable enables the major mode of the | 57 | JS or Python code. This variable enables the primary mode of the |
| 58 | main language to use the indentation engine of the sub-mode for | 58 | main language to use the indentation engine of the sub-mode for |
| 59 | lines in code chunks written in the sub-mode's language. | 59 | lines in code chunks written in the sub-mode's language. |
| 60 | 60 | ||
| @@ -64,37 +64,13 @@ mode, it should bind this variable to non-nil around the call. | |||
| 64 | 64 | ||
| 65 | The non-nil value should be a list of the form: | 65 | The non-nil value should be a list of the form: |
| 66 | 66 | ||
| 67 | (FIRST-COLUMN (START . END) PREVIOUS-CHUNKS) | 67 | (FIRST-COLUMN . REST) |
| 68 | 68 | ||
| 69 | FIRST-COLUMN is the column the indentation engine of the sub-mode | 69 | FIRST-COLUMN is the column the indentation engine of the sub-mode |
| 70 | should use for top-level language constructs inside the code | 70 | should use for top-level language constructs inside the code |
| 71 | chunk (instead of 0). | 71 | chunk (instead of 0). |
| 72 | 72 | ||
| 73 | START and END specify the region of the code chunk. END can be | 73 | REST is currently unused.") |
| 74 | nil, which stands for the value of `point-max'. The function | ||
| 75 | `prog-widen' uses this to restore restrictions imposed by the | ||
| 76 | sub-mode's indentation engine. | ||
| 77 | |||
| 78 | PREVIOUS-CHUNKS, if non-nil, provides the indentation engine of | ||
| 79 | the sub-mode with the virtual context of the code chunk. Valid | ||
| 80 | values are: | ||
| 81 | |||
| 82 | - A string containing text which the indentation engine can | ||
| 83 | consider as standing in front of the code chunk. To cache the | ||
| 84 | string's calculated syntactic information for repeated calls | ||
| 85 | with the same string, the sub-mode can add text-properties to | ||
| 86 | the string. | ||
| 87 | |||
| 88 | A typical use case is for grammars with code chunks which are | ||
| 89 | to be indented like function bodies -- the string would contain | ||
| 90 | the corresponding function preamble. | ||
| 91 | |||
| 92 | - A function, to be called with the start position of the current | ||
| 93 | chunk. It should return either the region of the previous chunk | ||
| 94 | as (PREV-START . PREV-END), or nil if there is no previous chunk. | ||
| 95 | |||
| 96 | A typical use case are literate programming sources -- the | ||
| 97 | function would successively return the previous code chunks.") | ||
| 98 | 74 | ||
| 99 | (defun prog-indent-sexp (&optional defun) | 75 | (defun prog-indent-sexp (&optional defun) |
| 100 | "Indent the expression after point. | 76 | "Indent the expression after point. |
| @@ -113,23 +89,6 @@ instead." | |||
| 113 | "Return the indentation column normally used for top-level constructs." | 89 | "Return the indentation column normally used for top-level constructs." |
| 114 | (or (car prog-indentation-context) 0)) | 90 | (or (car prog-indentation-context) 0)) |
| 115 | 91 | ||
| 116 | (defun prog-widen () | ||
| 117 | "Remove restrictions (narrowing) from current code chunk or buffer. | ||
| 118 | This function should be used instead of `widen' in any function used | ||
| 119 | by the indentation engine to make it respect the value of | ||
| 120 | `prog-indentation-context'. | ||
| 121 | |||
| 122 | This function (like `widen') is useful inside a | ||
| 123 | `save-restriction' to make the indentation correctly work when | ||
| 124 | narrowing is in effect." | ||
| 125 | (let ((chunk (cadr prog-indentation-context))) | ||
| 126 | (if chunk | ||
| 127 | ;; No call to `widen' is necessary here, as narrow-to-region | ||
| 128 | ;; changes (not just narrows) the existing restrictions | ||
| 129 | (narrow-to-region (car chunk) (or (cdr chunk) (point-max))) | ||
| 130 | (widen)))) | ||
| 131 | |||
| 132 | |||
| 133 | (defvar-local prettify-symbols-alist nil | 92 | (defvar-local prettify-symbols-alist nil |
| 134 | "Alist of symbol prettifications. | 93 | "Alist of symbol prettifications. |
| 135 | Each element looks like (SYMBOL . CHARACTER), where the symbol | 94 | Each element looks like (SYMBOL . CHARACTER), where the symbol |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 035d93f7b99..a72a55d2d9a 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -287,10 +287,6 @@ | |||
| 287 | ;;; 24.x Compat | 287 | ;;; 24.x Compat |
| 288 | 288 | ||
| 289 | 289 | ||
| 290 | (unless (fboundp 'prog-widen) | ||
| 291 | (defun prog-widen () | ||
| 292 | (widen))) | ||
| 293 | |||
| 294 | (unless (fboundp 'prog-first-column) | 290 | (unless (fboundp 'prog-first-column) |
| 295 | (defun prog-first-column () | 291 | (defun prog-first-column () |
| 296 | 0)) | 292 | 0)) |
| @@ -725,12 +721,18 @@ It makes underscores and dots word constituent chars.") | |||
| 725 | 721 | ||
| 726 | ;;; Indentation | 722 | ;;; Indentation |
| 727 | 723 | ||
| 724 | (define-obsolete-variable-alias | ||
| 725 | 'python-indent 'python-indent-offset "24.3") | ||
| 726 | |||
| 728 | (defcustom python-indent-offset 4 | 727 | (defcustom python-indent-offset 4 |
| 729 | "Default indentation offset for Python." | 728 | "Default indentation offset for Python." |
| 730 | :group 'python | 729 | :group 'python |
| 731 | :type 'integer | 730 | :type 'integer |
| 732 | :safe 'integerp) | 731 | :safe 'integerp) |
| 733 | 732 | ||
| 733 | (define-obsolete-variable-alias | ||
| 734 | 'python-guess-indent 'python-indent-guess-indent-offset "24.3") | ||
| 735 | |||
| 734 | (defcustom python-indent-guess-indent-offset t | 736 | (defcustom python-indent-guess-indent-offset t |
| 735 | "Non-nil tells Python mode to guess `python-indent-offset' value." | 737 | "Non-nil tells Python mode to guess `python-indent-offset' value." |
| 736 | :type 'boolean | 738 | :type 'boolean |
| @@ -750,12 +752,6 @@ It makes underscores and dots word constituent chars.") | |||
| 750 | :type '(repeat symbol) | 752 | :type '(repeat symbol) |
| 751 | :group 'python) | 753 | :group 'python) |
| 752 | 754 | ||
| 753 | (define-obsolete-variable-alias | ||
| 754 | 'python-indent 'python-indent-offset "24.3") | ||
| 755 | |||
| 756 | (define-obsolete-variable-alias | ||
| 757 | 'python-guess-indent 'python-indent-guess-indent-offset "24.3") | ||
| 758 | |||
| 759 | (defvar python-indent-current-level 0 | 755 | (defvar python-indent-current-level 0 |
| 760 | "Deprecated var available for compatibility.") | 756 | "Deprecated var available for compatibility.") |
| 761 | 757 | ||
| @@ -785,7 +781,7 @@ work on `python-indent-calculate-indentation' instead." | |||
| 785 | (interactive) | 781 | (interactive) |
| 786 | (save-excursion | 782 | (save-excursion |
| 787 | (save-restriction | 783 | (save-restriction |
| 788 | (prog-widen) | 784 | (widen) |
| 789 | (goto-char (point-min)) | 785 | (goto-char (point-min)) |
| 790 | (let ((block-end)) | 786 | (let ((block-end)) |
| 791 | (while (and (not block-end) | 787 | (while (and (not block-end) |
| @@ -883,8 +879,6 @@ keyword | |||
| 883 | :at-dedenter-block-start | 879 | :at-dedenter-block-start |
| 884 | - Point is on a line starting a dedenter block. | 880 | - Point is on a line starting a dedenter block. |
| 885 | - START is the position where the dedenter block starts." | 881 | - START is the position where the dedenter block starts." |
| 886 | (save-restriction | ||
| 887 | (prog-widen) | ||
| 888 | (let ((ppss (save-excursion | 882 | (let ((ppss (save-excursion |
| 889 | (beginning-of-line) | 883 | (beginning-of-line) |
| 890 | (syntax-ppss)))) | 884 | (syntax-ppss)))) |
| @@ -1022,7 +1016,7 @@ keyword | |||
| 1022 | (looking-at (python-rx block-ender))) | 1016 | (looking-at (python-rx block-ender))) |
| 1023 | :after-block-end) | 1017 | :after-block-end) |
| 1024 | (t :after-line)) | 1018 | (t :after-line)) |
| 1025 | (point))))))))) | 1019 | (point)))))))) |
| 1026 | 1020 | ||
| 1027 | (defun python-indent--calculate-indentation () | 1021 | (defun python-indent--calculate-indentation () |
| 1028 | "Internal implementation of `python-indent-calculate-indentation'. | 1022 | "Internal implementation of `python-indent-calculate-indentation'. |
| @@ -1030,8 +1024,6 @@ May return an integer for the maximum possible indentation at | |||
| 1030 | current context or a list of integers. The latter case is only | 1024 | current context or a list of integers. The latter case is only |
| 1031 | happening for :at-dedenter-block-start context since the | 1025 | happening for :at-dedenter-block-start context since the |
| 1032 | possibilities can be narrowed to specific indentation points." | 1026 | possibilities can be narrowed to specific indentation points." |
| 1033 | (save-restriction | ||
| 1034 | (prog-widen) | ||
| 1035 | (save-excursion | 1027 | (save-excursion |
| 1036 | (pcase (python-indent-context) | 1028 | (pcase (python-indent-context) |
| 1037 | (`(:no-indent . ,_) (prog-first-column)) ; usually 0 | 1029 | (`(:no-indent . ,_) (prog-first-column)) ; usually 0 |
| @@ -1081,7 +1073,7 @@ possibilities can be narrowed to specific indentation points." | |||
| 1081 | (`(,(or :inside-paren-newline-start-from-block) . ,start) | 1073 | (`(,(or :inside-paren-newline-start-from-block) . ,start) |
| 1082 | ;; Add two indentation levels to make the suite stand out. | 1074 | ;; Add two indentation levels to make the suite stand out. |
| 1083 | (goto-char start) | 1075 | (goto-char start) |
| 1084 | (+ (current-indentation) (* python-indent-offset 2))))))) | 1076 | (+ (current-indentation) (* python-indent-offset 2)))))) |
| 1085 | 1077 | ||
| 1086 | (defun python-indent--calculate-levels (indentation) | 1078 | (defun python-indent--calculate-levels (indentation) |
| 1087 | "Calculate levels list given INDENTATION. | 1079 | "Calculate levels list given INDENTATION. |
| @@ -2042,6 +2034,9 @@ executed through tramp connections." | |||
| 2042 | :type '(repeat string) | 2034 | :type '(repeat string) |
| 2043 | :group 'python) | 2035 | :group 'python) |
| 2044 | 2036 | ||
| 2037 | (define-obsolete-variable-alias | ||
| 2038 | 'python-shell-virtualenv-path 'python-shell-virtualenv-root "25.1") | ||
| 2039 | |||
| 2045 | (defcustom python-shell-virtualenv-root nil | 2040 | (defcustom python-shell-virtualenv-root nil |
| 2046 | "Path to virtualenv root. | 2041 | "Path to virtualenv root. |
| 2047 | This variable, when set to a string, makes the environment to be | 2042 | This variable, when set to a string, makes the environment to be |
| @@ -2050,9 +2045,6 @@ virtualenv." | |||
| 2050 | :type '(choice (const nil) string) | 2045 | :type '(choice (const nil) string) |
| 2051 | :group 'python) | 2046 | :group 'python) |
| 2052 | 2047 | ||
| 2053 | (define-obsolete-variable-alias | ||
| 2054 | 'python-shell-virtualenv-path 'python-shell-virtualenv-root "25.1") | ||
| 2055 | |||
| 2056 | (defcustom python-shell-setup-codes nil | 2048 | (defcustom python-shell-setup-codes nil |
| 2057 | "List of code run by `python-shell-send-setup-codes'." | 2049 | "List of code run by `python-shell-send-setup-codes'." |
| 2058 | :type '(repeat symbol) | 2050 | :type '(repeat symbol) |
| @@ -3289,14 +3281,6 @@ def __PYTHON_EL_get_completions(text): | |||
| 3289 | :type 'string | 3281 | :type 'string |
| 3290 | :group 'python) | 3282 | :group 'python) |
| 3291 | 3283 | ||
| 3292 | (defcustom python-shell-completion-string-code | ||
| 3293 | "';'.join(__PYTHON_EL_get_completions('''%s'''))" | ||
| 3294 | "Python code used to get a string of completions separated by semicolons. | ||
| 3295 | The string passed to the function is the current python name or | ||
| 3296 | the full statement in the case of imports." | ||
| 3297 | :type 'string | ||
| 3298 | :group 'python) | ||
| 3299 | |||
| 3300 | (define-obsolete-variable-alias | 3284 | (define-obsolete-variable-alias |
| 3301 | 'python-shell-completion-module-string-code | 3285 | 'python-shell-completion-module-string-code |
| 3302 | 'python-shell-completion-string-code | 3286 | 'python-shell-completion-string-code |
| @@ -3309,6 +3293,14 @@ the full statement in the case of imports." | |||
| 3309 | "25.1" | 3293 | "25.1" |
| 3310 | "Completion string code must work for (i)pdb.") | 3294 | "Completion string code must work for (i)pdb.") |
| 3311 | 3295 | ||
| 3296 | (defcustom python-shell-completion-string-code | ||
| 3297 | "';'.join(__PYTHON_EL_get_completions('''%s'''))" | ||
| 3298 | "Python code used to get a string of completions separated by semicolons. | ||
| 3299 | The string passed to the function is the current python name or | ||
| 3300 | the full statement in the case of imports." | ||
| 3301 | :type 'string | ||
| 3302 | :group 'python) | ||
| 3303 | |||
| 3312 | (defcustom python-shell-completion-native-disabled-interpreters | 3304 | (defcustom python-shell-completion-native-disabled-interpreters |
| 3313 | ;; PyPy's readline cannot handle some escape sequences yet. Native | 3305 | ;; PyPy's readline cannot handle some escape sequences yet. Native |
| 3314 | ;; completion was found to be non-functional for IPython (see | 3306 | ;; completion was found to be non-functional for IPython (see |
| @@ -4040,6 +4032,9 @@ JUSTIFY should be used (if applicable) as in `fill-paragraph'." | |||
| 4040 | 4032 | ||
| 4041 | ;;; Skeletons | 4033 | ;;; Skeletons |
| 4042 | 4034 | ||
| 4035 | (define-obsolete-variable-alias | ||
| 4036 | 'python-use-skeletons 'python-skeleton-autoinsert "24.3") | ||
| 4037 | |||
| 4043 | (defcustom python-skeleton-autoinsert nil | 4038 | (defcustom python-skeleton-autoinsert nil |
| 4044 | "Non-nil means template skeletons will be automagically inserted. | 4039 | "Non-nil means template skeletons will be automagically inserted. |
| 4045 | This happens when pressing \"if<SPACE>\", for example, to prompt for | 4040 | This happens when pressing \"if<SPACE>\", for example, to prompt for |
| @@ -4048,9 +4043,6 @@ the if condition." | |||
| 4048 | :group 'python | 4043 | :group 'python |
| 4049 | :safe 'booleanp) | 4044 | :safe 'booleanp) |
| 4050 | 4045 | ||
| 4051 | (define-obsolete-variable-alias | ||
| 4052 | 'python-use-skeletons 'python-skeleton-autoinsert "24.3") | ||
| 4053 | |||
| 4054 | (defvar python-skeleton-available '() | 4046 | (defvar python-skeleton-available '() |
| 4055 | "Internal list of available skeletons.") | 4047 | "Internal list of available skeletons.") |
| 4056 | 4048 | ||
| @@ -4593,7 +4585,7 @@ Optional argument INCLUDE-TYPE indicates to include the type of the defun. | |||
| 4593 | This function can be used as the value of `add-log-current-defun-function' | 4585 | This function can be used as the value of `add-log-current-defun-function' |
| 4594 | since it returns nil if point is not inside a defun." | 4586 | since it returns nil if point is not inside a defun." |
| 4595 | (save-restriction | 4587 | (save-restriction |
| 4596 | (prog-widen) | 4588 | (widen) |
| 4597 | (save-excursion | 4589 | (save-excursion |
| 4598 | (end-of-line 1) | 4590 | (end-of-line 1) |
| 4599 | (let ((names) | 4591 | (let ((names) |
| @@ -4791,12 +4783,10 @@ likely an invalid python file." | |||
| 4791 | "Message the first line of the block the current statement closes." | 4783 | "Message the first line of the block the current statement closes." |
| 4792 | (let ((point (python-info-dedenter-opening-block-position))) | 4784 | (let ((point (python-info-dedenter-opening-block-position))) |
| 4793 | (when point | 4785 | (when point |
| 4794 | (save-restriction | ||
| 4795 | (prog-widen) | ||
| 4796 | (message "Closes %s" (save-excursion | 4786 | (message "Closes %s" (save-excursion |
| 4797 | (goto-char point) | 4787 | (goto-char point) |
| 4798 | (buffer-substring | 4788 | (buffer-substring |
| 4799 | (point) (line-end-position)))))))) | 4789 | (point) (line-end-position))))))) |
| 4800 | 4790 | ||
| 4801 | (defun python-info-dedenter-statement-p () | 4791 | (defun python-info-dedenter-statement-p () |
| 4802 | "Return point if current statement is a dedenter. | 4792 | "Return point if current statement is a dedenter. |
| @@ -4812,8 +4802,6 @@ statement." | |||
| 4812 | "Return non-nil if current line ends with backslash. | 4802 | "Return non-nil if current line ends with backslash. |
| 4813 | With optional argument LINE-NUMBER, check that line instead." | 4803 | With optional argument LINE-NUMBER, check that line instead." |
| 4814 | (save-excursion | 4804 | (save-excursion |
| 4815 | (save-restriction | ||
| 4816 | (prog-widen) | ||
| 4817 | (when line-number | 4805 | (when line-number |
| 4818 | (python-util-goto-line line-number)) | 4806 | (python-util-goto-line line-number)) |
| 4819 | (while (and (not (eobp)) | 4807 | (while (and (not (eobp)) |
| @@ -4822,14 +4810,12 @@ With optional argument LINE-NUMBER, check that line instead." | |||
| 4822 | (not (equal (char-before (point)) ?\\))) | 4810 | (not (equal (char-before (point)) ?\\))) |
| 4823 | (forward-line 1)) | 4811 | (forward-line 1)) |
| 4824 | (when (equal (char-before) ?\\) | 4812 | (when (equal (char-before) ?\\) |
| 4825 | (point-marker))))) | 4813 | (point-marker)))) |
| 4826 | 4814 | ||
| 4827 | (defun python-info-beginning-of-backslash (&optional line-number) | 4815 | (defun python-info-beginning-of-backslash (&optional line-number) |
| 4828 | "Return the point where the backslashed line starts. | 4816 | "Return the point where the backslashed line starts. |
| 4829 | Optional argument LINE-NUMBER forces the line number to check against." | 4817 | Optional argument LINE-NUMBER forces the line number to check against." |
| 4830 | (save-excursion | 4818 | (save-excursion |
| 4831 | (save-restriction | ||
| 4832 | (prog-widen) | ||
| 4833 | (when line-number | 4819 | (when line-number |
| 4834 | (python-util-goto-line line-number)) | 4820 | (python-util-goto-line line-number)) |
| 4835 | (when (python-info-line-ends-backslash-p) | 4821 | (when (python-info-line-ends-backslash-p) |
| @@ -4838,15 +4824,13 @@ Optional argument LINE-NUMBER forces the line number to check against." | |||
| 4838 | (python-syntax-context 'paren)) | 4824 | (python-syntax-context 'paren)) |
| 4839 | (forward-line -1)) | 4825 | (forward-line -1)) |
| 4840 | (back-to-indentation) | 4826 | (back-to-indentation) |
| 4841 | (point-marker))))) | 4827 | (point-marker)))) |
| 4842 | 4828 | ||
| 4843 | (defun python-info-continuation-line-p () | 4829 | (defun python-info-continuation-line-p () |
| 4844 | "Check if current line is continuation of another. | 4830 | "Check if current line is continuation of another. |
| 4845 | When current line is continuation of another return the point | 4831 | When current line is continuation of another return the point |
| 4846 | where the continued line ends." | 4832 | where the continued line ends." |
| 4847 | (save-excursion | 4833 | (save-excursion |
| 4848 | (save-restriction | ||
| 4849 | (prog-widen) | ||
| 4850 | (let* ((context-type (progn | 4834 | (let* ((context-type (progn |
| 4851 | (back-to-indentation) | 4835 | (back-to-indentation) |
| 4852 | (python-syntax-context-type))) | 4836 | (python-syntax-context-type))) |
| @@ -4872,7 +4856,7 @@ where the continued line ends." | |||
| 4872 | (python-util-forward-comment -1) | 4856 | (python-util-forward-comment -1) |
| 4873 | (when (and (equal (1- line-start) (line-number-at-pos)) | 4857 | (when (and (equal (1- line-start) (line-number-at-pos)) |
| 4874 | (python-info-line-ends-backslash-p)) | 4858 | (python-info-line-ends-backslash-p)) |
| 4875 | (point-marker)))))))) | 4859 | (point-marker))))))) |
| 4876 | 4860 | ||
| 4877 | (defun python-info-block-continuation-line-p () | 4861 | (defun python-info-block-continuation-line-p () |
| 4878 | "Return non-nil if current line is a continuation of a block." | 4862 | "Return non-nil if current line is a continuation of a block." |
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el index 1c7df7e35a2..cc5cbbc6bed 100644 --- a/lisp/progmodes/ruby-mode.el +++ b/lisp/progmodes/ruby-mode.el | |||
| @@ -1364,7 +1364,6 @@ delimiter." | |||
| 1364 | "\\)\\>"))) | 1364 | "\\)\\>"))) |
| 1365 | (eq (ruby-deep-indent-paren-p t) 'space) | 1365 | (eq (ruby-deep-indent-paren-p t) 'space) |
| 1366 | (not (bobp))) | 1366 | (not (bobp))) |
| 1367 | (widen) | ||
| 1368 | (goto-char (or begin parse-start)) | 1367 | (goto-char (or begin parse-start)) |
| 1369 | (skip-syntax-forward " ") | 1368 | (skip-syntax-forward " ") |
| 1370 | (current-column)) | 1369 | (current-column)) |
diff --git a/lisp/textmodes/mhtml-mode.el b/lisp/textmodes/mhtml-mode.el index 3e37edefb71..883eadd1709 100644 --- a/lisp/textmodes/mhtml-mode.el +++ b/lisp/textmodes/mhtml-mode.el | |||
| @@ -341,9 +341,7 @@ This is used by `mhtml--pre-command'.") | |||
| 341 | ((eq mhtml-tag-relative-indent 'ignore) | 341 | ((eq mhtml-tag-relative-indent 'ignore) |
| 342 | (setq base-indent 0))) | 342 | (setq base-indent 0))) |
| 343 | (narrow-to-region region-start (point-max)) | 343 | (narrow-to-region region-start (point-max)) |
| 344 | (let ((prog-indentation-context (list base-indent | 344 | (let ((prog-indentation-context (list base-indent))) |
| 345 | (cons (point-min) nil) | ||
| 346 | nil))) | ||
| 347 | (mhtml--with-locals submode | 345 | (mhtml--with-locals submode |
| 348 | ;; indent-line-function was rebound by | 346 | ;; indent-line-function was rebound by |
| 349 | ;; mhtml--with-locals. | 347 | ;; mhtml--with-locals. |
diff --git a/lisp/winner.el b/lisp/winner.el index 6bc27484a79..041e9253607 100644 --- a/lisp/winner.el +++ b/lisp/winner.el | |||
| @@ -353,7 +353,7 @@ You may want to include buffer names such as *Help*, *Apropos*, | |||
| 353 | "Toggle Winner mode on or off. | 353 | "Toggle Winner mode on or off. |
| 354 | With a prefix argument ARG, enable Winner mode if ARG is | 354 | With a prefix argument ARG, enable Winner mode if ARG is |
| 355 | positive, and disable it otherwise. If called from Lisp, enable | 355 | positive, and disable it otherwise. If called from Lisp, enable |
| 356 | the mode if ARG is omitted or nil, and toggle it if ARG is ‘toggle’. | 356 | the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'. |
| 357 | 357 | ||
| 358 | Winner mode is a global minor mode that records the changes in | 358 | Winner mode is a global minor mode that records the changes in |
| 359 | the window configuration (i.e. how the frames are partitioned | 359 | the window configuration (i.e. how the frames are partitioned |