title: Emacs Lisp unique window name for split identification and deletion
body: <p>I am trying to uniquely identify a window,
  so that I can select and delete the window if I press a key over again, though I am having trouble doing this.</p>
  
  <pre><code>(setq split-window-right-toggle-var nil)
  
  (defun split-window-right-toggle ()
    (interactive)
    (if split-window-right-toggle-var 
        (progn
          (right-split-undo)
          (setq split-window-right-toggle-var nil))
      (progn
        (right-split-do)
        (setq split-window-right-toggle-var t))))
  
  (defun right-split-do ()
    (interactive)
    (split-window-right)
    (other-window 1))
  
  (defun right-split-undo ()
    (interactive)
    (other-window -1)
    (delete-window))
  </code></pre>
  
  <p>The issue with this code is that it heavily depends on which window is active, there for can
  change the state of my windows and delete the wrong window, can I uniquely give my window a name then target that window name for deletion ? I am really new at Emacs lisp and would appreciate any help thanks.</p>