;; Use the old gud-gbd filter, not because it works, but because it
;; will properly display GDB's answers rather than hanging waiting for
;; answers that aren't coming.
- (set (make-local-variable 'gud-marker-filter) #'gud-gdb-marker-filter))
+ (setq-local gud-marker-filter #'gud-gdb-marker-filter))
(funcall filter proc string)))
(defvar gdb-control-level 0)
(let ((proc (get-buffer-process gud-comint-buffer)))
(add-function :around (process-filter proc) #'gdb--check-interpreter))
- (set (make-local-variable 'gud-minor-mode) 'gdbmi)
- (set (make-local-variable 'gdb-control-level) 0)
+ (setq-local gud-minor-mode 'gdbmi)
+ (setq-local gdb-control-level 0)
(setq comint-input-sender 'gdb-send)
(when (ring-empty-p comint-input-ring) ; cf shell-mode
(let ((hfile (expand-file-name (or (getenv "GDBHISTFILE")
(and (stringp hsize)
(integerp (setq hsize (string-to-number hsize)))
(> hsize 0)
- (set (make-local-variable 'comint-input-ring-size) hsize))
+ (setq-local comint-input-ring-size hsize))
(if (stringp hfile)
- (set (make-local-variable 'comint-input-ring-file-name) hfile))
+ (setq-local comint-input-ring-file-name hfile))
(comint-read-input-ring t)))
(gud-def gud-tbreak "tbreak %f:%l" "\C-t"
"Set temporary breakpoint at current line.")
(define-key gud-minor-mode-map [left-margin C-mouse-3]
'gdb-mouse-jump)
- (set (make-local-variable 'gud-gdb-completion-function)
- 'gud-gdbmi-completions)
+ (setq-local gud-gdb-completion-function 'gud-gdbmi-completions)
(add-hook 'completion-at-point-functions #'gud-gdb-completion-at-point
nil 'local)
(lambda () (gdb-tooltip-print expr)))))))
(defun gdb-init-buffer ()
- (set (make-local-variable 'gud-minor-mode) 'gdbmi)
- (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
+ (setq-local gud-minor-mode 'gdbmi)
+ (setq-local tool-bar-map gud-tool-bar-map)
(when gud-tooltip-mode
(make-local-variable 'gdb-define-alist)
(gdb-create-define-alist)
(when mode (funcall mode))
(setq gdb-buffer-type buffer-type)
(when thread
- (set (make-local-variable 'gdb-thread-number) thread))
- (set (make-local-variable 'gud-minor-mode)
- (buffer-local-value 'gud-minor-mode gud-comint-buffer))
- (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
+ (setq-local gdb-thread-number thread))
+ (setq-local gud-minor-mode
+ (buffer-local-value 'gud-minor-mode gud-comint-buffer))
+ (setq-local tool-bar-map gud-tool-bar-map)
(rename-buffer (funcall (gdb-rules-name-maker rules)))
(when trigger
(gdb-add-subscriber gdb-buf-publisher
(setq gdb-thread-position (make-marker))
(add-to-list 'overlay-arrow-variable-list 'gdb-thread-position)
(setq header-line-format gdb-threads-header)
- (set (make-local-variable 'font-lock-defaults)
- '(gdb-threads-font-lock-keywords))
+ (setq-local font-lock-defaults '(gdb-threads-font-lock-keywords))
'gdb-invalidate-threads)
(defun gdb-thread-list-handler-custom ()
(define-derived-mode gdb-memory-mode gdb-parent-mode "Memory"
"Major mode for examining memory."
(setq header-line-format gdb-memory-header)
- (set (make-local-variable 'font-lock-defaults)
- '(gdb-memory-font-lock-keywords))
+ (setq-local font-lock-defaults '(gdb-memory-font-lock-keywords))
'gdb-invalidate-memory)
(defun gdb-memory-buffer-name ()
;; TODO Rename overlay variable for disassembly mode
(add-to-list 'overlay-arrow-variable-list 'gdb-disassembly-position)
(setq fringes-outside-margins t)
- (set (make-local-variable 'gdb-disassembly-position) (make-marker))
- (set (make-local-variable 'font-lock-defaults)
- '(gdb-disassembly-font-lock-keywords))
+ (setq-local gdb-disassembly-position (make-marker))
+ (setq-local font-lock-defaults '(gdb-disassembly-font-lock-keywords))
'gdb-invalidate-disassembly)
(defun gdb-disassembly-handler-custom ()
(setq gdb-stack-position (make-marker))
(add-to-list 'overlay-arrow-variable-list 'gdb-stack-position)
(setq truncate-lines t) ;; Make it easier to see overlay arrow.
- (set (make-local-variable 'font-lock-defaults)
- '(gdb-frames-font-lock-keywords))
+ (setq-local font-lock-defaults '(gdb-frames-font-lock-keywords))
'gdb-invalidate-frames)
(defun gdb-select-frame (&optional event)