aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/gud.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/lisp/gud.el b/lisp/gud.el
index 34e740bd50f..b8080e0ae72 100644
--- a/lisp/gud.el
+++ b/lisp/gud.el
@@ -317,6 +317,17 @@ available with older versions of GDB."
317 (setcdr first (setq second (cdr second))) 317 (setcdr first (setq second (cdr second)))
318 (setq first second 318 (setq first second
319 second (cdr second))))) 319 second (cdr second)))))
320 ;; Add a trailing single quote if there is a unique completion
321 ;; and it contains an odd number of unquoted single quotes.
322 (and (= (length gud-gdb-complete-list) 1)
323 (let ((str (car gud-gdb-complete-list))
324 (pos 0)
325 (count 0))
326 (while (string-match "\\([^'\\]\\|\\\\'\\)*'" str pos)
327 (setq count (1+ count)
328 pos (match-end 0)))
329 (and (= (mod count 2) 1)
330 (setq gud-gdb-complete-list (list (concat str "'"))))))
320 ;; Let comint handle the rest. 331 ;; Let comint handle the rest.
321 (comint-dynamic-simple-complete command-word gud-gdb-complete-list))) 332 (comint-dynamic-simple-complete command-word gud-gdb-complete-list)))
322 333