Attached is a patch to fix `ruby-toggle-string-quotes' in ruby-mode.el. It was messing up when there were other quotes within the string. I tried to send this via "M-x report-emacs-bug" and "C-c M-i", but that 404s with a Bad Request for Gmail. ============================================= In GNU Emacs 25.0.90.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21 Version 10.9.5 (Build 13F1603)) of 2016-01-30 built on builder10-9.local Windowing system distributor 'Apple', version 10.3.1347 Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp'' Configured features: NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS Important settings: locale-coding-system: utf-8-unix Major mode: Magit Minor modes in effect: yas-global-mode: t yas-minor-mode: t magit-auto-revert-mode: t global-git-commit-mode: t diff-auto-refine-mode: t helm-mode: t shell-dirtrack-mode: t async-bytecomp-package-mode: t autopair-global-mode: t global-hl-line-mode: t my-keys-mode: t recentf-mode: t global-linum-mode: t show-paren-mode: t winner-mode: t tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t buffer-read-only: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent messages: Open /Users/Sri/Desktop/emacs/test/lisp/progmodes/ruby-mode-tests.el Turning on magit-auto-revert-mode...done For information about GNU Emacs and the GNU system, type C-h C-a. C-x g Ran 1 tests, 0 results were as expected, 1 unexpected Mark set ruby-toggle-string-quotes Ran 1 tests, 1 results were as expected user-error: Beginning of history; no preceding item delete-backward-char: Text is read-only [4 times] Load-path shadows: /Users/Sri/.emacs.d/elpa/helm-20160616.217/helm-multi-match hides /Users/Sri/.emacs.d/elpa/helm-core-20160617.307/helm-multi-match Features: (shadow sort mail-extr emacsbug sendmail ruby-end ruby-mode-tests ruby-mode smie ert ewoc debug helm-command helm-elisp helm-eval edebug map yasnippet web-mode disp-table smart-mode-line-dark-theme smart-mode-line rich-minority ob-ruby ob-python ob-calc calc-store calc-trail calc-ext calc calc-loaddefs calc-macs org org-macro org-footnote org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func cal-menu calendar cal-loaddefs magit-blame magit-stash magit-bisect magit-remote magit-commit magit-sequence magit magit-apply magit-wip magit-log magit-diff smerge-mode magit-core magit-autorevert autorevert filenotify magit-process magit-popup magit-mode magit-git crm magit-section magit-utils git-commit log-edit message rfc822 mml mml-sec epg mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev mail-utils gmm-utils mailheader pcvs-util add-log with-editor tramp-sh helm-ls-git vc-git diff-mode vc vc-dispatcher helm-mode helm-files image-dired tramp tramp-compat tramp-loaddefs trampver shell pcomplete format-spec dired-aux helm-buffers helm-elscreen helm-tags helm-bookmark helm-adaptive helm-info bookmark pp helm-locate helm-grep helm-regexp helm-plugin helm-external helm-net browse-url xml helm-utils helm-help helm-types helm easy-mmode helm-source eieio-compat helm-multi-match helm-lib helm-config helm-easymenu edmacro kmacro async-bytecomp async go-mode url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap find-file compile elisp-slime-nav etags xref project coffee-mode rx bm autopair advice dired-x dired view hl-line solarized-dark-theme solarized color recentf tree-widget wid-edit ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff hippie-exp comint ansi-color linum ido seq server paren winner ring whitespace rect ffap thingatpt url-parse auth-source eieio gnus-util mm-util help-fns mail-prsvr password-cache url-vars eval-expr dash cl-seq finder-inf go-mode-autoloads eieio-core cl-macs info package epg-config byte-opt bytecomp byte-compile cl-extra help-mode easymenu cconv cl gv cl-loaddefs pcase cl-lib time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel ns-win ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded 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 kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 540184 37755) (symbols 48 49498 0) (miscs 40 780 649) (strings 32 114429 10253) (string-bytes 1 3438490) (vectors 16 68800) (vector-slots 8 1051173 30787) (floats 8 805 427) (intervals 56 1055 494) (buffers 976 21))