aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMiles Bader2008-03-01 01:28:31 +0000
committerMiles Bader2008-03-01 01:28:31 +0000
commit51fb064bc72968e739e8dea580e58796c1a87f4c (patch)
tree80c29b96dbb547a7c8db57a6d57ae4c6d2bfc1ca /lisp
parent14e8de0c3f87a228c05902be66c5bcf953636611 (diff)
parent613f60eeb171e5ad881f52d9e7c0ffce2e182fcb (diff)
downloademacs-51fb064bc72968e739e8dea580e58796c1a87f4c.tar.gz
emacs-51fb064bc72968e739e8dea580e58796c1a87f4c.zip
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1090
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog41
-rw-r--r--lisp/diff-mode.el3
-rw-r--r--lisp/files.el17
-rw-r--r--lisp/international/utf-7.el4
-rw-r--r--lisp/net/net-utils.el42
-rw-r--r--lisp/progmodes/cc-mode.el6
-rw-r--r--lisp/progmodes/gdb-ui.el48
-rw-r--r--lisp/textmodes/fill.el8
8 files changed, 108 insertions, 61 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6dc48287ab3..9b9b7eaee76 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,44 @@
12008-03-01 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * diff-mode.el (diff-sanity-check-hunk): Only accept an empty line if
4 we still expect more lines.
5
62008-03-01 Stefan Monnier <monnier@iro.umontreal.ca>
7
8 * textmodes/fill.el (fill-comment-paragraph): Don't try to do
9 comment-paragraph filling if the commark doesn't match
10 comment-start-skip.
11
122008-03-01 Daiki Ueno <ueno@unixuser.org>
13
14 * international/utf-7.el (utf-7-encode): Never skip the trailing - for
15 the `imap' variant.
16
172008-03-01 Jason Rumney <jasonr@gnu.org>
18
19 * files.el (make-auto-save-file-name): Encode more characters in
20 non-file buffer names. Use url-encoding.
21
222008-03-01 Juanma Barranquero <lekktu@gmail.com>
23
24 * net/net-utils.el (ftp-program): Fix typo in docstring.
25 (ifconfig-program-options, netstat-program-options)
26 (arp-program-options, route-program-options, nslookup-program-options)
27 (ftp-program-options, smbclient-program-options)
28 (dns-lookup-program-options, arp, route): Doc fixes.
29
30 * progmodes/gdb-ui.el (gdb-pc-address, gdb-source-file-list)
31 (gdb-cpp-define-alist-program, gdb-mouse-jump, gdb-get-buffer-create)
32 (gdb-set-gud-minor-mode-existing-buffers-1, gdb-debug-log):
33 Fix typos in docstrings.
34 (gdb-pending-triggers): Reflow docstring.
35 (gdb, gdb-init-1): Fix typos in docstrings of gud-def definitions.
36
372008-03-01 Alan Mackenzie <acm@muc.de>
38
39 * progmodes/cc-mode.el (c-neutralize-syntax-in-CPP): Fix a bug on
40 typing "#" at EOB.
41
12008-03-01 Juanma Barranquero <lekktu@gmail.com> 422008-03-01 Juanma Barranquero <lekktu@gmail.com>
2 43
3 * emulation/cua-base.el (cua-remap-control-z): Fix typo in docstring. 44 * emulation/cua-base.el (cua-remap-control-z): Fix typo in docstring.
diff --git a/lisp/diff-mode.el b/lisp/diff-mode.el
index 8a3433537b0..afd9399d1e5 100644
--- a/lisp/diff-mode.el
+++ b/lisp/diff-mode.el
@@ -1363,7 +1363,8 @@ Only works for unified diffs."
1363 (cond 1363 (cond
1364 ((and diff-valid-unified-empty-line 1364 ((and diff-valid-unified-empty-line
1365 ;; Not just (eolp) so we don't infloop at eob. 1365 ;; Not just (eolp) so we don't infloop at eob.
1366 (eq (char-after) ?\n)) 1366 (eq (char-after) ?\n)
1367 (> before 0) (> after 0))
1367 (decf before) (decf after) t) 1368 (decf before) (decf after) t)
1368 ((and (zerop before) (zerop after)) nil) 1369 ((and (zerop before) (zerop after)) nil)
1369 ((or (< before 0) (< after 0)) 1370 ((or (< before 0) (< after 0))
diff --git a/lisp/files.el b/lisp/files.el
index d1b8cd2f30e..740bba2764a 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -4656,15 +4656,18 @@ See also `auto-save-file-name-p'."
4656 (let ((buffer-name (buffer-name)) 4656 (let ((buffer-name (buffer-name))
4657 (limit 0) 4657 (limit 0)
4658 file-name) 4658 file-name)
4659 ;; Eliminate all slashes and backslashes by 4659 ;; Restrict the characters used in the file name to those which
4660 ;; replacing them with sequences that start with %. 4660 ;; are known to be safe on all filesystems, url-encoding the
4661 ;; Quote % also, to keep distinct names distinct. 4661 ;; rest.
4662 (while (string-match "[/\\%]" buffer-name limit) 4662 ;; We do this on all platforms, because even if we are not
4663 ;; running on DOS/Windows, the current directory may be on a
4664 ;; mounted VFAT filesystem, such as a USB memory stick.
4665 (while (string-match "[^A-Za-z0-9-_.~#+]" buffer-name limit)
4663 (let* ((character (aref buffer-name (match-beginning 0))) 4666 (let* ((character (aref buffer-name (match-beginning 0)))
4664 (replacement 4667 (replacement
4665 (cond ((eq character ?%) "%%") 4668 ;; For multibyte characters, this will produce more than
4666 ((eq character ?/) "%+") 4669 ;; 2 hex digits, so is not true URL encoding.
4667 ((eq character ?\\) "%-")))) 4670 (format "%%%02X" character)))
4668 (setq buffer-name (replace-match replacement t t buffer-name)) 4671 (setq buffer-name (replace-match replacement t t buffer-name))
4669 (setq limit (1+ (match-end 0))))) 4672 (setq limit (1+ (match-end 0)))))
4670 ;; Generate the file name. 4673 ;; Generate the file name.
diff --git a/lisp/international/utf-7.el b/lisp/international/utf-7.el
index 77e2a18c684..e2fe6949cae 100644
--- a/lisp/international/utf-7.el
+++ b/lisp/international/utf-7.el
@@ -110,7 +110,9 @@ ESC and SKIP-CHARS are adjusted for the normal and IMAP versions."
110 ;; consistent with iconv, at least regarding `='. 110 ;; consistent with iconv, at least regarding `='.
111 (skip-chars-forward "^= \t\n") 111 (skip-chars-forward "^= \t\n")
112 (delete-region (point) (point-max)))) 112 (delete-region (point) (point-max))))
113 (unless (eobp) 113 ;; RFC2060 stipulates that all names MUST end in US-ASCII (i.e.
114 ;; a name that ends with a Unicode octet MUST end with a "-").
115 (if (or imap (not (eobp)))
114 (insert ?-))))) 116 (insert ?-)))))
115 nil)) 117 nil))
116 118
diff --git a/lisp/net/net-utils.el b/lisp/net/net-utils.el
index 8492fa2912d..910dd322b6f 100644
--- a/lisp/net/net-utils.el
+++ b/lisp/net/net-utils.el
@@ -105,7 +105,7 @@ These options can be used to limit how many ICMP packets are emitted."
105 (list 105 (list
106 (if (eq system-type 'windows-nt) 106 (if (eq system-type 'windows-nt)
107 "/all" "-a")) 107 "/all" "-a"))
108 "Options for `ifconfig-program'." 108 "Options for the ifconfig program."
109 :group 'net-utils 109 :group 'net-utils
110 :type '(repeat string)) 110 :type '(repeat string))
111 111
@@ -124,25 +124,25 @@ These options can be used to limit how many ICMP packets are emitted."
124(define-obsolete-variable-alias 'ipconfig-program-options 124(define-obsolete-variable-alias 'ipconfig-program-options
125 'ifconfig-program-options "22.2") 125 'ifconfig-program-options "22.2")
126 126
127(defcustom netstat-program "netstat" 127(defcustom netstat-program "netstat"
128 "Program to print network statistics." 128 "Program to print network statistics."
129 :group 'net-utils 129 :group 'net-utils
130 :type 'string) 130 :type 'string)
131 131
132(defcustom netstat-program-options 132(defcustom netstat-program-options
133 (list "-a") 133 (list "-a")
134 "Options for netstat-program." 134 "Options for the netstat program."
135 :group 'net-utils 135 :group 'net-utils
136 :type '(repeat string)) 136 :type '(repeat string))
137 137
138(defcustom arp-program "arp" 138(defcustom arp-program "arp"
139 "Program to print IP to address translation tables." 139 "Program to print IP to address translation tables."
140 :group 'net-utils 140 :group 'net-utils
141 :type 'string) 141 :type 'string)
142 142
143(defcustom arp-program-options 143(defcustom arp-program-options
144 (list "-a") 144 (list "-a")
145 "Options for arp-program." 145 "Options for the arp program."
146 :group 'net-utils 146 :group 'net-utils
147 :type '(repeat string)) 147 :type '(repeat string))
148 148
@@ -158,17 +158,17 @@ These options can be used to limit how many ICMP packets are emitted."
158 (if (eq system-type 'windows-nt) 158 (if (eq system-type 'windows-nt)
159 (list "print") 159 (list "print")
160 (list "-r")) 160 (list "-r"))
161 "Options for route-program." 161 "Options for the route program."
162 :group 'net-utils 162 :group 'net-utils
163 :type '(repeat string)) 163 :type '(repeat string))
164 164
165(defcustom nslookup-program "nslookup" 165(defcustom nslookup-program "nslookup"
166 "Program to interactively query DNS information." 166 "Program to interactively query DNS information."
167 :group 'net-utils 167 :group 'net-utils
168 :type 'string) 168 :type 'string)
169 169
170(defcustom nslookup-program-options nil 170(defcustom nslookup-program-options nil
171 "List of options to pass to the nslookup program." 171 "Options for the nslookup program."
172 :group 'net-utils 172 :group 'net-utils
173 :type '(repeat string)) 173 :type '(repeat string))
174 174
@@ -180,18 +180,18 @@ This variable is only used if the variable
180 :group 'net-utils 180 :group 'net-utils
181 :type 'regexp) 181 :type 'regexp)
182 182
183(defcustom dig-program "dig" 183(defcustom dig-program "dig"
184 "Program to query DNS information." 184 "Program to query DNS information."
185 :group 'net-utils 185 :group 'net-utils
186 :type 'string) 186 :type 'string)
187 187
188(defcustom ftp-program "ftp" 188(defcustom ftp-program "ftp"
189 "Progam to run to do FTP transfers." 189 "Program to run to do FTP transfers."
190 :group 'net-utils 190 :group 'net-utils
191 :type 'string) 191 :type 'string)
192 192
193(defcustom ftp-program-options nil 193(defcustom ftp-program-options nil
194 "List of options to pass to the FTP program." 194 "Options for the ftp program."
195 :group 'net-utils 195 :group 'net-utils
196 :type '(repeat string)) 196 :type '(repeat string))
197 197
@@ -209,7 +209,7 @@ This variable is only used if the variable
209 :type 'string) 209 :type 'string)
210 210
211(defcustom smbclient-program-options nil 211(defcustom smbclient-program-options nil
212 "List of options to pass to the smbclient program." 212 "Options for the smbclient program."
213 :group 'net-utils 213 :group 'net-utils
214 :type '(repeat string)) 214 :type '(repeat string))
215 215
@@ -221,17 +221,15 @@ This variable is only used if the variable
221 :group 'net-utils 221 :group 'net-utils
222 :type 'regexp) 222 :type 'regexp)
223 223
224(defcustom dns-lookup-program "host" 224(defcustom dns-lookup-program "host"
225 "Program to interactively query DNS information." 225 "Program to interactively query DNS information."
226 :group 'net-utils 226 :group 'net-utils
227 :type 'string 227 :type 'string)
228 )
229 228
230(defcustom dns-lookup-program-options nil 229(defcustom dns-lookup-program-options nil
231 "List of options to pass to the dns-lookup program." 230 "Options for the dns-lookup program."
232 :group 'net-utils 231 :group 'net-utils
233 :type '(repeat string) 232 :type '(repeat string))
234 )
235 233
236;; Internal variables 234;; Internal variables
237(defvar network-connection-service nil) 235(defvar network-connection-service nil)
@@ -397,7 +395,7 @@ If your system's ping continues until interrupted, you can try setting
397 395
398;;;###autoload 396;;;###autoload
399(defun arp () 397(defun arp ()
400 "Run the arp program." 398 "Run arp program."
401 (interactive) 399 (interactive)
402 (net-utils-run-program 400 (net-utils-run-program
403 "Arp" 401 "Arp"
@@ -407,7 +405,7 @@ If your system's ping continues until interrupted, you can try setting
407 405
408;;;###autoload 406;;;###autoload
409(defun route () 407(defun route ()
410 "Run the route program." 408 "Run route program."
411 (interactive) 409 (interactive)
412 (net-utils-run-program 410 (net-utils-run-program
413 "Route" 411 "Route"
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index 607ee54e30f..2d8e66ab3fc 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -848,13 +848,11 @@ Note that the style variables are always made local to the buffer."
848 (if (setq limits (c-literal-limits)) 848 (if (setq limits (c-literal-limits))
849 (goto-char (cdr limits))) 849 (goto-char (cdr limits)))
850 850
851 (while (and (< (point) end) 851 (while (search-forward-regexp c-anchored-cpp-prefix end t)
852 (search-forward-regexp c-anchored-cpp-prefix end t))
853 (when (c-beginning-of-macro) ; Guard against being in a string/comment. 852 (when (c-beginning-of-macro) ; Guard against being in a string/comment.
854 (setq mbeg (point)) 853 (setq mbeg (point))
855 (c-end-of-macro) ; Do we need to go forward 1 char here? No! 854 (c-end-of-macro) ; Do we need to go forward 1 char here? No!
856 (c-neutralize-CPP-line mbeg (point))) 855 (c-neutralize-CPP-line mbeg (point)))))) ; We might still be in a comment - this is OK.
857 (forward-char)))) ; We might still be in a comment - this is OK.
858 856
859(defun c-before-change (beg end) 857(defun c-before-change (beg end)
860 ;; Function to be put on `before-change-function'. Primarily, this calls 858 ;; Function to be put on `before-change-function'. Primarily, this calls
diff --git a/lisp/progmodes/gdb-ui.el b/lisp/progmodes/gdb-ui.el
index 111f8903fd3..7cbea06889f 100644
--- a/lisp/progmodes/gdb-ui.el
+++ b/lisp/progmodes/gdb-ui.el
@@ -100,7 +100,7 @@
100(defvar speedbar-initial-expansion-list-name) 100(defvar speedbar-initial-expansion-list-name)
101 101
102(defvar gdb-pc-address nil "Initialization for Assembler buffer. 102(defvar gdb-pc-address nil "Initialization for Assembler buffer.
103Set to \"main\" at start if gdb-show-main is t.") 103Set to \"main\" at start if `gdb-show-main' is t.")
104(defvar gdb-frame-address nil "Identity of frame for watch expression.") 104(defvar gdb-frame-address nil "Identity of frame for watch expression.")
105(defvar gdb-previous-frame-address nil) 105(defvar gdb-previous-frame-address nil)
106(defvar gdb-memory-address "main") 106(defvar gdb-memory-address "main")
@@ -109,7 +109,7 @@ Set to \"main\" at start if gdb-show-main is t.")
109(defvar gdb-frame-number nil) 109(defvar gdb-frame-number nil)
110(defvar gdb-current-language nil) 110(defvar gdb-current-language nil)
111(defvar gdb-var-list nil 111(defvar gdb-var-list nil
112 "List of variables in watch window. 112 "List of variables in watch window.
113Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP) 113Each element has the form (VARNUM EXPRESSION NUMCHILD TYPE VALUE STATUS FP)
114where STATUS is nil (`unchanged'), `changed' or `out-of-scope', FP the frame 114where STATUS is nil (`unchanged'), `changed' or `out-of-scope', FP the frame
115address for root variables.") 115address for root variables.")
@@ -176,14 +176,13 @@ gdba (gdb-ui.el) uses all five values, gdbmi (gdb-mi.el) only two
176 "The most recent command item sent to gdb.") 176 "The most recent command item sent to gdb.")
177 177
178(defvar gdb-pending-triggers '() 178(defvar gdb-pending-triggers '()
179 "A list of trigger functions that have run later than their output 179 "A list of trigger functions that have run later than their output handlers.")
180handlers.")
181 180
182(defvar gdb-first-post-prompt nil) 181(defvar gdb-first-post-prompt nil)
183(defvar gdb-version nil) 182(defvar gdb-version nil)
184(defvar gdb-locals-font-lock-keywords nil) 183(defvar gdb-locals-font-lock-keywords nil)
185(defvar gdb-source-file-list nil 184(defvar gdb-source-file-list nil
186 "List of source files for the current executable") 185 "List of source files for the current executable.")
187(defconst gdb-error-regexp "\\^error,msg=\"\\(.+\\)\"") 186(defconst gdb-error-regexp "\\^error,msg=\"\\(.+\\)\"")
188 187
189(defvar gdb-locals-font-lock-keywords-1 188(defvar gdb-locals-font-lock-keywords-1
@@ -291,7 +290,7 @@ session."
291 (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.") 290 (gud-def gud-break "break %f:%l" "\C-b" "Set breakpoint at current line.")
292 (gud-def gud-tbreak "tbreak %f:%l" "\C-t" 291 (gud-def gud-tbreak "tbreak %f:%l" "\C-t"
293 "Set temporary breakpoint at current line.") 292 "Set temporary breakpoint at current line.")
294 (gud-def gud-remove "clear %f:%l" "\C-d" "Remove breakpoint at current line") 293 (gud-def gud-remove "clear %f:%l" "\C-d" "Remove breakpoint at current line.")
295 (gud-def gud-step "step %p" "\C-s" "Step one source line with display.") 294 (gud-def gud-step "step %p" "\C-s" "Step one source line with display.")
296 (gud-def gud-stepi "stepi %p" "\C-i" "Step one instruction with display.") 295 (gud-def gud-stepi "stepi %p" "\C-i" "Step one instruction with display.")
297 (gud-def gud-next "next %p" "\C-n" "Step one line (skip functions).") 296 (gud-def gud-next "next %p" "\C-n" "Step one line (skip functions).")
@@ -338,10 +337,9 @@ session."
338 :version "22.1") 337 :version "22.1")
339 338
340(defvar gdb-debug-log nil 339(defvar gdb-debug-log nil
341 "List of commands sent to and replies received from GDB. Most 340 "List of commands sent to and replies received from GDB.
342recent commands are listed first. This list stores only the last 341Most recent commands are listed first. This list stores only the last
343'gdb-debug-log-max' values. This variable is used to debug 342`gdb-debug-log-max' values. This variable is used to debug GDB-UI.")
344GDB-UI.")
345 343
346;;;###autoload 344;;;###autoload
347(defcustom gdb-enable-debug nil 345(defcustom gdb-enable-debug nil
@@ -354,7 +352,7 @@ GDB-UI.")
354 "Shell command for generating a list of defined macros in a source file. 352 "Shell command for generating a list of defined macros in a source file.
355This list is used to display the #define directive associated 353This list is used to display the #define directive associated
356with an identifier as a tooltip. It works in a debug session with 354with an identifier as a tooltip. It works in a debug session with
357GDB, when gud-tooltip-mode is t. 355GDB, when `gud-tooltip-mode' is t.
358 356
359Set `gdb-cpp-define-alist-flags' for any include paths or 357Set `gdb-cpp-define-alist-flags' for any include paths or
360predefined macros." 358predefined macros."
@@ -555,7 +553,7 @@ otherwise do not."
555 "pp1 " (if (eq (buffer-local-value 553 "pp1 " (if (eq (buffer-local-value
556 'major-mode (window-buffer)) 'speedbar-mode) 554 'major-mode (window-buffer)) 'speedbar-mode)
557 (gdb-find-watch-expression) "%e")) arg) 555 (gdb-find-watch-expression) "%e")) arg)
558 nil "Print the emacs s-expression.") 556 nil "Print the Emacs s-expression.")
559 557
560 (define-key gud-minor-mode-map [left-margin mouse-1] 558 (define-key gud-minor-mode-map [left-margin mouse-1]
561 'gdb-mouse-set-clear-breakpoint) 559 'gdb-mouse-set-clear-breakpoint)
@@ -689,7 +687,7 @@ with mouse-1 (default bindings)."
689 "Set execution address/line. 687 "Set execution address/line.
690The destination source line can be selected either by clicking with C-mouse-3 688The destination source line can be selected either by clicking with C-mouse-3
691on the fringe/margin or dragging the arrow with C-mouse-1 (default bindings). 689on the fringe/margin or dragging the arrow with C-mouse-1 (default bindings).
692Unlike gdb-mouse-until the destination address can be before the current 690Unlike `gdb-mouse-until' the destination address can be before the current
693line, and no execution takes place." 691line, and no execution takes place."
694 (interactive "e") 692 (interactive "e")
695 (let ((start (event-start event)) 693 (let ((start (event-start event))
@@ -827,7 +825,7 @@ With arg, enter name of variable to be watched in the minibuffer."
827 `(lambda () (gdb-var-list-children-handler ,varnum))))) 825 `(lambda () (gdb-var-list-children-handler ,varnum)))))
828 826
829(defconst gdb-var-list-children-regexp 827(defconst gdb-var-list-children-regexp
830 "child={.*?name=\"\\(.*?\\)\",.*?exp=\"\\(.*?\\)\",.*?\ 828 "child={.*?name=\"\\(.*?\\)\",.*?exp=\"\\(.*?\\)\",.*?\
831numchild=\"\\(.*?\\)\"\\(}\\|,.*?\\(type=\"\\(.*?\\)\"\\)?.*?}\\)") 829numchild=\"\\(.*?\\)\"\\(}\\|,.*?\\(type=\"\\(.*?\\)\"\\)?.*?}\\)")
832 830
833(defun gdb-var-list-children-handler (varnum) 831(defun gdb-var-list-children-handler (varnum)
@@ -1035,7 +1033,7 @@ The key should be one of the cars in `gdb-buffer-rules-assoc'."
1035 (gdb-look-for-tagged-buffer key (buffer-list)))) 1033 (gdb-look-for-tagged-buffer key (buffer-list))))
1036 1034
1037(defun gdb-get-buffer-create (key) 1035(defun gdb-get-buffer-create (key)
1038 "Create a new gdb buffer of the type specified by KEY. 1036 "Create a new gdb buffer of the type specified by KEY.
1039The key should be one of the cars in `gdb-buffer-rules-assoc'." 1037The key should be one of the cars in `gdb-buffer-rules-assoc'."
1040 (or (gdb-get-buffer key) 1038 (or (gdb-get-buffer key)
1041 (let* ((rules (assoc key gdb-buffer-rules-assoc)) 1039 (let* ((rules (assoc key gdb-buffer-rules-assoc))
@@ -1351,7 +1349,7 @@ happens to be in effect."
1351 "An annotation handler for `prompt'. 1349 "An annotation handler for `prompt'.
1352This sends the next command (if any) to gdb." 1350This sends the next command (if any) to gdb."
1353 (when gdb-first-prompt 1351 (when gdb-first-prompt
1354 (gdb-force-mode-line-update 1352 (gdb-force-mode-line-update
1355 (propertize "initializing..." 'face font-lock-variable-name-face)) 1353 (propertize "initializing..." 'face font-lock-variable-name-face))
1356 (gdb-init-1) 1354 (gdb-init-1)
1357 (setq gdb-first-prompt nil)) 1355 (setq gdb-first-prompt nil))
@@ -2283,7 +2281,7 @@ static char *magick[] = {
2283 (kill-all-local-variables) 2281 (kill-all-local-variables)
2284 (setq major-mode 'gdb-frames-mode) 2282 (setq major-mode 'gdb-frames-mode)
2285 (setq mode-name "Frames") 2283 (setq mode-name "Frames")
2286 (setq gdb-stack-position nil) 2284 (setq gdb-stack-position nil)
2287 (add-to-list 'overlay-arrow-variable-list 'gdb-stack-position) 2285 (add-to-list 'overlay-arrow-variable-list 'gdb-stack-position)
2288 (setq truncate-lines t) ;; Make it easier to see overlay arrow. 2286 (setq truncate-lines t) ;; Make it easier to see overlay arrow.
2289 (setq buffer-read-only t) 2287 (setq buffer-read-only t)
@@ -2612,10 +2610,10 @@ another GDB command e.g pwd, to see new frames")
2612 (let ((map (make-sparse-keymap))) 2610 (let ((map (make-sparse-keymap)))
2613 (define-key map [header-line down-mouse-3] 'gdb-memory-format-menu-1) 2611 (define-key map [header-line down-mouse-3] 'gdb-memory-format-menu-1)
2614 map) 2612 map)
2615 "Keymap to select format in the header line.") 2613 "Keymap to select format in the header line.")
2616 2614
2617(defvar gdb-memory-format-menu (make-sparse-keymap "Format") 2615(defvar gdb-memory-format-menu (make-sparse-keymap "Format")
2618 "Menu of display formats in the header line.") 2616 "Menu of display formats in the header line.")
2619 2617
2620(define-key gdb-memory-format-menu [binary] 2618(define-key gdb-memory-format-menu [binary]
2621 '(menu-item "Binary" gdb-memory-format-binary 2619 '(menu-item "Binary" gdb-memory-format-binary
@@ -2674,10 +2672,10 @@ another GDB command e.g pwd, to see new frames")
2674 (let ((map (make-sparse-keymap))) 2672 (let ((map (make-sparse-keymap)))
2675 (define-key map [header-line down-mouse-3] 'gdb-memory-unit-menu-1) 2673 (define-key map [header-line down-mouse-3] 'gdb-memory-unit-menu-1)
2676 map) 2674 map)
2677 "Keymap to select units in the header line.") 2675 "Keymap to select units in the header line.")
2678 2676
2679(defvar gdb-memory-unit-menu (make-sparse-keymap "Unit") 2677(defvar gdb-memory-unit-menu (make-sparse-keymap "Unit")
2680 "Menu of units in the header line.") 2678 "Menu of units in the header line.")
2681 2679
2682(define-key gdb-memory-unit-menu [giantwords] 2680(define-key gdb-memory-unit-menu [giantwords]
2683 '(menu-item "Giant words" gdb-memory-unit-giant 2681 '(menu-item "Giant words" gdb-memory-unit-giant
@@ -2840,7 +2838,7 @@ corresponding to the mode line clicked."
2840 (beginning-of-line) 2838 (beginning-of-line)
2841 (gud-watch))) 2839 (gud-watch)))
2842 map) 2840 map)
2843 "Keymap to create watch expression of a complex data type local variable.") 2841 "Keymap to create watch expression of a complex data type local variable.")
2844 2842
2845(defconst gdb-struct-string 2843(defconst gdb-struct-string
2846 (concat (propertize "[struct/union]" 2844 (concat (propertize "[struct/union]"
@@ -3489,7 +3487,7 @@ BUFFER nil or omitted means use the current buffer."
3489 3487
3490(defun gdb-set-gud-minor-mode-existing-buffers-1 () 3488(defun gdb-set-gud-minor-mode-existing-buffers-1 ()
3491 "Create list of source files for current GDB session. 3489 "Create list of source files for current GDB session.
3492If buffers already exist for any of these files, gud-minor-mode 3490If buffers already exist for any of these files, `gud-minor-mode'
3493is set in them." 3491is set in them."
3494 (goto-char (point-min)) 3492 (goto-char (point-min))
3495 (while (re-search-forward gdb-source-file-regexp-1 nil t) 3493 (while (re-search-forward gdb-source-file-regexp-1 nil t)
@@ -3700,7 +3698,7 @@ in_scope=\"\\(.*?\\)\".*?}")
3700 (define-key map "\r" 'gud-watch) 3698 (define-key map "\r" 'gud-watch)
3701 (define-key map [mouse-2] 'gud-watch) 3699 (define-key map [mouse-2] 'gud-watch)
3702 map) 3700 map)
3703 "Keymap to create watch expression of a complex data type local variable.") 3701 "Keymap to create watch expression of a complex data type local variable.")
3704 3702
3705(defvar gdb-edit-locals-map-1 3703(defvar gdb-edit-locals-map-1
3706 (let ((map (make-sparse-keymap))) 3704 (let ((map (make-sparse-keymap)))
@@ -3708,7 +3706,7 @@ in_scope=\"\\(.*?\\)\".*?}")
3708 (define-key map "\r" 'gdb-edit-locals-value) 3706 (define-key map "\r" 'gdb-edit-locals-value)
3709 (define-key map [mouse-2] 'gdb-edit-locals-value) 3707 (define-key map [mouse-2] 'gdb-edit-locals-value)
3710 map) 3708 map)
3711 "Keymap to edit value of a simple data type local variable.") 3709 "Keymap to edit value of a simple data type local variable.")
3712 3710
3713(defun gdb-edit-locals-value (&optional event) 3711(defun gdb-edit-locals-value (&optional event)
3714 "Assign a value to a variable displayed in the locals buffer." 3712 "Assign a value to a variable displayed in the locals buffer."
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 6fa26afa4f5..7f7a98e087a 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -855,7 +855,13 @@ can take care of filling. JUSTIFY is used as in `fill-paragraph'."
855 (goto-char comstart) (skip-chars-backward " \t") 855 (goto-char comstart) (skip-chars-backward " \t")
856 (setq has-code-and-comment (not (bolp))))) 856 (setq has-code-and-comment (not (bolp)))))
857 857
858 (if (not comstart) 858 (if (not (and comstart
859 ;; Make sure the comment-start mark we found is accepted by
860 ;; comment-start-skip. If not, all bets are off, and
861 ;; we'd better not mess with it.
862 (string-match comment-start-skip
863 (buffer-substring comstart comin))))
864
859 ;; Return nil, so the normal filling will take place. 865 ;; Return nil, so the normal filling will take place.
860 nil 866 nil
861 867