2

How, please, can I disable this prompt from appearing on exit: "Options have changed -- save them? (y or n)"

Alternatively, I'd like the answer to this particular question to always be "no" without further keyboard input required to exit.

My init.el file for Aquamacs 2.4 is creating a change in the options, and I do not want to create a customizations.el by saying yes to the question.

Thanks.

Here is the code from the customizations.el that is generated if I answer the prompt with a "yes" when exiting.

(custom-set-variables
 '(aquamacs-additional-fontsets nil t)
 '(aquamacs-customization-version-id 215 t)
 '(aquamacs-tool-bar-user-customization nil t)
 '(default-frame-alist (quote ((background-mode . light) (border-color . "black") (mouse-color . "black") (background-color . "white") (foreground-color . "black") (menu-bar-lines . 1) (cursor-type . box) (vertical-scroll-bars . right) (internal-border-width . 0) (left-fringe . 1) (right-fringe) (fringe) (cursor-color . "red") (tool-bar-lines . 0))))
 '(global-flyspell-mode t)
 '(global-hl-line-mode t)
 '(global-linum-mode t)
 '(global-show-newlines-mode t)
 '(ns-tool-bar-display-mode (quote both) t)
 '(ns-tool-bar-size-mode (quote regular) t)
 '(size-indication-mode t)
 '(visual-line-mode nil t))

(custom-set-faces
 '(emacs-lisp-mode-default ((t (:inherit autoface-default :height 180 :family "Courier"))) t)
 '(latex-mode-default ((t (:inherit default height 180 :family "Courier"))))
 '(plain-tex-mode-default ((t (:inherit default :height 180 :family "Courier"))) t)
 '(text-mode-default ((t (:inherit autoface-default :stipple nil :strike-through nil :underline nil :slant normal :weight normal :height 180 :width normal :family "Courier"))))
 '(whitespace ((((class color) (background light)) (:background "white" :foreground "red" :weight ultra-bold :width ultra-expanded))))
 '(whitespace-space ((((class color) (background light)) (:foreground "red")))))

Here is the debug message that is visible on quit:

Debugger entered--Lisp error: (quit)
  old-y-or-n-p("Options have changed - save them? ")
  (if (and long (not aquamacs-quick-yes-or-no-prompt)) (old-yes-or-no-p text) (old-y-or-n-p text))
  (let ((text ...)) (if (and long ...) (old-yes-or-no-p text) (old-y-or-n-p text)))
  (progn (and (fboundp ...) smart-frame-positioning-mode (smart-move-minibuffer-inside-screen f)) (let (...) (if ... ... ...)))
  (if (or (and last-nonmenu-event ...) (not use-dialog-box) (not window-system)) (progn (and ... smart-frame-positioning-mode ...) (let ... ...)) (let (...) (if ... ...) ret))
  (let ((f ...)) (make-frame-visible f) (raise-frame f) (if (or ... ... ...) (progn ... ...) (let ... ... ret)))
  aquamacs-ask-for-confirmation("Options have changed - save them? \nYour customizations will be lost if you don't save them." nil "Save" "Don't Save")
  (progn (aquamacs-ask-for-confirmation "Options have changed - save them? \nYour customizations will be lost if you don't save them." nil "Save" "Don't Save"))
  (if (eq aquamacs-save-options-on-quit (quote ask)) (progn (aquamacs-ask-for-confirmation "Options have changed - save them? \nYour customizations will be lost if you don't save them." nil "Save" "Don't Save")) aquamacs-save-options-on-quit)
  (and (or aquamacs-faces-changed (filter-list changed ...)) (if (eq aquamacs-save-options-on-quit ...) (progn ...) aquamacs-save-options-on-quit))
  (if (and (or aquamacs-faces-changed ...) (if ... ... aquamacs-save-options-on-quit)) (aquamacs-menu-bar-options-save))
  (let* ((changed ...)) (if (and ... ...) (aquamacs-menu-bar-options-save)))
  (condition-case nil (let* (...) (if ... ...)) (error nil))
  aquamacs-ask-to-save-options()
  run-hook-with-args-until-failure(aquamacs-ask-to-save-options)
  (and (or (not ...) (let ... ... ...)) (run-hook-with-args-until-failure (quote kill-emacs-query-functions)) (or (null confirm-kill-emacs) (funcall confirm-kill-emacs "Really exit Aquamacs? ")) (kill-emacs))
  (progn (setq timer-idle-list) (save-some-buffers arg t) (and (or ... ...) (run-hook-with-args-until-failure ...) (or ... ...) (kill-emacs)))
  (unwind-protect (progn (setq timer-idle-list) (save-some-buffers arg t) (and ... ... ... ...)) (setq timer-idle-list saved-timer-idle-list))
  (let ((saved-timer-idle-list timer-idle-list)) (unwind-protect (progn ... ... ...) (setq timer-idle-list saved-timer-idle-list)))
  aquamacs-save-buffers-kill-emacs(nil)
  call-interactively(aquamacs-save-buffers-kill-emacs nil nil)
lawlist
  • 13,099
  • 3
  • 49
  • 158
  • What change exactly is your `init.el` creating? – Thomas Apr 16 '13 at 02:38
  • I just added the init.el to my question. – lawlist Apr 16 '13 at 04:54
  • This is too much. Please narrow it down to the relevant parts. – Thomas Apr 16 '13 at 23:29
  • Thank you for the suggestion. I modified the question to include just the customizations.el that is created if I answer the prompt with a "yes" when exiting. The relevant portion of the init.el mirrors customizations.el. The goal is to never create a customizations.el and always say "no" and exit when prompted to save changes to the options. – lawlist Apr 17 '13 at 02:36
  • I think this may be an Aquamacs thing (or at least, I didn't find that message in the Emacs 24.3 sources). Try `M-x toggle-debug-on-quit` and then type `C-g` when it asks that question, and you should get a stack trace showing you exactly where it's coming from. – phils Apr 17 '13 at 03:42
  • I exceeded my allotment of 600 characters for comments . . . so the debug output has been added to the bottom of my question. Perhaps with Aquamacs 2.4, there is no choice but to save the customizations.el even though it mirrors the init.el. I was hoping to avoid a potential conflict where customizations.el overrides my init.el -- the goal was to have just one init.el (with all preferences) that cannot be overridden by the system. – lawlist Apr 17 '13 at 04:03

1 Answers1

0

Well with the caveat that I don't have Aquamacs, I can see what appears to be the answer in the stack trace.

Have a look at:
C-hv aquamacs-save-options-on-quit RET

phils
  • 71,335
  • 11
  • 153
  • 198
  • Awesome! Yes, your suggestion did enable me to obtain enough information to track it down. I placed this snippet into my init.el file and problem solved -- i.e., no more creation of a customizations.el or saving options on exit -- no more prompting. (custom-set-variables '(aquamacs-save-options-on-quit nil) ) Thank you very much -- greatly appreciated! – lawlist Apr 17 '13 at 15:33