Hi There, I am using the sml-mode/REPL from inside Emacs. When I try to get the "~" character (normally Right Alt-n on my Swiss-French keyboard) I get what looks to be the first command of the history buffer instead. When I use the REPL from inside a terminal I don't have this problem, the "~" is available as usual, as here. My config : MacOS 10.12. French language Swiss-french keyboard sml/nj from http://www.smlnj.org/dist/working/110.80/ . Standard sml-mode, from Stefan Monnier Stefan gave me a work-around allowing me to get this character when I need it. But this may be a bug so I contact you directly. So did I. Thanks in advance for your help. Thierry In GNU Emacs 24.5.1 (x86_64-apple-darwin13.4.0, NS apple-appkit-1265.21) of 2015-04-10 on builder10-9.porkrind.org Windowing system distributor `Apple', version 10.3.1504 Configured using: `configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp'' Important settings: locale-coding-system: utf-8-unix Major mode: Inferior-SML Minor modes in effect: compilation-minor-mode: t tooltip-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. user-error: End of history; no default available Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils sml-mode compile comint ansi-color ring easymenu smie browse-url package epg-config time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process cocoa ns multi-tty emacs) Memory information: ((conses 16 87441 4028) (symbols 48 18593 0) (miscs 40 102 163) (strings 32 14810 3387) (string-bytes 1 404283) (vectors 16 10746) (vector-slots 8 390642 3931) (floats 8 59 436) (intervals 56 314 4) (buffers 960 15))