diff options
| author | Paul Eggert | 2015-02-25 22:53:56 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-02-25 22:53:56 -0800 |
| commit | d8e9122115b5ffcec342c841b81cb2d2b8217e4b (patch) | |
| tree | 477830be0a1707699381146a4ed45c53d0b928b0 /lisp | |
| parent | cbd447e1cdbbebcd2a04144194138bb7936dea9d (diff) | |
| parent | e726f2058c98e68c951bdb290fe68dac2a84ff65 (diff) | |
| download | emacs-d8e9122115b5ffcec342c841b81cb2d2b8217e4b.tar.gz emacs-d8e9122115b5ffcec342c841b81cb2d2b8217e4b.zip | |
Merge from origin/emacs-24
e726f20 Handle "#" operator properly inside macro. Fix coding bug.
618931b Handle dead frame in menu-bar-non-minibuffer-window-p. (Bug#19728)
017a03a Document MS-Windows file-name idiosyncrasies (Bug#19463)
f3faf4f Fix description of Customize buffer in Emacs manual.
1c1d0b7 Fix a typo in the Emacs manual's Hungry Delete description.
be7fb82 src/dispextern.h (FACE_FOR_CHAR): Fix the commentary.
33c4409 Spelling fixes
6c8231e python.el: Handle tabs in python-indent-dedent-line.
41c3b92 * lisp/progmodes/python.el: Respect user indentation after comment.
868df45 Avoid compiler warnings in decode_env_path.
b28c979 Fix XEmacs version typo in comment and ChangeLog
989fb32 Improve solution of bug #19701
6310530 Fix refilling of list of language environments in User Manual
c4c447d Restore XEmacs compatibility
Conflicts:
doc/emacs/ChangeLog
lisp/ChangeLog
src/ChangeLog
test/ChangeLog
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 35 | ||||
| -rw-r--r-- | lisp/menu-bar.el | 12 | ||||
| -rw-r--r-- | lisp/progmodes/cc-engine.el | 10 | ||||
| -rw-r--r-- | lisp/progmodes/cc-mode.el | 17 | ||||
| -rw-r--r-- | lisp/progmodes/python.el | 48 | ||||
| -rw-r--r-- | lisp/textmodes/reftex-vars.el | 32 |
6 files changed, 97 insertions, 57 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 33e04807e87..8ccc2c35b1f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,38 @@ | |||
| 1 | 2015-02-26 Alan Mackenzie <acm@muc.de> | ||
| 2 | |||
| 3 | Handle "#" operator properly inside macro. Fix coding bug. | ||
| 4 | |||
| 5 | * progmodes/cc-mode.el (c-neutralize-syntax-in-and-mark-CPP): On | ||
| 6 | finding a "#" which looks like the start of a macro, check it | ||
| 7 | isn't already inside a macro. | ||
| 8 | |||
| 9 | * progmodes/cc-engine.el (c-state-safe-place): Don't record a new | ||
| 10 | "safe" position into the list of them when this is beyond our | ||
| 11 | current position. | ||
| 12 | |||
| 13 | 2015-02-26 Martin Rudalics <rudalics@gmx.at> | ||
| 14 | |||
| 15 | * menu-bar.el (menu-bar-non-minibuffer-window-p): Return nil when | ||
| 16 | the menu frame is dead. (Bug#19728) | ||
| 17 | |||
| 18 | 2015-02-26 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 19 | |||
| 20 | python.el: Handle tabs in python-indent-dedent-line. | ||
| 21 | |||
| 22 | * progmodes/python.el (python-indent-dedent-line): Fixes for | ||
| 23 | indentation with tabs. Thanks to <dale@codefu.org> (Bug#19730). | ||
| 24 | |||
| 25 | 2015-02-26 Fabián Ezequiel Gallina <fgallina@gnu.org> | ||
| 26 | |||
| 27 | * progmodes/python.el (python-indent-context): Respect user | ||
| 28 | indentation after comment. | ||
| 29 | |||
| 30 | 2015-02-26 Tassilo Horn <tsdh@gnu.org> | ||
| 31 | |||
| 32 | * textmodes/reftex-vars.el (featurep): Conditionalize value of | ||
| 33 | reftex-label-regexps in order to stay compatible with XEmacs 21.5 | ||
| 34 | which has no explicitly numbered groups in regexps (bug#19714). | ||
| 35 | |||
| 1 | 2015-02-26 Daiki Ueno <ueno@gnu.org> | 36 | 2015-02-26 Daiki Ueno <ueno@gnu.org> |
| 2 | 37 | ||
| 3 | * net/dbus.el (dbus-register-signal): Convert "N" of ":argN" to | 38 | * net/dbus.el (dbus-register-signal): Convert "N" of ":argN" to |
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index cd1a4d05b55..5fdb9377a48 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el | |||
| @@ -1747,12 +1747,14 @@ The menu frame is the frame for which we are updating the menu." | |||
| 1747 | (frame-visible-p menu-frame)))) | 1747 | (frame-visible-p menu-frame)))) |
| 1748 | 1748 | ||
| 1749 | (defun menu-bar-non-minibuffer-window-p () | 1749 | (defun menu-bar-non-minibuffer-window-p () |
| 1750 | "Return non-nil if selected window of the menu frame is not a minibuf window. | 1750 | "Return non-nil if the menu frame's selected window is no minibuffer window. |
| 1751 | 1751 | Return nil if the menu frame is dead or its selected window is a | |
| 1752 | See the documentation of `menu-bar-menu-frame-live-and-visible-p' | 1752 | minibuffer window. The menu frame is the frame for which we are |
| 1753 | for the definition of the menu frame." | 1753 | updating the menu." |
| 1754 | (let ((menu-frame (or menu-updating-frame (selected-frame)))) | 1754 | (let ((menu-frame (or menu-updating-frame (selected-frame)))) |
| 1755 | (not (window-minibuffer-p (frame-selected-window menu-frame))))) | 1755 | (and (frame-live-p menu-frame) |
| 1756 | (not (window-minibuffer-p | ||
| 1757 | (frame-selected-window menu-frame)))))) | ||
| 1756 | 1758 | ||
| 1757 | (defun kill-this-buffer () ; for the menu bar | 1759 | (defun kill-this-buffer () ; for the menu bar |
| 1758 | "Kill the current buffer. | 1760 | "Kill the current buffer. |
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 328e0f79a1c..823d795b6de 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el | |||
| @@ -2277,7 +2277,9 @@ comment at the start of cc-engine.el for more info." | |||
| 2277 | (while | 2277 | (while |
| 2278 | ;; Add an element to `c-state-nonlit-pos-cache' each iteration. | 2278 | ;; Add an element to `c-state-nonlit-pos-cache' each iteration. |
| 2279 | (and | 2279 | (and |
| 2280 | (<= (setq npos (+ pos c-state-nonlit-pos-interval)) here) | 2280 | (setq npos |
| 2281 | (when (<= (+ pos c-state-nonlit-pos-interval) here) | ||
| 2282 | (+ pos c-state-nonlit-pos-interval))) | ||
| 2281 | 2283 | ||
| 2282 | ;; Test for being in a literal. If so, go to after it. | 2284 | ;; Test for being in a literal. If so, go to after it. |
| 2283 | (progn | 2285 | (progn |
| @@ -2304,7 +2306,9 @@ comment at the start of cc-engine.el for more info." | |||
| 2304 | ;; Add one extra element above HERE so as to to avoid the previous | 2306 | ;; Add one extra element above HERE so as to to avoid the previous |
| 2305 | ;; expensive calculation when the next call is close to the current | 2307 | ;; expensive calculation when the next call is close to the current |
| 2306 | ;; one. This is especially useful when inside a large macro. | 2308 | ;; one. This is especially useful when inside a large macro. |
| 2307 | (setq c-state-nonlit-pos-cache (cons npos c-state-nonlit-pos-cache))) | 2309 | (when npos |
| 2310 | (setq c-state-nonlit-pos-cache | ||
| 2311 | (cons npos c-state-nonlit-pos-cache)))) | ||
| 2308 | 2312 | ||
| 2309 | (if (> pos c-state-nonlit-pos-cache-limit) | 2313 | (if (> pos c-state-nonlit-pos-cache-limit) |
| 2310 | (setq c-state-nonlit-pos-cache-limit pos)) | 2314 | (setq c-state-nonlit-pos-cache-limit pos)) |
| @@ -3069,7 +3073,7 @@ comment at the start of cc-engine.el for more info." | |||
| 3069 | (setq dropped-cons (consp (car c-state-cache))) | 3073 | (setq dropped-cons (consp (car c-state-cache))) |
| 3070 | (setq c-state-cache (cdr c-state-cache)) | 3074 | (setq c-state-cache (cdr c-state-cache)) |
| 3071 | (setq pos pa)) | 3075 | (setq pos pa)) |
| 3072 | ;; At this stage, (> pos here); | 3076 | ;; At this stage, (>= pos here); |
| 3073 | ;; (< (c-state-cache-top-lparen) here) (or is nil). | 3077 | ;; (< (c-state-cache-top-lparen) here) (or is nil). |
| 3074 | 3078 | ||
| 3075 | (cond | 3079 | (cond |
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 01e93b3f202..c02192608b2 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el | |||
| @@ -968,12 +968,17 @@ Note that the style variables are always made local to the buffer." | |||
| 968 | (let ((pps-position (point)) pps-state mbeg) | 968 | (let ((pps-position (point)) pps-state mbeg) |
| 969 | (while (and (< (point) c-new-END) | 969 | (while (and (< (point) c-new-END) |
| 970 | (search-forward-regexp c-anchored-cpp-prefix c-new-END t)) | 970 | (search-forward-regexp c-anchored-cpp-prefix c-new-END t)) |
| 971 | ;; If we've found a "#" inside a string/comment, ignore it. | 971 | ;; If we've found a "#" inside a macro/string/comment, ignore it. |
| 972 | (setq pps-state | 972 | (unless |
| 973 | (parse-partial-sexp pps-position (point) nil nil pps-state) | 973 | (or (save-excursion |
| 974 | pps-position (point)) | 974 | (goto-char (match-beginning 0)) |
| 975 | (unless (or (nth 3 pps-state) ; in a string? | 975 | (c-beginning-of-macro)) |
| 976 | (nth 4 pps-state)) ; in a comment? | 976 | (progn |
| 977 | (setq pps-state | ||
| 978 | (parse-partial-sexp pps-position (point) nil nil pps-state) | ||
| 979 | pps-position (point)) | ||
| 980 | (or (nth 3 pps-state) ; in a string? | ||
| 981 | (nth 4 pps-state)))) ; in a comment? | ||
| 977 | (goto-char (match-beginning 1)) | 982 | (goto-char (match-beginning 1)) |
| 978 | (setq mbeg (point)) | 983 | (setq mbeg (point)) |
| 979 | (if (> (c-syntactic-end-of-macro) mbeg) | 984 | (if (> (c-syntactic-end-of-macro) mbeg) |
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4420faf3dfc..1c3f7466c8c 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el | |||
| @@ -843,15 +843,6 @@ keyword | |||
| 843 | ;; Beginning of buffer. | 843 | ;; Beginning of buffer. |
| 844 | ((= (line-number-at-pos) 1) | 844 | ((= (line-number-at-pos) 1) |
| 845 | (cons :no-indent 0)) | 845 | (cons :no-indent 0)) |
| 846 | ;; Comment continuation (maybe). | ||
| 847 | ((save-excursion | ||
| 848 | (when (and | ||
| 849 | (or | ||
| 850 | (python-info-current-line-comment-p) | ||
| 851 | (python-info-current-line-empty-p)) | ||
| 852 | (forward-comment -1) | ||
| 853 | (python-info-current-line-comment-p)) | ||
| 854 | (cons :after-comment (point))))) | ||
| 855 | ;; Inside a string. | 846 | ;; Inside a string. |
| 856 | ((let ((start (python-syntax-context 'string ppss))) | 847 | ((let ((start (python-syntax-context 'string ppss))) |
| 857 | (when start | 848 | (when start |
| @@ -963,28 +954,29 @@ keyword | |||
| 963 | ((let ((start (python-info-dedenter-statement-p))) | 954 | ((let ((start (python-info-dedenter-statement-p))) |
| 964 | (when start | 955 | (when start |
| 965 | (cons :at-dedenter-block-start start)))) | 956 | (cons :at-dedenter-block-start start)))) |
| 966 | ;; After normal line. | 957 | ;; After normal line, comment or ender (default case). |
| 967 | ((let ((start (save-excursion | 958 | ((save-excursion |
| 968 | (back-to-indentation) | 959 | (back-to-indentation) |
| 969 | (skip-chars-backward " \t\n") | 960 | (skip-chars-backward " \t\n") |
| 970 | (python-nav-beginning-of-statement) | 961 | (python-nav-beginning-of-statement) |
| 971 | (point)))) | 962 | (cons |
| 972 | (when start | 963 | (cond ((python-info-current-line-comment-p) |
| 973 | (if (save-excursion | 964 | :after-comment) |
| 974 | (python-util-forward-comment -1) | 965 | ((save-excursion |
| 975 | (python-nav-beginning-of-statement) | 966 | (goto-char (line-end-position)) |
| 976 | (looking-at (python-rx block-ender))) | 967 | (python-util-forward-comment -1) |
| 977 | (cons :after-block-end start) | 968 | (python-nav-beginning-of-statement) |
| 978 | (cons :after-line start))))) | 969 | (looking-at (python-rx block-ender))) |
| 979 | ;; Default case: do not indent. | 970 | :after-block-end) |
| 980 | (t (cons :no-indent 0)))))) | 971 | (t :after-line)) |
| 972 | (point)))))))) | ||
| 981 | 973 | ||
| 982 | (defun python-indent--calculate-indentation () | 974 | (defun python-indent--calculate-indentation () |
| 983 | "Internal implementation of `python-indent-calculate-indentation'. | 975 | "Internal implementation of `python-indent-calculate-indentation'. |
| 984 | May return an integer for the maximum possible indentation at | 976 | May return an integer for the maximum possible indentation at |
| 985 | current context or a list of integers. The latter case is only | 977 | current context or a list of integers. The latter case is only |
| 986 | happening for :at-dedenter-block-start context since the | 978 | happening for :at-dedenter-block-start context since the |
| 987 | possibilities can be narrowed to especific indentation points." | 979 | possibilities can be narrowed to specific indentation points." |
| 988 | (save-restriction | 980 | (save-restriction |
| 989 | (widen) | 981 | (widen) |
| 990 | (save-excursion | 982 | (save-excursion |
| @@ -1075,7 +1067,7 @@ minimum." | |||
| 1075 | (defun python-indent-line (&optional previous) | 1067 | (defun python-indent-line (&optional previous) |
| 1076 | "Internal implementation of `python-indent-line-function'. | 1068 | "Internal implementation of `python-indent-line-function'. |
| 1077 | Use the PREVIOUS level when argument is non-nil, otherwise indent | 1069 | Use the PREVIOUS level when argument is non-nil, otherwise indent |
| 1078 | to the maxium available level. When indentation is the minimum | 1070 | to the maximum available level. When indentation is the minimum |
| 1079 | possible and PREVIOUS is non-nil, cycle back to the maximum | 1071 | possible and PREVIOUS is non-nil, cycle back to the maximum |
| 1080 | level." | 1072 | level." |
| 1081 | (let ((follow-indentation-p | 1073 | (let ((follow-indentation-p |
| @@ -1110,9 +1102,7 @@ indentation levels from right to left." | |||
| 1110 | (interactive "*") | 1102 | (interactive "*") |
| 1111 | (when (and (not (bolp)) | 1103 | (when (and (not (bolp)) |
| 1112 | (not (python-syntax-comment-or-string-p)) | 1104 | (not (python-syntax-comment-or-string-p)) |
| 1113 | (= (+ (line-beginning-position) | 1105 | (= (current-indentation) (current-column))) |
| 1114 | (current-indentation)) | ||
| 1115 | (point))) | ||
| 1116 | (python-indent-line t) | 1106 | (python-indent-line t) |
| 1117 | t)) | 1107 | t)) |
| 1118 | 1108 | ||
diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 7fe6882d3ca..7f050e9fd90 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el | |||
| @@ -867,13 +867,17 @@ DOWNCASE t: Downcase words before using them." | |||
| 867 | (string :tag "")) | 867 | (string :tag "")) |
| 868 | (option (boolean :tag "Downcase words ")))) | 868 | (option (boolean :tag "Downcase words ")))) |
| 869 | 869 | ||
| 870 | (defcustom reftex-label-regexps | 870 | (if (featurep 'xemacs) |
| 871 | '(;; Normal \\label{foo} labels | 871 | ;; XEmacs 21.5 doesn't have explicitly numbered matching groups, |
| 872 | "\\\\label{\\(?1:[^}]*\\)}" | 872 | ;; so this list mustn't get any more items. |
| 873 | ;; keyvals [..., label = {foo}, ...] forms used by ctable, | 873 | (defconst reftex-label-regexps '("\\\\label{\\([^}]*\\)}")) |
| 874 | ;; listings, minted, ... | 874 | (defcustom reftex-label-regexps |
| 875 | "\\[[^]]*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?") | 875 | '(;; Normal \\label{foo} labels |
| 876 | "List of regexps matching \\label definitions. | 876 | "\\\\label{\\(?1:[^}]*\\)}" |
| 877 | ;; keyvals [..., label = {foo}, ...] forms used by ctable, | ||
| 878 | ;; listings, minted, ... | ||
| 879 | "\\[[^]]*\\<label[[:space:]]*=[[:space:]]*{?\\(?1:[^],}]+\\)}?") | ||
| 880 | "List of regexps matching \\label definitions. | ||
| 877 | The default value matches usual \\label{...} definitions and | 881 | The default value matches usual \\label{...} definitions and |
| 878 | keyval style [..., label = {...}, ...] label definitions. It is | 882 | keyval style [..., label = {...}, ...] label definitions. It is |
| 879 | assumed that the regexp group 1 matches the label text, so you | 883 | assumed that the regexp group 1 matches the label text, so you |
| @@ -882,13 +886,13 @@ have to define it using \\(?1:...\\) when adding new regexps. | |||
| 882 | When changed from Lisp, make sure to call | 886 | When changed from Lisp, make sure to call |
| 883 | `reftex-compile-variables' afterwards to make the change | 887 | `reftex-compile-variables' afterwards to make the change |
| 884 | effective." | 888 | effective." |
| 885 | :version "24.4" | 889 | :version "24.4" |
| 886 | :set (lambda (symbol value) | 890 | :set (lambda (symbol value) |
| 887 | (set symbol value) | 891 | (set symbol value) |
| 888 | (when (fboundp 'reftex-compile-variables) | 892 | (when (fboundp 'reftex-compile-variables) |
| 889 | (reftex-compile-variables))) | 893 | (reftex-compile-variables))) |
| 890 | :group 'reftex-defining-label-environments | 894 | :group 'reftex-defining-label-environments |
| 891 | :type '(repeat (regexp :tag "Regular Expression"))) | 895 | :type '(repeat (regexp :tag "Regular Expression")))) |
| 892 | 896 | ||
| 893 | (defcustom reftex-label-ignored-macros-and-environments nil | 897 | (defcustom reftex-label-ignored-macros-and-environments nil |
| 894 | "List of macros and environments to be ignored when searching for labels. | 898 | "List of macros and environments to be ignored when searching for labels. |