In OSX, pressing
C-x C-c closes all Emacs windows instead of only the selected one. This isn't the bahavior I've come to esxpect from using Emacs on Windows, Ubuntu,or CentOS. What's up?
C-x C-c is for Kill Emacs (save-buffers-kill-terminal).
Maybe on other systems you are using
C-x C-cbehaves specially if you are using Emacs as a server. If you type it from a client frame, it closes the client connection.
Or maybe you run multiple instances of Emacs?
To close only one frame use
C-x 5 0 or
This command delete current frame or kill Emacs if there are only one frame:
(defun close-frame-or-kill-emacs () "Delete frame or kill Emacs if there are only one frame." (interactive) (if (> (length (frame-list)) 1) (delete-frame) (save-buffers-kill-terminal)))