Fixed issue with cmake-build-last-target

Fixed issue with cmake-build-last-target,when cmake-last-target was
not present
This commit is contained in:
Bazsalanszky 2020-06-10 09:22:45 +02:00
parent 90d8a5724b
commit 43ff89c0ee

View file

@ -199,6 +199,8 @@ There are two things you can do about this warning:
** Cmake build and run ** Cmake build and run
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defvar cmake-last-target nil)
(defun cmake-build-and-run () (defun cmake-build-and-run ()
"Asks for cmake target, then compiles and runs it." "Asks for cmake target, then compiles and runs it."
(interactive) (interactive)
@ -217,6 +219,7 @@ There are two things you can do about this warning:
(define-key c-mode-base-map (kbd "C-c C-r") (function cmake-build-and-run)) (define-key c-mode-base-map (kbd "C-c C-r") (function cmake-build-and-run))
(define-key c-mode-base-map [f5] 'cmake-build-last-target) (define-key c-mode-base-map [f5] 'cmake-build-last-target)
#+END_SRC #+END_SRC
** Kód indentálás ** Kód indentálás
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun indent-buffer () (defun indent-buffer ()