aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2011-02-21 15:46:32 -0800
committerPaul Eggert2011-02-21 15:46:32 -0800
commit9441f0e4fca691e4d2a2c7842373de8f29414b17 (patch)
tree6db82cf30a48bd72485db5c4cc2f19d4a142f727 /lisp
parentba01e9d785457898d873d6c8ec8bc1965fe4ff28 (diff)
parente84efb7078b7251b8c8bf15f71fed653cfa535a5 (diff)
downloademacs-9441f0e4fca691e4d2a2c7842373de8f29414b17.tar.gz
emacs-9441f0e4fca691e4d2a2c7842373de8f29414b17.zip
Merge from mainline.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/net/tramp.el8
-rw-r--r--lisp/progmodes/cc-engine.el42
3 files changed, 58 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 20514a0b886..e4b30dfa310 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,16 @@
12011-02-21 Alan Mackenzie <acm@muc.de>
2
3 Fix bug #7930.
4 * progmodes/cc-engine.el (c-state-literal-at): Prevent positions
5 in macros finding their way into c-state-nonlit-pos-cache.
6 Strengthen the comments.
7 (c-state-dump): New commented out diagnostic routine.
8
92011-02-21 Michael Albinus <michael.albinus@gmx.de>
10
11 * net/tramp.el (tramp-rfn-eshadow-setup-minibuffer): Do not use
12 `field' property of `rfn-eshadow-overlay'.
13
12011-02-21 Lars Ingebrigtsen <larsi@gnus.org> 142011-02-21 Lars Ingebrigtsen <larsi@gnus.org>
2 15
3 * net/netrc.el (netrc-parse): Comment fix. 16 * net/netrc.el (netrc-parse): Comment fix.
@@ -264,7 +277,7 @@
264 277
2652011-02-16 Alex Harsanyi <AlexHarsanyi@gmail.com> 2782011-02-16 Alex Harsanyi <AlexHarsanyi@gmail.com>
266 279
267 * soap-client.el (soap-well-known-xmlns, soap-local-xmlns) 280 * net/soap-client.el (soap-well-known-xmlns, soap-local-xmlns)
268 (soap-default-xmlns, soap-target-xmlns, soap-multi-refs) 281 (soap-default-xmlns, soap-target-xmlns, soap-multi-refs)
269 (soap-decoded-multi-refs, soap-current-wsdl) 282 (soap-decoded-multi-refs, soap-current-wsdl)
270 (soap-encoded-namespaces): Rename CL-style *...* variables. 283 (soap-encoded-namespaces): Rename CL-style *...* variables.
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 9be093743b5..fc167d6e62e 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1574,8 +1574,12 @@ special handling of `substitute-in-file-name'."
1574 (let ((props (tramp-compat-funcall 1574 (let ((props (tramp-compat-funcall
1575 'overlay-properties (symbol-value 'rfn-eshadow-overlay)))) 1575 'overlay-properties (symbol-value 'rfn-eshadow-overlay))))
1576 (while props 1576 (while props
1577 (tramp-compat-funcall 1577 ;; The `field' property prevents correct minibuffer
1578 'overlay-put tramp-rfn-eshadow-overlay (pop props) (pop props)))))) 1578 ;; completion; we exclude it.
1579 (if (not (eq (car props) 'field))
1580 (tramp-compat-funcall
1581 'overlay-put tramp-rfn-eshadow-overlay (pop props) (pop props))
1582 (pop props) (pop props))))))
1579 1583
1580(when (boundp 'rfn-eshadow-setup-minibuffer-hook) 1584(when (boundp 'rfn-eshadow-setup-minibuffer-hook)
1581 (add-hook 'rfn-eshadow-setup-minibuffer-hook 1585 (add-hook 'rfn-eshadow-setup-minibuffer-hook
diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el
index de1debd6456..654323e03e4 100644
--- a/lisp/progmodes/cc-engine.el
+++ b/lisp/progmodes/cc-engine.el
@@ -2023,9 +2023,9 @@ comment at the start of cc-engine.el for more info."
2023 2023
2024(defvar c-state-nonlit-pos-cache nil) 2024(defvar c-state-nonlit-pos-cache nil)
2025(make-variable-buffer-local 'c-state-nonlit-pos-cache) 2025(make-variable-buffer-local 'c-state-nonlit-pos-cache)
2026;; A list of buffer positions which are known not to be in a literal. This is 2026;; A list of buffer positions which are known not to be in a literal or a cpp
2027;; ordered with higher positions at the front of the list. Only those which 2027;; construct. This is ordered with higher positions at the front of the list.
2028;; are less than `c-state-nonlit-pos-cache-limit' are valid. 2028;; Only those which are less than `c-state-nonlit-pos-cache-limit' are valid.
2029 2029
2030(defvar c-state-nonlit-pos-cache-limit 1) 2030(defvar c-state-nonlit-pos-cache-limit 1)
2031(make-variable-buffer-local 'c-state-nonlit-pos-cache-limit) 2031(make-variable-buffer-local 'c-state-nonlit-pos-cache-limit)
@@ -2056,6 +2056,12 @@ comment at the start of cc-engine.el for more info."
2056 ;; This function is almost the same as `c-literal-limits'. It differs in 2056 ;; This function is almost the same as `c-literal-limits'. It differs in
2057 ;; that it is a lower level function, and that it rigourously follows the 2057 ;; that it is a lower level function, and that it rigourously follows the
2058 ;; syntax from BOB, whereas `c-literal-limits' uses a "local" safe position. 2058 ;; syntax from BOB, whereas `c-literal-limits' uses a "local" safe position.
2059 ;;
2060 ;; NOTE: This function manipulates `c-state-nonlit-pos-cache'. This cache
2061 ;; MAY NOT contain any positions within macros, since macros are frequently
2062 ;; turned into comments by use of the `c-cpp-delimiter' category properties.
2063 ;; We cannot rely on this mechanism whilst determining a cache pos since
2064 ;; this function is also called from outwith `c-parse-state'.
2059 (save-restriction 2065 (save-restriction
2060 (widen) 2066 (widen)
2061 (save-excursion 2067 (save-excursion
@@ -2074,6 +2080,11 @@ comment at the start of cc-engine.el for more info."
2074 here) 2080 here)
2075 (setq lit (c-state-pp-to-literal pos npos)) 2081 (setq lit (c-state-pp-to-literal pos npos))
2076 (setq pos (or (cdr lit) npos)) ; end of literal containing npos. 2082 (setq pos (or (cdr lit) npos)) ; end of literal containing npos.
2083 (goto-char pos)
2084 (when (and (c-beginning-of-macro) (/= (point) pos))
2085 (c-syntactic-end-of-macro)
2086 (or (eobp) (forward-char))
2087 (setq pos (point)))
2077 (setq c-state-nonlit-pos-cache (cons pos c-state-nonlit-pos-cache))) 2088 (setq c-state-nonlit-pos-cache (cons pos c-state-nonlit-pos-cache)))
2078 2089
2079 (if (> pos c-state-nonlit-pos-cache-limit) 2090 (if (> pos c-state-nonlit-pos-cache-limit)
@@ -2158,7 +2169,7 @@ comment at the start of cc-engine.el for more info."
2158;; of fruitless backward scans. 2169;; of fruitless backward scans.
2159(defvar c-state-brace-pair-desert nil) 2170(defvar c-state-brace-pair-desert nil)
2160(make-variable-buffer-local 'c-state-brace-pair-desert) 2171(make-variable-buffer-local 'c-state-brace-pair-desert)
2161;; Used only in `c-append-lower-brace-pair-to-state-cache'. It is set when an 2172;; Used only in `c-append-lower-brace-pair-to-state-cache'. It is set when
2162;; that defun has searched backwards for a brace pair and not found one. Its 2173;; that defun has searched backwards for a brace pair and not found one. Its
2163;; value is either nil or a cons (PA . FROM), where PA is the position of the 2174;; value is either nil or a cons (PA . FROM), where PA is the position of the
2164;; enclosing opening paren/brace/bracket which bounds the backwards search (or 2175;; enclosing opening paren/brace/bracket which bounds the backwards search (or
@@ -2843,6 +2854,29 @@ comment at the start of cc-engine.el for more info."
2843 c-state-old-cpp-end nil) 2854 c-state-old-cpp-end nil)
2844 (c-state-mark-point-min-literal)) 2855 (c-state-mark-point-min-literal))
2845 2856
2857;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2858;; Debugging routines to dump `c-state-cache' in a "replayable" form.
2859;; (defmacro c-sc-de (elt) ; "c-state-cache-dump-element"
2860;; `(format ,(concat "(setq " (symbol-name elt) " %s) ") ,elt))
2861;; (defmacro c-sc-qde (elt) ; "c-state-cache-quote-dump-element"
2862;; `(format ,(concat "(setq " (symbol-name elt) " '%s) ") ,elt))
2863;; (defun c-state-dump ()
2864;; ;; For debugging.
2865;; ;(message
2866;; (concat
2867;; (c-sc-qde c-state-cache)
2868;; (c-sc-de c-state-cache-good-pos)
2869;; (c-sc-qde c-state-nonlit-pos-cache)
2870;; (c-sc-de c-state-nonlit-pos-cache-limit)
2871;; (c-sc-qde c-state-brace-pair-desert)
2872;; (c-sc-de c-state-point-min)
2873;; (c-sc-de c-state-point-min-lit-type)
2874;; (c-sc-de c-state-point-min-lit-start)
2875;; (c-sc-de c-state-min-scan-pos)
2876;; (c-sc-de c-state-old-cpp-beg)
2877;; (c-sc-de c-state-old-cpp-end)))
2878;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2879
2846(defun c-invalidate-state-cache-1 (here) 2880(defun c-invalidate-state-cache-1 (here)
2847 ;; Invalidate all info on `c-state-cache' that applies to the buffer at HERE 2881 ;; Invalidate all info on `c-state-cache' that applies to the buffer at HERE
2848 ;; or higher and set `c-state-cache-good-pos' accordingly. The cache is 2882 ;; or higher and set `c-state-cache-good-pos' accordingly. The cache is