I've been able to reproduce this with Emacs 23.3 (not Aquamacs) on Mac OS X with the following steps:
1. Open Emacs
2. Load nxhtml autostart.el file
3. Customize variable popcmp-completion-style
4. Close Emacs and open again
5. Try to load nxhtml autostart.el again and it dies with the following backtrace:
Debugger entered--Lisp error: (cl-assertion-failed (memq val (quote (popcmp-popup emacs-default company-mode anything))) (quote emacs-default))
signal(cl-assertion-failed ((memq val (quote ...)) (quote emacs-default)))
(or (memq val (quote ...)) (signal (quote cl-assertion-failed) (list ... val)))
(progn (or (memq val ...) (signal ... ...)) nil)
(assert (memq val (quote ...)) t)
popcmp-set-completion-style((quote emacs-default))
(lambda (sym val) (popcmp-set-completion-style val))(popcmp-completion-style (quote emacs-default))
custom-initialize-reset(popcmp-completion-style (cond ((null window-system) (quote emacs-default)) (t (quote popcmp-popup))))
custom-declare-variable(popcmp-completion-style (cond ((null window-system) (quote emacs-default)) (t (quote popcmp-popup))) "Completion style.\nThe currently available completion styles are:\n\n- popcmp-popup: Use OS popup menus (default).\n- emacs-default: Emacs default completion.\n- Company Mode completion.\n- anything: The Anything elisp lib completion style.\n\nThe style of completion set here is not implemented for all\ncompletions. The scope varies however with which completion\nstyle you have choosen.\n\nFor information about Company Mode and how to use it see URL\n`http://www.emacswiki.org/emacs/CompanyMode'.\n\nFor information about Anything and how to use it see URL\n`http://www.emacswiki.org/emacs/Anything'.\n\nSee also the options `popcmp-short-help-beside-alts' and\n`popcmp-group-alternatives' which are also availabe when popup\ncompletion is available." :type (choice (const company-mode) (const popcmp-popup) (const emacs-default) (const anything)) :set (lambda (sym val) (popcmp-set-completion-style val)) :group popcmp)
(defcustom popcmp-completion-style (cond (... ...) (t ...)) "Completion style.\nThe currently available completion styles are:\n\n- popcmp-popup: Use OS popup menus (default).\n- emacs-default: Emacs default completion.\n- Company Mode completion.\n- anything: The Anything elisp lib completion style.\n\nThe style of completion set here is not implemented for all\ncompletions. The scope varies however with which completion\nstyle you have choosen.\n\nFor information about Company Mode and how to use it see URL\n`http://www.emacswiki.org/emacs/CompanyMode'.\n\nFor information about Anything and how to use it see URL\n`http://www.emacswiki.org/emacs/Anything'.\n\nSee also the options `popcmp-short-help-beside-alts' and\n`popcmp-group-alternatives' which are also availabe when popup\ncompletion is available." :type (quote (choice ... ... ... ...)) :set (lambda (sym val) (popcmp-set-completion-style val)) :group (quote popcmp))
eval-buffer(#<buffer *load*<4>> nil "/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/util/popcmp.el" nil t) ; Reading at buffer position 5771
load-with-code-conversion("/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/util/popcmp.el" "/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/util/popcmp.el" t t)
require(popcmp nil t)
(progn (require (quote popcmp) nil t))
(eval-when-compile (require (quote popcmp) nil t))
eval-buffer(#<buffer *load*<3>> nil "/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/nxhtml/nxhtml-mode.el" nil t) ; Reading at buffer position 2424
load-with-code-conversion("/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/nxhtml/nxhtml-mode.el" "/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/nxhtml/nxhtml-mode.el" t t)
require(nxhtml-mode nil t)
(progn (require (quote nxhtml-mode) nil t))
(if (or (>= emacs-major-version 23) (fboundp ...)) (progn (require ... nil t)))
(when (or (>= emacs-major-version 23) (fboundp ...)) (require (quote nxhtml-mode) nil t))
(progn (when (or ... ...) (require ... nil t)))
(eval-when-compile (when (or ... ...) (require ... nil t)))
eval-buffer(#<buffer *load*<2>> nil "/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/nxhtml/nxhtml-menu.el" nil t) ; Reading at buffer position 1979
load-with-code-conversion("/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/nxhtml/nxhtml-menu.el" "/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/nxhtml/nxhtml-menu.el" t t)
require(nxhtml-menu nil t)
eval-buffer(#<buffer *load*> nil "/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/autostart.el" nil t) ; Reading at buffer position 7929
load-with-code-conversion("/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/autostart.el" "/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/autostart.el" nil nil)
load("/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/autostart.el")
eval((load "/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/autostart.el"))
eval-expression((load "/Users/kaofelix/Library/Preferences/Aquamacs Emacs/Version-Controlled/nxhtml/autostart.el") nil)
call-interactively(eval-expression nil nil)
M-x nxhtml-report-bug output:
Assertion failed: (memq val (quote (popcmp-popup emacs-default company-mode anything))), (quote emacs-default)
I have the same problem, but the weird thing is when I evaluate popcmp- completion- style I get `emacs-default' so I don't understand why the assertion fails.