summaryrefslogtreecommitdiff
path: root/lisp/progmodes/gdb-mi.el
diff options
context:
space:
mode:
authorMattias EngdegÄrd <mattiase@acm.org>2022-08-12 13:35:01 +0200
committerMattias EngdegÄrd <mattiase@acm.org>2022-08-14 15:43:12 +0200
commite99d7c4d627c1f9b4b26e3890fb3b39f74234d79 (patch)
tree023ef524db8ae62d413186d21a3f358c84998c15 /lisp/progmodes/gdb-mi.el
parent7ece1c4840efa5be7843ebd8b24d0a4c658ebadf (diff)
downloademacs-e99d7c4d627c1f9b4b26e3890fb3b39f74234d79.tar.gz
emacs-e99d7c4d627c1f9b4b26e3890fb3b39f74234d79.tar.bz2
emacs-e99d7c4d627c1f9b4b26e3890fb3b39f74234d79.zip
Simplify code using take, ntake and butlast
* lisp/calc/calc-vec.el (calcFunc-rhead): * lisp/calc/calc.el (calc-top-list, calc-pop): * lisp/emacs-lisp/ert.el (ert-summarize-tests-batch-and-exit): Simplify.
Diffstat (limited to 'lisp/progmodes/gdb-mi.el')
-rw-r--r--lisp/progmodes/gdb-mi.el5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el
index 6f67eff31a2..c256198b3c1 100644
--- a/lisp/progmodes/gdb-mi.el
+++ b/lisp/progmodes/gdb-mi.el
@@ -2512,9 +2512,8 @@ means to decode using the coding-system set for the GDB process."
;; Record transactions if logging is enabled.
(when gdb-enable-debug
(push (cons 'recv string) gdb-debug-log)
- (if (and gdb-debug-log-max
- (> (length gdb-debug-log) gdb-debug-log-max))
- (setcdr (nthcdr (1- gdb-debug-log-max) gdb-debug-log) nil)))
+ (when gdb-debug-log-max
+ (setq gdb-debug-log (ntake gdb-debug-log-max gdb-debug-log))))
;; Recall the left over gud-marker-acc from last time.
(setq gud-marker-acc (concat gud-marker-acc string))