GNU bug report logs - #24901
Patch to add support for curly quotes to electric-pair-mode

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Tue, 8 Nov 2016 12:01:02 UTC

Severity: wishlist

Tags: patch

Done: Reuben Thomas <rrt <at> sc3d.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24901 in the body.
You can then email your comments to 24901 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Tue, 08 Nov 2016 12:01:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Reuben Thomas <rrt <at> sc3d.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 08 Nov 2016 12:01:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Patch to add support for curly quotes to electric-pair-mode
Date: Tue, 08 Nov 2016 12:00:02 +0000
[Message part 1 (text/plain, inline)]
The attached patch adds support for curly quotes to electric-pair-mode.

(I am separately working on a patch for smart-quotes-mode, which is not
part of Emacs.)

If this is considered an acceptable patch, I’d be happy to add support
for other text quote styles (German, French &c.) before installing the
patch.
[0001-Add-support-for-curly-quotation-marks-to-electric-pa.patch (text/x-diff, inline)]
From 634d6fdf40574b7de1eb304f27567bdda201bab1 Mon Sep 17 00:00:00 2001
From: Reuben Thomas <rrt <at> sc3d.org>
Date: Tue, 8 Nov 2016 11:53:20 +0000
Subject: [PATCH] Add support for curly quotation marks to electric-pair-mode

* lisp/elec-pair.el (electric-pair-pairs, electric-pair-text-pairs): add
entries for left/right single/double quotation marks. Note that this is
safe for single quotation marks, unlike with the ASCII apostrophe,
since, although the right quotation mark can be used as an apostrophe,
it is the left quotation mark that is typed to get a pair.
---
 lisp/elec-pair.el | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el
index 1162920..3658601 100644
--- a/lisp/elec-pair.el
+++ b/lisp/elec-pair.el
@@ -28,7 +28,9 @@
 ;;; Electric pairing.
 
 (defcustom electric-pair-pairs
-  '((?\" . ?\"))
+  '((?\" . ?\")
+    (#x201c . #x201d)               ; LEFT/RIGHT SINGLE QUOTATION MARK
+    (#x2018 . #x2019))              ; LEFT/RIGHT DOUBLE QUOTATION MARK
   "Alist of pairs that should be used regardless of major mode.
 
 Pairs of delimiters in this list are a fallback in case they have
@@ -42,7 +44,9 @@ electric-pair-pairs
 
 ;;;###autoload
 (defcustom electric-pair-text-pairs
-  '((?\" . ?\" ))
+  '((?\" . ?\" )
+    (#x201c . #x201d)               ; LEFT/RIGHT SINGLE QUOTATION MARK
+    (#x2018 . #x2019))              ; LEFT/RIGHT DOUBLE QUOTATION MARK
   "Alist of pairs that should always be used in comments and strings.
 
 Pairs of delimiters in this list are a fallback in case they have
-- 
2.7.4

[Message part 3 (text/plain, inline)]



In GNU Emacs 25.1.50.9 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-10-15 built on skwd
Repository revision: 4eb4463abf1db904f9e8cdc35156a66f8a10125c
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:	Ubuntu 16.04.1 LTS

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND DBUS GCONF GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_MONETARY: en_GB.utf8
  value of $LC_NUMERIC: en_GB.utf8
  value of $LC_TIME: en_GB.utf8
  value of $LANG: en_GB.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix

Major mode: Org

Minor modes in effect:
  magit-auto-revert-mode: t
  global-git-commit-mode: t
  TeX-PDF-mode: t
  TeX-source-correlate-mode: t
  window-margin-mode: t
  buffer-face-mode: t
  flyspell-mode: t
  goto-address-mode: t
  smart-quotes-mode: t
  org-indent-mode: t
  show-paren-mode: t
  savehist-mode: t
  recentf-mode: t
  minibuffer-electric-default-mode: t
  global-auto-revert-mode: t
  auto-revert-mode: t
  electric-pair-mode: t
  desktop-save-mode: t
  global-whitespace-mode: t
  diff-auto-refine-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  helm-mode: t
  shell-dirtrack-mode: t
  helm-autoresize-mode: t
  async-bytecomp-package-mode: t
  dtrt-indent-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  column-number-mode: t
  line-number-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent messages:
Loading /home/rrt/.emacs.d/elpa/async-20161103.1036/async.el (source)...done
Package ‘cmake-mode-3.6.2’ deleted.
Package ‘async-20161031.1718’ deleted.
Package menu: Operation finished [Upgraded 2]
user-error: No operations specified
Saving file /home/rrt/Notes/Programming.org...
Wrote /home/rrt/.emacs.d/undo-tree/.!home!rrt!Notes!Programming.org.~undo-tree~
Wrote /home/rrt/Notes/Programming.org
Mark set [2 times]
Mark saved where search started

Load-path shadows:
/home/rrt/.emacs.d/elpa/dash-20161106.410/dash hides /home/rrt/.emacs.d/elpa/dash-20161102.334/dash
/home/rrt/.emacs.d/elpa/dash-20161106.410/dash-autoloads hides /home/rrt/.emacs.d/elpa/dash-20161102.334/dash-autoloads
/home/rrt/.emacs.d/elpa/dash-20161106.410/dash-pkg hides /home/rrt/.emacs.d/elpa/dash-20161102.334/dash-pkg
/home/rrt/.emacs.d/elpa/yaml-mode-0.0.13/yaml-mode hides /home/rrt/.emacs.d/elpa/yaml-mode-0.0.12/yaml-mode
/home/rrt/.emacs.d/elpa/yaml-mode-0.0.13/yaml-mode-autoloads hides /home/rrt/.emacs.d/elpa/yaml-mode-0.0.12/yaml-mode-autoloads
/home/rrt/.emacs.d/elpa/yaml-mode-0.0.13/yaml-mode-pkg hides /home/rrt/.emacs.d/elpa/yaml-mode-0.0.12/yaml-mode-pkg
/home/rrt/.emacs.d/elpa/sws-mode-20150317.1245/sws-mode hides /home/rrt/.emacs.d/el-get/jade-mode/sws-mode
/home/rrt/.emacs.d/elpa/async-20161103.1036/async-pkg hides /home/rrt/.emacs.d/el-get/emacs-async/async-pkg
/home/rrt/.emacs.d/elpa/async-20161103.1036/dired-async hides /home/rrt/.emacs.d/el-get/emacs-async/dired-async
/home/rrt/.emacs.d/elpa/async-20161103.1036/smtpmail-async hides /home/rrt/.emacs.d/el-get/emacs-async/smtpmail-async
/home/rrt/.emacs.d/elpa/async-20161103.1036/async-bytecomp hides /home/rrt/.emacs.d/el-get/emacs-async/async-bytecomp
/home/rrt/.emacs.d/elpa/async-20161103.1036/async hides /home/rrt/.emacs.d/el-get/emacs-async/async
/home/rrt/.emacs.d/elpa/cmake-mode-3.6.3/cmake-mode hides /usr/local/share/emacs/25.1.50/site-lisp/cmake-data/cmake-mode
/home/rrt/.local/share/emacs/site-lisp/whitespace hides /usr/local/share/emacs/25.1.50/lisp/whitespace
/home/rrt/.emacs.d/el-get/cperl-mode/cperl-mode hides /usr/local/share/emacs/25.1.50/lisp/progmodes/cperl-mode
/home/rrt/.emacs.d/elpa/org-20161102/org hides /usr/local/share/emacs/25.1.50/lisp/org/org
/home/rrt/.emacs.d/elpa/org-20161102/org-mouse hides /usr/local/share/emacs/25.1.50/lisp/org/org-mouse
/home/rrt/.emacs.d/elpa/org-20161102/ob-ruby hides /usr/local/share/emacs/25.1.50/lisp/org/ob-ruby
/home/rrt/.emacs.d/elpa/org-20161102/ob-asymptote hides /usr/local/share/emacs/25.1.50/lisp/org/ob-asymptote
/home/rrt/.emacs.d/elpa/org-20161102/ox-man hides /usr/local/share/emacs/25.1.50/lisp/org/ox-man
/home/rrt/.emacs.d/elpa/org-20161102/ob-eval hides /usr/local/share/emacs/25.1.50/lisp/org/ob-eval
/home/rrt/.emacs.d/elpa/org-20161102/org-footnote hides /usr/local/share/emacs/25.1.50/lisp/org/org-footnote
/home/rrt/.emacs.d/elpa/org-20161102/ob-shen hides /usr/local/share/emacs/25.1.50/lisp/org/ob-shen
/home/rrt/.emacs.d/elpa/org-20161102/ob-lisp hides /usr/local/share/emacs/25.1.50/lisp/org/ob-lisp
/home/rrt/.emacs.d/elpa/org-20161102/ob-C hides /usr/local/share/emacs/25.1.50/lisp/org/ob-C
/home/rrt/.emacs.d/elpa/org-20161102/ob-sass hides /usr/local/share/emacs/25.1.50/lisp/org/ob-sass
/home/rrt/.emacs.d/elpa/org-20161102/ob-css hides /usr/local/share/emacs/25.1.50/lisp/org/ob-css
/home/rrt/.emacs.d/elpa/org-20161102/ob-sqlite hides /usr/local/share/emacs/25.1.50/lisp/org/ob-sqlite
/home/rrt/.emacs.d/elpa/org-20161102/org-loaddefs hides /usr/local/share/emacs/25.1.50/lisp/org/org-loaddefs
/home/rrt/.emacs.d/elpa/org-20161102/ob-org hides /usr/local/share/emacs/25.1.50/lisp/org/ob-org
/home/rrt/.emacs.d/elpa/org-20161102/ox-org hides /usr/local/share/emacs/25.1.50/lisp/org/ox-org
/home/rrt/.emacs.d/elpa/org-20161102/ob-ditaa hides /usr/local/share/emacs/25.1.50/lisp/org/ob-ditaa
/home/rrt/.emacs.d/elpa/org-20161102/ob-screen hides /usr/local/share/emacs/25.1.50/lisp/org/ob-screen
/home/rrt/.emacs.d/elpa/org-20161102/ob-io hides /usr/local/share/emacs/25.1.50/lisp/org/ob-io
/home/rrt/.emacs.d/elpa/org-20161102/ob-fortran hides /usr/local/share/emacs/25.1.50/lisp/org/ob-fortran
/home/rrt/.emacs.d/elpa/org-20161102/org-list hides /usr/local/share/emacs/25.1.50/lisp/org/org-list
/home/rrt/.emacs.d/elpa/org-20161102/org-macro hides /usr/local/share/emacs/25.1.50/lisp/org/org-macro
/home/rrt/.emacs.d/elpa/org-20161102/ob-latex hides /usr/local/share/emacs/25.1.50/lisp/org/ob-latex
/home/rrt/.emacs.d/elpa/org-20161102/ox-ascii hides /usr/local/share/emacs/25.1.50/lisp/org/ox-ascii
/home/rrt/.emacs.d/elpa/org-20161102/org-install hides /usr/local/share/emacs/25.1.50/lisp/org/org-install
/home/rrt/.emacs.d/elpa/org-20161102/ob-picolisp hides /usr/local/share/emacs/25.1.50/lisp/org/ob-picolisp
/home/rrt/.emacs.d/elpa/org-20161102/ob-R hides /usr/local/share/emacs/25.1.50/lisp/org/ob-R
/home/rrt/.emacs.d/elpa/org-20161102/ox-latex hides /usr/local/share/emacs/25.1.50/lisp/org/ox-latex
/home/rrt/.emacs.d/elpa/org-20161102/org-eshell hides /usr/local/share/emacs/25.1.50/lisp/org/org-eshell
/home/rrt/.emacs.d/elpa/org-20161102/ox-odt hides /usr/local/share/emacs/25.1.50/lisp/org/ox-odt
/home/rrt/.emacs.d/elpa/org-20161102/ob-keys hides /usr/local/share/emacs/25.1.50/lisp/org/ob-keys
/home/rrt/.emacs.d/elpa/org-20161102/ob-ref hides /usr/local/share/emacs/25.1.50/lisp/org/ob-ref
/home/rrt/.emacs.d/elpa/org-20161102/org-datetree hides /usr/local/share/emacs/25.1.50/lisp/org/org-datetree
/home/rrt/.emacs.d/elpa/org-20161102/ob-exp hides /usr/local/share/emacs/25.1.50/lisp/org/ob-exp
/home/rrt/.emacs.d/elpa/org-20161102/ox-beamer hides /usr/local/share/emacs/25.1.50/lisp/org/ox-beamer
/home/rrt/.emacs.d/elpa/org-20161102/ob-emacs-lisp hides /usr/local/share/emacs/25.1.50/lisp/org/ob-emacs-lisp
/home/rrt/.emacs.d/elpa/org-20161102/ob-matlab hides /usr/local/share/emacs/25.1.50/lisp/org/ob-matlab
/home/rrt/.emacs.d/elpa/org-20161102/ob hides /usr/local/share/emacs/25.1.50/lisp/org/ob
/home/rrt/.emacs.d/elpa/org-20161102/org-indent hides /usr/local/share/emacs/25.1.50/lisp/org/org-indent
/home/rrt/.emacs.d/elpa/org-20161102/ob-perl hides /usr/local/share/emacs/25.1.50/lisp/org/ob-perl
/home/rrt/.emacs.d/elpa/org-20161102/org-habit hides /usr/local/share/emacs/25.1.50/lisp/org/org-habit
/home/rrt/.emacs.d/elpa/org-20161102/org-entities hides /usr/local/share/emacs/25.1.50/lisp/org/org-entities
/home/rrt/.emacs.d/elpa/org-20161102/org-rmail hides /usr/local/share/emacs/25.1.50/lisp/org/org-rmail
/home/rrt/.emacs.d/elpa/org-20161102/ox-md hides /usr/local/share/emacs/25.1.50/lisp/org/ox-md
/home/rrt/.emacs.d/elpa/org-20161102/ob-clojure hides /usr/local/share/emacs/25.1.50/lisp/org/ob-clojure
/home/rrt/.emacs.d/elpa/org-20161102/ob-makefile hides /usr/local/share/emacs/25.1.50/lisp/org/ob-makefile
/home/rrt/.emacs.d/elpa/org-20161102/ob-plantuml hides /usr/local/share/emacs/25.1.50/lisp/org/ob-plantuml
/home/rrt/.emacs.d/elpa/org-20161102/org-table hides /usr/local/share/emacs/25.1.50/lisp/org/org-table
/home/rrt/.emacs.d/elpa/org-20161102/org-mobile hides /usr/local/share/emacs/25.1.50/lisp/org/org-mobile
/home/rrt/.emacs.d/elpa/org-20161102/org-mhe hides /usr/local/share/emacs/25.1.50/lisp/org/org-mhe
/home/rrt/.emacs.d/elpa/org-20161102/ob-lob hides /usr/local/share/emacs/25.1.50/lisp/org/ob-lob
/home/rrt/.emacs.d/elpa/org-20161102/org-capture hides /usr/local/share/emacs/25.1.50/lisp/org/org-capture
/home/rrt/.emacs.d/elpa/org-20161102/org-version hides /usr/local/share/emacs/25.1.50/lisp/org/org-version
/home/rrt/.emacs.d/elpa/org-20161102/ob-core hides /usr/local/share/emacs/25.1.50/lisp/org/ob-core
/home/rrt/.emacs.d/elpa/org-20161102/ob-table hides /usr/local/share/emacs/25.1.50/lisp/org/ob-table
/home/rrt/.emacs.d/elpa/org-20161102/org-faces hides /usr/local/share/emacs/25.1.50/lisp/org/org-faces
/home/rrt/.emacs.d/elpa/org-20161102/org-compat hides /usr/local/share/emacs/25.1.50/lisp/org/org-compat
/home/rrt/.emacs.d/elpa/org-20161102/ox-publish hides /usr/local/share/emacs/25.1.50/lisp/org/ox-publish
/home/rrt/.emacs.d/elpa/org-20161102/org-agenda hides /usr/local/share/emacs/25.1.50/lisp/org/org-agenda
/home/rrt/.emacs.d/elpa/org-20161102/ob-maxima hides /usr/local/share/emacs/25.1.50/lisp/org/ob-maxima
/home/rrt/.emacs.d/elpa/org-20161102/ob-dot hides /usr/local/share/emacs/25.1.50/lisp/org/ob-dot
/home/rrt/.emacs.d/elpa/org-20161102/ob-python hides /usr/local/share/emacs/25.1.50/lisp/org/ob-python
/home/rrt/.emacs.d/elpa/org-20161102/org-crypt hides /usr/local/share/emacs/25.1.50/lisp/org/org-crypt
/home/rrt/.emacs.d/elpa/org-20161102/org-protocol hides /usr/local/share/emacs/25.1.50/lisp/org/org-protocol
/home/rrt/.emacs.d/elpa/org-20161102/ob-scheme hides /usr/local/share/emacs/25.1.50/lisp/org/ob-scheme
/home/rrt/.emacs.d/elpa/org-20161102/ob-awk hides /usr/local/share/emacs/25.1.50/lisp/org/ob-awk
/home/rrt/.emacs.d/elpa/org-20161102/org-w3m hides /usr/local/share/emacs/25.1.50/lisp/org/org-w3m
/home/rrt/.emacs.d/elpa/org-20161102/org-bbdb hides /usr/local/share/emacs/25.1.50/lisp/org/org-bbdb
/home/rrt/.emacs.d/elpa/org-20161102/ox-html hides /usr/local/share/emacs/25.1.50/lisp/org/ox-html
/home/rrt/.emacs.d/elpa/org-20161102/org-gnus hides /usr/local/share/emacs/25.1.50/lisp/org/org-gnus
/home/rrt/.emacs.d/elpa/org-20161102/ob-js hides /usr/local/share/emacs/25.1.50/lisp/org/ob-js
/home/rrt/.emacs.d/elpa/org-20161102/ob-mscgen hides /usr/local/share/emacs/25.1.50/lisp/org/ob-mscgen
/home/rrt/.emacs.d/elpa/org-20161102/ob-ocaml hides /usr/local/share/emacs/25.1.50/lisp/org/ob-ocaml
/home/rrt/.emacs.d/elpa/org-20161102/ox-icalendar hides /usr/local/share/emacs/25.1.50/lisp/org/ox-icalendar
/home/rrt/.emacs.d/elpa/org-20161102/ob-gnuplot hides /usr/local/share/emacs/25.1.50/lisp/org/ob-gnuplot
/home/rrt/.emacs.d/elpa/org-20161102/org-irc hides /usr/local/share/emacs/25.1.50/lisp/org/org-irc
/home/rrt/.emacs.d/elpa/org-20161102/ob-haskell hides /usr/local/share/emacs/25.1.50/lisp/org/ob-haskell
/home/rrt/.emacs.d/elpa/org-20161102/org-docview hides /usr/local/share/emacs/25.1.50/lisp/org/org-docview
/home/rrt/.emacs.d/elpa/org-20161102/org-clock hides /usr/local/share/emacs/25.1.50/lisp/org/org-clock
/home/rrt/.emacs.d/elpa/org-20161102/ob-lilypond hides /usr/local/share/emacs/25.1.50/lisp/org/ob-lilypond
/home/rrt/.emacs.d/elpa/org-20161102/org-ctags hides /usr/local/share/emacs/25.1.50/lisp/org/org-ctags
/home/rrt/.emacs.d/elpa/org-20161102/ox hides /usr/local/share/emacs/25.1.50/lisp/org/ox
/home/rrt/.emacs.d/elpa/org-20161102/org-bibtex hides /usr/local/share/emacs/25.1.50/lisp/org/org-bibtex
/home/rrt/.emacs.d/elpa/org-20161102/org-element hides /usr/local/share/emacs/25.1.50/lisp/org/org-element
/home/rrt/.emacs.d/elpa/org-20161102/org-id hides /usr/local/share/emacs/25.1.50/lisp/org/org-id
/home/rrt/.emacs.d/elpa/org-20161102/org-archive hides /usr/local/share/emacs/25.1.50/lisp/org/org-archive
/home/rrt/.emacs.d/elpa/org-20161102/ob-octave hides /usr/local/share/emacs/25.1.50/lisp/org/ob-octave
/home/rrt/.emacs.d/elpa/org-20161102/ob-calc hides /usr/local/share/emacs/25.1.50/lisp/org/ob-calc
/home/rrt/.emacs.d/elpa/org-20161102/org-attach hides /usr/local/share/emacs/25.1.50/lisp/org/org-attach
/home/rrt/.emacs.d/elpa/org-20161102/org-src hides /usr/local/share/emacs/25.1.50/lisp/org/org-src
/home/rrt/.emacs.d/elpa/org-20161102/ob-comint hides /usr/local/share/emacs/25.1.50/lisp/org/ob-comint
/home/rrt/.emacs.d/elpa/org-20161102/ob-ledger hides /usr/local/share/emacs/25.1.50/lisp/org/ob-ledger
/home/rrt/.emacs.d/elpa/org-20161102/org-plot hides /usr/local/share/emacs/25.1.50/lisp/org/org-plot
/home/rrt/.emacs.d/elpa/org-20161102/ob-tangle hides /usr/local/share/emacs/25.1.50/lisp/org/ob-tangle
/home/rrt/.emacs.d/elpa/org-20161102/org-info hides /usr/local/share/emacs/25.1.50/lisp/org/org-info
/home/rrt/.emacs.d/elpa/org-20161102/org-macs hides /usr/local/share/emacs/25.1.50/lisp/org/org-macs
/home/rrt/.emacs.d/elpa/org-20161102/org-pcomplete hides /usr/local/share/emacs/25.1.50/lisp/org/org-pcomplete
/home/rrt/.emacs.d/elpa/org-20161102/ob-scala hides /usr/local/share/emacs/25.1.50/lisp/org/ob-scala
/home/rrt/.emacs.d/elpa/org-20161102/ob-sql hides /usr/local/share/emacs/25.1.50/lisp/org/ob-sql
/home/rrt/.emacs.d/elpa/org-20161102/org-timer hides /usr/local/share/emacs/25.1.50/lisp/org/org-timer
/home/rrt/.emacs.d/elpa/org-20161102/org-inlinetask hides /usr/local/share/emacs/25.1.50/lisp/org/org-inlinetask
/home/rrt/.emacs.d/elpa/org-20161102/ob-java hides /usr/local/share/emacs/25.1.50/lisp/org/ob-java
/home/rrt/.emacs.d/elpa/org-20161102/org-feed hides /usr/local/share/emacs/25.1.50/lisp/org/org-feed
/home/rrt/.emacs.d/elpa/org-20161102/org-colview hides /usr/local/share/emacs/25.1.50/lisp/org/org-colview
/home/rrt/.emacs.d/elpa/org-20161102/ox-texinfo hides /usr/local/share/emacs/25.1.50/lisp/org/ox-texinfo

Features:
(shadow sort emacsbug tar-mode cc-mode cc-fonts cc-guess cc-menus
cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs geiser-mode
geiser-xref geiser-compile geiser-debug geiser-chicken geiser-racket
geiser-guile geiser geiser-repl geiser-image geiser-company geiser-doc
geiser-menu geiser-edit geiser-completion geiser-autodoc geiser-eval
geiser-connection tq geiser-syntax geiser-log geiser-popup view
geiser-impl geiser-custom geiser-base quack cmuscheme scheme git-rebase
find-dired ido tcl linum 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
magit-process magit-popup magit-mode magit-git magit-section magit-utils
git-commit log-edit pcvs-util with-editor warnings term disp-table ehelp
esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups
eshell esh-module esh-mode esh-util dash make-mode debug mail-extr rect
mm-archive message sendmail rfc822 mml mml-sec mailabbrev gmm-utils
mailheader mm-decode mm-bodies mm-encode url-handlers mail-utils
network-stream nsm starttls url-http tls gnutls mail-parse rfc2231
url-gw url-cache url-auth epg ibuf-ext ibuffer grep image-file eieio-opt
tex-buf latex tex-ispell tex-style tex-info tex dbus crm texinfo
css-mode imenu debian-bug rfc2047 rfc2045 ietf-drums
debian-changelog-mode add-log debian-control-mode conf-mode nxml-uchnm
rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid nxml-mode nxml-outln
nxml-rap nxml-glyph cperl-mode cus-edit misearch multi-isearch winner
helm-command helm-elisp helm-eval edebug sh-script smie executable
sgml-mode adaptive-wrap markdown-mode vc-dispatcher vc-bzr python json
map window-margin face-remap flyspell ispell goto-addr smart-quotes
org-indent org-rmail org-mhe org-irc org-info org-gnus org-docview
doc-view subr-x jka-compr image-mode org-bibtex bibtex org-bbdb org-w3m
flymake paredit server ox-odt rng-loc rng-uri rng-parse rng-match rng-dt
rng-util rng-pttrn nxml-parse nxml-ns nxml-enc xmltok nxml-util ox-latex
ox-icalendar ox-html table ox-ascii ox-publish ox tramp-cache tramp-sh
yasnippet paren savehist recentf tree-widget wid-edit minibuf-eldef
autorevert filenotify elec-pair desktop frameset cus-start cus-load
iimage org-element avl-tree org org-macro org-footnote org-pcomplete
org-list org-faces org-entities noutline outline org-version
ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob ob-table ob-keys ob-exp
ob-comint ob-core ob-eval org-compat org-macs org-loaddefs find-func
cal-menu calendar cal-loaddefs go-mode find-file forth-mode etags xref
project info-look speedbar sb-image ezimage dframe whitespace
bug-reference-github bug-reference vc-git diff-mode undo-tree diff
helm-fuzzier helm-mode helm-files rx image-dired tramp tramp-compat
tramp-loaddefs trampver ucs-normalize shell pcomplete format-spec
dired-x dired-aux ffap thingatpt helm-buffers helm-elscreen helm-tags
helm-bookmark helm-adaptive helm-info bookmark helm-locate helm-grep
helm-regexp helm-external helm-net browse-url xml url url-proxy
url-privacy url-expand url-methods url-history url-cookie url-domsuf
url-util url-parse auth-source gnus-util mm-util help-fns mail-prsvr
password-cache url-vars mailcap helm-utils helm-help helm-types helm
derived helm-source eieio-compat helm-multi-match helm-lib helm-config
helm-easymenu async-bytecomp async locate finder-inf tex-site
go-mode-autoloads info edmacro kmacro windows revive init-paredit
dtrt-indent csv init-eldoc eldoc-extension advice compile comint
ansi-color ring easy-mmode .loaddefs eieio eieio-core cl-macs el-get
el-get-autoloading el-get-list-packages el-get-dependencies el-get-build
el-get-status pp el-get-methods el-get-fossil el-get-svn el-get-pacman
el-get-github-zip el-get-github-tar el-get-http-zip el-get-http-tar
el-get-hg el-get-go el-get-git-svn el-get-fink el-get-emacswiki
el-get-http el-get-notify el-get-emacsmirror el-get-github el-get-git
el-get-elpa package epg-config seq byte-opt el-get-darcs el-get-cvs
el-get-bzr el-get-brew el-get-builtin el-get-apt-get el-get-recipes
el-get-byte-compile el-get-custom cl-seq el-get-core autoload lisp-mnt
bytecomp byte-compile cl-extra help-mode easymenu cconv cl gv
cl-loaddefs pcase cl-lib dired debian-el debian-el-loaddefs org-install
dpkg-dev-el dpkg-dev-el-loaddefs devhelp user-site-loaddefs time-date
mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win term/common-win x-dnd 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 dbusbind inotify dynamic-setting
system-font-setting font-render-setting move-toolbar gtk x-toolkit x
multi-tty make-network-process emacs)

Memory information:
((conses 16 1956381 334151)
 (symbols 48 69739 0)
 (miscs 40 2682 2920)
 (strings 32 330663 59534)
 (string-bytes 1 11356699)
 (vectors 16 110223)
 (vector-slots 8 2416485 101906)
 (floats 8 848 1188)
 (intervals 56 125662 1627)
 (buffers 976 176)
 (heap 1024 138492 299965))

-- 
http://rrt.sc3d.org/

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Tue, 08 Nov 2016 17:09:01 GMT) Full text and rfc822 format available.

Message #8 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: 24901 <at> debbugs.gnu.org
Subject: Re: bug#24901: Acknowledgement (Patch to add support for curly quotes
 to electric-pair-mode)
Date: Tue, 8 Nov 2016 17:08:25 +0000
[Message part 1 (text/plain, inline)]
I have now fixed smart-quotes.el to take advantage of curly quote pairing
in electric-pair-mode. The fixed version is at
https://github.com/rrthomas/smart-quotes , and has a pull request awaiting
upstream's attention!

-- 
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Tue, 08 Nov 2016 17:53:01 GMT) Full text and rfc822 format available.

Message #11 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: 24901 <at> debbugs.gnu.org
Subject: Patch updated slightly
Date: Tue, 8 Nov 2016 17:52:50 +0000
[Message part 1 (text/plain, inline)]
I updated the patch to fix a typo (first character of sentence not in upper
case), and to add the bug number.

-- 
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]
[0001-Add-support-for-curly-quotation-marks-to-electric-pa.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Mon, 28 Nov 2016 22:25:01 GMT) Full text and rfc822 format available.

Message #14 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: 24901 <at> debbugs.gnu.org
Subject: Re: Patch updated slightly
Date: Mon, 28 Nov 2016 22:24:39 +0000
[Message part 1 (text/plain, inline)]
On 8 November 2016 at 17:52, Reuben Thomas <rrt <at> sc3d.org> wrote:

> I updated the patch to fix a typo (first character of sentence not in
> upper case), and to add the bug number.
>

​I updated the patch to use the quote characters from electric-quote-chars.

-- 
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]
[0001-Add-support-for-curly-quotation-marks-to-electric-pa.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Fri, 02 Dec 2016 09:46:02 GMT) Full text and rfc822 format available.

Message #17 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 24901 <at> debbugs.gnu.org
Subject: Re: bug#24901: Patch updated slightly
Date: Fri, 02 Dec 2016 11:45:12 +0200
> From: Reuben Thomas <rrt <at> sc3d.org>
> Date: Mon, 28 Nov 2016 22:24:39 +0000
> 
> From 4a04639203dca2d5903fd943e5fb2e4ccc7b995f Mon Sep 17 00:00:00 2001
> From: Reuben Thomas <rrt <at> sc3d.org>
> Date: Tue, 8 Nov 2016 11:53:20 +0000
> Subject: [PATCH 1/4] Add support for curly quotation marks to
>  electric-pair-mode
> 
> * lisp/elec-pair.el (electric-pair-pairs, electric-pair-text-pairs): Add
> entries for left/right single/double quotation marks, from
> electric-quote-chars. Note that this is safe for single quotation marks,
> unlike with the ASCII apostrophe, since, although the right quotation
> mark can be used as an apostrophe, it is the left quotation mark that is
> typed to get a pair (Bug#24901).

Can you tell more about this?  The original bug report doesn't include
any rationale, so it's hard for me to make up my mind about this
change.

In particular, I don't understand the last sentence of the log
message; can you elaborate?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Fri, 02 Dec 2016 14:43:02 GMT) Full text and rfc822 format available.

Message #20 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24901 <at> debbugs.gnu.org
Subject: Re: bug#24901: Patch updated slightly
Date: Fri, 2 Dec 2016 14:42:24 +0000
[Message part 1 (text/plain, inline)]
On 2 December 2016 at 09:45, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Reuben Thomas <rrt <at> sc3d.org>
> > Date: Mon, 28 Nov 2016 22:24:39 +0000
> >
> > From 4a04639203dca2d5903fd943e5fb2e4ccc7b995f Mon Sep 17 00:00:00 2001
> > From: Reuben Thomas <rrt <at> sc3d.org>
> > Date: Tue, 8 Nov 2016 11:53:20 +0000
> > Subject: [PATCH 1/4] Add support for curly quotation marks to
> >  electric-pair-mode
> >
> > * lisp/elec-pair.el (electric-pair-pairs, electric-pair-text-pairs): Add
> > entries for left/right single/double quotation marks, from
> > electric-quote-chars. Note that this is safe for single quotation marks,
> > unlike with the ASCII apostrophe, since, although the right quotation
> > mark can be used as an apostrophe, it is the left quotation mark that is
> > typed to get a pair (Bug#24901).
>
> Can you tell more about this?  The original bug report doesn't include
> any rationale, so it's hard for me to make up my mind about this
> change.
>

​Rationale: electric-pair-mode already has support for straight
double-quote pairs, so it is logical to add support for curly double-quote
pairs. As with straight double quotes, it's logical that these be supported
everywhere. The same goes for straight single quotes, which are generally
used for the same purpose as curly double and single double quotes, that
is, quoting (in human language).

The use of electric-quote-chars means that electric-pair-mode will
automatically use whatever the user has configured for single and double
quotes.

In particular, I don't understand the last sentence of the log
> message; can you elaborate?
>

​electric-pair-mode does not by default produce pairs of straight single
quote (apostrophe). This is because it does not always make sense: a single
apostrophe is often used on its own. However, with curly single quotes, it
makes sense for electric-pair-mode to make typing a left curly quote
automatically add a corresponding right quote, as left curly quotes are not
normally used on their own. (Right single curly quotes can be used on their
own, as an apostrophe, but this is irrelevant here, as electric-pair-mode
acts when the left-hand mark is typed, not the right-hand mark).

-- 
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Fri, 02 Dec 2016 15:27:01 GMT) Full text and rfc822 format available.

Message #23 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 24901 <at> debbugs.gnu.org
Subject: Re: bug#24901: Patch updated slightly
Date: Fri, 02 Dec 2016 17:26:01 +0200
> From: Reuben Thomas <rrt <at> sc3d.org>
> Date: Fri, 2 Dec 2016 14:42:24 +0000
> Cc: 24901 <at> debbugs.gnu.org
> 
> ​Rationale: electric-pair-mode already has support for straight double-quote pairs, so it is logical to add
> support for curly double-quote pairs. As with straight double quotes, it's logical that these be supported
> everywhere. The same goes for straight single quotes, which are generally used for the same purpose as
> curly double and single double quotes, that is, quoting (in human language).
> 
> The use of electric-quote-chars means that electric-pair-mode will automatically use whatever the user has
> configured for single and double quotes.

I see, thanks.  Is it certain that users won't want straight quotes,
but not the curly ones?  E.g., in some programming mode, perhaps?

>  In particular, I don't understand the last sentence of the log
>  message; can you elaborate?
> 
> ​electric-pair-mode does not by default produce pairs of straight single quote (apostrophe). This is because it
> does not always make sense: a single apostrophe is often used on its own. However, with curly single
> quotes, it makes sense for electric-pair-mode to make typing a left curly quote automatically add a
> corresponding right quote, as left curly quotes are not normally used on their own. (Right single curly quotes
> can be used on their own, as an apostrophe, but this is irrelevant here, as electric-pair-mode acts when the
> left-hand mark is typed, not the right-hand mark).

So electric-pair-mode is incompatible with RTL scripts.  Too bad.

Thanks for the explanations.  If it's certain that no one will want
only straight quotes (see above), I'm okay with this change.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Fri, 02 Dec 2016 15:42:01 GMT) Full text and rfc822 format available.

Message #26 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24901 <at> debbugs.gnu.org
Subject: Re: bug#24901: Patch updated slightly
Date: Fri, 2 Dec 2016 15:40:58 +0000
[Message part 1 (text/plain, inline)]
On 2 December 2016 at 15:26, Eli Zaretskii <eliz <at> gnu.org> wrote:

>
> I see, thanks.  Is it certain that users won't want straight quotes,
> but not the curly ones?  E.g., in some programming mode, perhaps?
>

​I don't think this is a problem, because in that case, the user won't type
curly quotes. If the left curly quote (single or double) were widely used
on its own in a programming language, that would be a problem, but I don't
think it is.

The reason I added the curly quotes to electric-pair-pairs as well as
electric-pair-text-pairs is because the latter is only used in comments,
and so would not be available in text-mode, where curly quotes are useful.


> So electric-pair-mode is incompatible with RTL scripts.  Too bad.
>

It seems to work for me: if I select a Hebrew keyboard layout, type some
Hebrew letters, and then use double straight quotes, I get the expected
result. If I use curly quotes, I get a different result, but perhaps that
it because it implicitly changes the writing direction? I didn't get as far
as trying to configure electric-pair-mode to understand Hebrew quotation
marks.

I guess I should have said "open" and "close" rather than "left" and
"right".

If you're happy with my argument above about programming languages, I'll
install the change.

-- 
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Fri, 02 Dec 2016 15:56:02 GMT) Full text and rfc822 format available.

Message #29 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 24901 <at> debbugs.gnu.org
Subject: Re: bug#24901: Patch updated slightly
Date: Fri, 02 Dec 2016 17:55:21 +0200
> From: Reuben Thomas <rrt <at> sc3d.org>
> Date: Fri, 2 Dec 2016 15:40:58 +0000
> Cc: 24901 <at> debbugs.gnu.org
> 
> On 2 December 2016 at 15:26, Eli Zaretskii <eliz <at> gnu.org> wrote:
> 
>  So electric-pair-mode is incompatible with RTL scripts. Too bad.
> 
> It seems to work for me: if I select a Hebrew keyboard layout, type some Hebrew letters, and then use double
> straight quotes, I get the expected result. If I use curly quotes, I get a different result, but perhaps that it
> because it implicitly changes the writing direction? I didn't get as far as trying to configure electric-pair-mode to
> understand Hebrew quotation marks. 

The problem I was thinking about is that in RTL script you would type
the right quote first, to serve as the opening quote.  That's because
the quotes are not mirrored by the bidirectional reordering for
display, like parentheses are.

> I guess I should have said "open" and "close" rather than "left" and "right".

But the mode does really react to the left quote and not the open
quote.  Right?

> If you're happy with my argument above about programming languages, I'll install the change.

Please do, and thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Fri, 02 Dec 2016 16:06:02 GMT) Full text and rfc822 format available.

Message #32 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: rrt <at> sc3d.org
Cc: 24901 <at> debbugs.gnu.org
Subject: Re: bug#24901: Patch updated slightly
Date: Fri, 02 Dec 2016 18:04:43 +0200
> Date: Fri, 02 Dec 2016 17:55:21 +0200
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: 24901 <at> debbugs.gnu.org
> 
> The problem I was thinking about is that in RTL script you would type
> the right quote first, to serve as the opening quote.  That's because
> the quotes are not mirrored by the bidirectional reordering for
> display, like parentheses are.

To be perfectly accurate: some of them are mirrored (e.g., u+00ab and
u+00bb).  But not the ones we were talking about.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Fri, 02 Dec 2016 16:10:01 GMT) Full text and rfc822 format available.

Message #35 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24901 <at> debbugs.gnu.org
Subject: Re: bug#24901: Patch updated slightly
Date: Fri, 2 Dec 2016 16:09:49 +0000
[Message part 1 (text/plain, inline)]
On 2 December 2016 at 15:55, Eli Zaretskii <eliz <at> gnu.org> wrote:

> > From: Reuben Thomas <rrt <at> sc3d.org>
> > Date: Fri, 2 Dec 2016 15:40:58 +0000
> > Cc: 24901 <at> debbugs.gnu.org
> >
> > On 2 December 2016 at 15:26, Eli Zaretskii <eliz <at> gnu.org> wrote:
> >
> >  So electric-pair-mode is incompatible with RTL scripts. Too bad.
> >
> > It seems to work for me: if I select a Hebrew keyboard layout, type some
> Hebrew letters, and then use double
> > straight quotes, I get the expected result. If I use curly quotes, I get
> a different result, but perhaps that it
> > because it implicitly changes the writing direction? I didn't get as far
> as trying to configure electric-pair-mode to
> > understand Hebrew quotation marks.
>
> The problem I was thinking about is that in RTL script you would type
> the right quote first, to serve as the opening quote.  That's because
> the quotes are not mirrored by the bidirectional reordering for
> display, like parentheses are.
>

So, if you expect to be able to use the same quote characters without
reconfiguration according to language, then it won't work. Otherwise, you
can simply configure the quotes the other way around, and it should work
(and change the documentation of electric-quote-pairs to mention "open" and
"close" rather than "left" and "right"). But I guess this is a solved
design problem that simply needs integrating into electric-pair-mode…

Change installed.

-- 
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]

Reply sent to Reuben Thomas <rrt <at> sc3d.org>:
You have taken responsibility. (Sat, 03 Dec 2016 00:21:02 GMT) Full text and rfc822 format available.

Notification sent to Reuben Thomas <rrt <at> sc3d.org>:
bug acknowledged by developer. (Sat, 03 Dec 2016 00:21:02 GMT) Full text and rfc822 format available.

Message #40 received at 24901-done <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: 24901-done <at> debbugs.gnu.org
Date: Sat, 3 Dec 2016 00:20:04 +0000
[Message part 1 (text/plain, inline)]

[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 31 Dec 2016 12:24:05 GMT) Full text and rfc822 format available.

bug unarchived. Request was from João Távora <joaotavora <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 13 Aug 2017 11:02:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Sun, 13 Aug 2017 11:04:02 GMT) Full text and rfc822 format available.

Message #47 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: 24901 <at> debbugs.gnu.org
Subject: Fwd: Caught mistake in elec-pair.el patch
Date: Sun, 13 Aug 2017 12:03:01 +0100
[Message part 1 (text/plain, inline)]
After unarchiving this bug just to add this commnet.

---------- Forwarded message ----------
From: João Távora <joaotavora <at> gmail.com>
Date: Sun, Aug 13, 2017 at 11:57 AM
Subject: Caught mistake in elec-pair.el patch
To: 24901 <at> debbugs.gnu.org, rrt <at> sc3d.org, Eli Zaretskii <eliz <at> gnu.org>


Hi Reuben,

Casually glancing at the source for lisp/elec-pair.el I have found an
error.

You cannot use lists like (nth 0 electric-quote-chars) inside a quoted list
as
you did in your patch of Nov. 8 2016. The list will not be evaluated.
Perhaps
you were distracted by the grim events taking place that day :-)

Anyway, I think you meant backquote-and-comma so I'll install this fix soon,
unless anyone objects.

João


diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el
index 87e82e2..4ede4f1 100644
--- a/lisp/elec-pair.el
+++ b/lisp/elec-pair.el
@@ -28,9 +28,9 @@
 ;;; Electric pairing.

 (defcustom electric-pair-pairs
-  '((?\" . ?\")
-    ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars))
-    ((nth 2 electric-quote-chars) . (nth 3 electric-quote-chars)))
+  `((?\" . ?\")
+    (,(nth 0 electric-quote-chars) . ,(nth 1 electric-quote-chars))
+    (,(nth 2 electric-quote-chars) . ,(nth 3 electric-quote-chars)))
   "Alist of pairs that should be used regardless of major mode.

 Pairs of delimiters in this list are a fallback in case they have
@@ -44,9 +44,9 @@ electric-pair-pairs

 ;;;###autoload
 (defcustom electric-pair-text-pairs
-  '((?\" . ?\" )
-    ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars))
-    ((nth 2 electric-quote-chars) . (nth 3 electric-quote-chars)))
+  `((?\" . ?\" )
+    (,(nth 0 electric-quote-chars) . ,(nth 1 electric-quote-chars))
+    (,(nth 2 electric-quote-chars) . ,(nth 3 electric-quote-chars)))
   "Alist of pairs that should always be used in comments and strings.

 Pairs of delimiters in this list are a fallback in case they have




-- 
João Távora
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Thu, 17 Aug 2017 10:33:02 GMT) Full text and rfc822 format available.

Message #50 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Reuben Thomas <rrt <at> sc3d.org>
Cc: 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: Caught mistake in elec-pair.el patch
Date: Thu, 17 Aug 2017 11:32:10 +0100
[Message part 1 (text/plain, inline)]
Turns out it's not so simple, because electric-pair-text-pairs is autoloaded
and thus relying on electric-quote-chars is a problem.

Loading loaddefs.el (source)...
Symbol's value as variable is void: electric-quote-chars
Makefile:535: recipe for target 'emacs' failed

I could:

1. Add an autoload to electric-quote-chars. (Unfortunately I seem to fail
at that,
just adding the cookie isn't enough, it has to go into ldefs-boot.el
somehow).

2. Replace those (nth...) expressions with the actual quote characters.
It's no
more disconnected from a possible customized value in electric-quote-chars
than it is now.

3. Rework elec-pair.el so that lisp expressions are accepted in
electric-pair-text-pairs
and evaluated just-in-time.

Anyway, It's been more than 1 year since my last contribution to Emacs, and
I shouldn't make this decision alone. Eli, could you please weigh in or
point me
to someone who can? Emacs-devel?

Thanks,
João


On Sun, Aug 13, 2017 at 11:59 AM, Reuben Thomas <rrt <at> sc3d.org> wrote:

> Thanks very much, I fear that was just ineptitude on my part.
>
> --
> https://rrt.sc3d.org
>
> On 13 Aug 2017 11:57 am, "João Távora" <joaotavora <at> gmail.com> wrote:
>
>> Hi Reuben,
>>
>> Casually glancing at the source for lisp/elec-pair.el I have found an
>> error.
>>
>> You cannot use lists like (nth 0 electric-quote-chars) inside a quoted
>> list as
>> you did in your patch of Nov. 8 2016. The list will not be evaluated.
>> Perhaps
>> you were distracted by the grim events taking place that day :-)
>>
>> Anyway, I think you meant backquote-and-comma so I'll install this fix
>> soon,
>> unless anyone objects.
>>
>> João
>>
>>
>> diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el
>> index 87e82e2..4ede4f1 100644
>> --- a/lisp/elec-pair.el
>> +++ b/lisp/elec-pair.el
>> @@ -28,9 +28,9 @@
>>  ;;; Electric pairing.
>>
>>  (defcustom electric-pair-pairs
>> -  '((?\" . ?\")
>> -    ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars))
>> -    ((nth 2 electric-quote-chars) . (nth 3 electric-quote-chars)))
>> +  `((?\" . ?\")
>> +    (,(nth 0 electric-quote-chars) . ,(nth 1 electric-quote-chars))
>> +    (,(nth 2 electric-quote-chars) . ,(nth 3 electric-quote-chars)))
>>    "Alist of pairs that should be used regardless of major mode.
>>
>>  Pairs of delimiters in this list are a fallback in case they have
>> @@ -44,9 +44,9 @@ electric-pair-pairs
>>
>>  ;;;###autoload
>>  (defcustom electric-pair-text-pairs
>> -  '((?\" . ?\" )
>> -    ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars))
>> -    ((nth 2 electric-quote-chars) . (nth 3 electric-quote-chars)))
>> +  `((?\" . ?\" )
>> +    (,(nth 0 electric-quote-chars) . ,(nth 1 electric-quote-chars))
>> +    (,(nth 2 electric-quote-chars) . ,(nth 3 electric-quote-chars)))
>>    "Alist of pairs that should always be used in comments and strings.
>>
>>  Pairs of delimiters in this list are a fallback in case they have
>>
>>
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Thu, 17 Aug 2017 12:35:02 GMT) Full text and rfc822 format available.

Message #53 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: João Távora <joaotavora <at> gmail.com>
Cc: 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Reuben Thomas <rrt <at> sc3d.org>
Subject: Re: bug#24901: Caught mistake in elec-pair.el patch
Date: Thu, 17 Aug 2017 08:35:39 -0400
[Message part 1 (text/plain, inline)]
João Távora <joaotavora <at> gmail.com> writes:

> Turns out it's not so simple, because electric-pair-text-pairs is autoloaded
> and thus relying on electric-quote-chars is a problem.
>
> Loading loaddefs.el (source)...
> Symbol's value as variable is void: electric-quote-chars
> Makefile:535: recipe for target 'emacs' failed
>
> I could:
>
> 1. Add an autoload to electric-quote-chars. (Unfortunately I seem to fail at that,
> just adding the cookie isn't enough, it has to go into ldefs-boot.el somehow).

Or remove the autoload from electric-pair-text-pairs?

[0001-lisp-elec-pair.el-electric-pair-text-pairs-Don-t-aut.patch (text/x-diff, inline)]
From 57a68d001c0851ce10b1b8be47bc8db12b7789f1 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Thu, 17 Aug 2017 07:06:47 -0400
Subject: [PATCH] * lisp/elec-pair.el (electric-pair-text-pairs): Don't
 autoload (Bug#24901).

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Require `elec-pair'
explicitly in the interactive case.
---
 lisp/elec-pair.el            | 1 -
 lisp/progmodes/elisp-mode.el | 9 ++++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el
index 87e82e24fb..f990851185 100644
--- a/lisp/elec-pair.el
+++ b/lisp/elec-pair.el
@@ -42,7 +42,6 @@ electric-pair-pairs
   :group 'electricity
   :type '(repeat (cons character character)))
 
-;;;###autoload
 (defcustom electric-pair-text-pairs
   '((?\" . ?\" )
     ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars))
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 47739f5957..0bf8857960 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -231,9 +231,12 @@ emacs-lisp-mode
   (defvar project-vc-external-roots-function)
   (lisp-mode-variables nil nil 'elisp)
   (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers)
-  (setq-local electric-pair-text-pairs
-              (append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs))
-  (setq-local electric-quote-string t)
+  (unless noninteractive
+    (require 'elec-pair)
+    (defvar electric-pair-text-pairs)
+    (setq-local electric-pair-text-pairs
+                (append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs))
+    (setq-local electric-quote-string t))
   (setq imenu-case-fold-search nil)
   (add-function :before-until (local 'eldoc-documentation-function)
                 #'elisp-eldoc-documentation-function)
-- 
2.14.1


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Thu, 17 Aug 2017 13:33:02 GMT) Full text and rfc822 format available.

Message #56 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: npostavs <at> users.sourceforge.net
Cc: 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Reuben Thomas <rrt <at> sc3d.org>
Subject: Re: bug#24901: Caught mistake in elec-pair.el patch
Date: Thu, 17 Aug 2017 14:32:08 +0100
[Message part 1 (text/plain, inline)]
On Thu, Aug 17, 2017 at 1:35 PM, <npostavs <at> users.sourceforge.net> wrote:

> Or remove the autoload from electric-pair-text-pairs?

Seems to be there for a reason, unfortunately. It's forward
referenced in electric.el if I'm not mistaken.

J


--
João Távora
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Thu, 17 Aug 2017 14:06:02 GMT) Full text and rfc822 format available.

Message #59 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: João Távora <joaotavora <at> gmail.com>
Cc: 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Reuben Thomas <rrt <at> sc3d.org>
Subject: Re: bug#24901: Caught mistake in elec-pair.el patch
Date: Thu, 17 Aug 2017 10:05:49 -0400
On Thu, Aug 17, 2017 at 9:32 AM, João Távora <joaotavora <at> gmail.com> wrote:
> On Thu, Aug 17, 2017 at 1:35 PM, <npostavs <at> users.sourceforge.net> wrote:
>
>> Or remove the autoload from electric-pair-text-pairs?
>
> Seems to be there for a reason, unfortunately. It's forward
> referenced in electric.el if I'm not mistaken.

The reference in electric.el is inside (and electric-pair-mode ...)
which is already autoloaded so it should be fine. There is another
reference in elisp-mode.el, for which, AFAICT, we can just use
explicit require instead (see my patch in
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=24901#53; sorry I didn't
mention it before, I forgot some mail clients don't show attachments
clearly).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Thu, 17 Aug 2017 14:25:01 GMT) Full text and rfc822 format available.

Message #62 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 24901 <at> debbugs.gnu.org, rrt <at> sc3d.org, npostavs <at> users.sourceforge.net
Subject: Re: bug#24901: Caught mistake in elec-pair.el patch
Date: Thu, 17 Aug 2017 17:23:44 +0300
> From: João Távora <joaotavora <at> gmail.com>
> Date: Thu, 17 Aug 2017 14:32:08 +0100
> Cc: Reuben Thomas <rrt <at> sc3d.org>, 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
> 
> On Thu, Aug 17, 2017 at 1:35 PM, <npostavs <at> users.sourceforge.net> wrote:
> 
> > Or remove the autoload from electric-pair-text-pairs?
> 
> Seems to be there for a reason, unfortunately. It's forward 
> referenced in electric.el if I'm not mistaken.

I don't understand this: electric.el is preloaded, so why would it
need the autoload?

But in any case, if you do need the autoload, you can add an explicit
autoload form in electric.el.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Thu, 17 Aug 2017 15:37:02 GMT) Full text and rfc822 format available.

Message #65 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: joaotavora <at> gmail.com (João Távora)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 24901 <at> debbugs.gnu.org, rrt <at> sc3d.org, npostavs <at> users.sourceforge.net
Subject: Re: bug#24901: Caught mistake in elec-pair.el patch
Date: Thu, 17 Aug 2017 16:36:19 +0100
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: João Távora <joaotavora <at> gmail.com>
>> Date: Thu, 17 Aug 2017 14:32:08 +0100
>> Cc: Reuben Thomas <rrt <at> sc3d.org>, 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
>> 
>> On Thu, Aug 17, 2017 at 1:35 PM, <npostavs <at> users.sourceforge.net> wrote:
>> 
>> > Or remove the autoload from electric-pair-text-pairs?
>> 
>> Seems to be there for a reason, unfortunately. It's forward 
>> referenced in electric.el if I'm not mistaken.
>
> I don't understand this: electric.el is preloaded, so why would it
> need the autoload?

I don't know, I admit I'm very confused by the autoload logic, so you
lost me at preloaded.  Also have been away from Elisp for almost a year.

If I remove the autoload I get compilation errors in electric.elc or
align.elc (from make bootstrap). I might be doing something wrong. How
can I test the autoload dependecies without a full make bootstrap?

And then there's the problem Noam mentioned in elisp-mode.el.

But Noam's patch apparently fixes that, so here's his patch and mine for
a quick review from either of you if you don't mind. Tested with 'make
bootstrap'.

Thanks,
João

[0001-lisp-elec-pair.el-electric-pair-text-pairs-Don-t-aut.patch (text/x-diff, inline)]
From 3e5a166cb7e5b575252c5c69c2678d2074d58c12 Mon Sep 17 00:00:00 2001
From: Noam Postavsky <npostavs <at> gmail.com>
Date: Thu, 17 Aug 2017 07:06:47 -0400
Subject: [PATCH 1/2] * lisp/elec-pair.el (electric-pair-text-pairs): Don't
 autoload (Bug#24901).

* lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Require `elec-pair'
explicitly in the interactive case.
---
 lisp/elec-pair.el            | 1 -
 lisp/progmodes/elisp-mode.el | 9 ++++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el
index 87e82e24fb..f990851185 100644
--- a/lisp/elec-pair.el
+++ b/lisp/elec-pair.el
@@ -42,7 +42,6 @@ electric-pair-pairs
   :group 'electricity
   :type '(repeat (cons character character)))
 
-;;;###autoload
 (defcustom electric-pair-text-pairs
   '((?\" . ?\" )
     ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars))
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 47739f5957..0bf8857960 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -231,9 +231,12 @@ emacs-lisp-mode
   (defvar project-vc-external-roots-function)
   (lisp-mode-variables nil nil 'elisp)
   (add-hook 'after-load-functions #'elisp--font-lock-flush-elisp-buffers)
-  (setq-local electric-pair-text-pairs
-              (append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs))
-  (setq-local electric-quote-string t)
+  (unless noninteractive
+    (require 'elec-pair)
+    (defvar electric-pair-text-pairs)
+    (setq-local electric-pair-text-pairs
+                (append '((?\` . ?\') (?‘ . ?’)) electric-pair-text-pairs))
+    (setq-local electric-quote-string t))
   (setq imenu-case-fold-search nil)
   (add-function :before-until (local 'eldoc-documentation-function)
                 #'elisp-eldoc-documentation-function)
-- 
2.11.0

[0002-Fix-default-value-of-electric-pair-pairs-and-electri.patch (text/x-diff, inline)]
From a96f9ed05edfe619f7bc4edf5485c937e3df4d1b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= <joaotavora <at> gmail.com>
Date: Thu, 17 Aug 2017 10:44:38 +0100
Subject: [PATCH 2/2] Fix default value of electric-pair-pairs and
 electric-pair-text-pairs

Fixes: debbugs:24901

A previous change, titled "Add support for curly quotation marks to
electric-pair-mode", attempted to add these characters to the default
value of these variables.  But it did so in a quoted list, preventing
evaluation of the relevant expressions and resulting in an invalid
format.

* lisp/elec-pair.el (electric-pair-pairs): Use backquote and comma.
(electric-pair-text-pairs): Use backquote and comma.
---
 lisp/elec-pair.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/elec-pair.el b/lisp/elec-pair.el
index f990851185..236f5f1283 100644
--- a/lisp/elec-pair.el
+++ b/lisp/elec-pair.el
@@ -28,9 +28,9 @@
 ;;; Electric pairing.
 
 (defcustom electric-pair-pairs
-  '((?\" . ?\")
-    ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars))
-    ((nth 2 electric-quote-chars) . (nth 3 electric-quote-chars)))
+  `((?\" . ?\")
+    (,(nth 0 electric-quote-chars) . ,(nth 1 electric-quote-chars))
+    (,(nth 2 electric-quote-chars) . ,(nth 3 electric-quote-chars)))
   "Alist of pairs that should be used regardless of major mode.
 
 Pairs of delimiters in this list are a fallback in case they have
@@ -43,9 +43,9 @@ electric-pair-pairs
   :type '(repeat (cons character character)))
 
 (defcustom electric-pair-text-pairs
-  '((?\" . ?\" )
-    ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars))
-    ((nth 2 electric-quote-chars) . (nth 3 electric-quote-chars)))
+  `((?\" . ?\" )
+    (,(nth 0 electric-quote-chars) . ,(nth 1 electric-quote-chars))
+    (,(nth 2 electric-quote-chars) . ,(nth 3 electric-quote-chars)))
   "Alist of pairs that should always be used in comments and strings.
 
 Pairs of delimiters in this list are a fallback in case they have
-- 
2.11.0


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Thu, 17 Aug 2017 15:50:02 GMT) Full text and rfc822 format available.

Message #68 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: João Távora <joaotavora <at> gmail.com>
Cc: 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Reuben Thomas <rrt <at> sc3d.org>
Subject: Re: bug#24901: Caught mistake in elec-pair.el patch
Date: Thu, 17 Aug 2017 11:49:12 -0400
On Thu, Aug 17, 2017 at 11:36 AM, João Távora <joaotavora <at> gmail.com> wrote:
> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>>> Seems to be there for a reason, unfortunately. It's forward
>>> referenced in electric.el if I'm not mistaken.
>>
>> I don't understand this: electric.el is preloaded, so why would it
>> need the autoload?

I think you have the direction backwards: electric.el uses the
autoloaded variable *from* elec-pair.el.

> I don't know, I admit I'm very confused by the autoload logic, so you
> lost me at preloaded.  Also have been away from Elisp for almost a year.
>
> If I remove the autoload I get compilation errors in electric.elc or
> align.elc (from make bootstrap). I might be doing something wrong. How
> can I test the autoload dependecies without a full make bootstrap?

As far as I know, the only way to be sure of testing all dependencies
is deleting all elc files, i.e., a full bootstrap minus the C
compilation (using ccache can help automate the "minus the C
compilation" part).

> And then there's the problem Noam mentioned in elisp-mode.el.

The elisp-mode.el problem is what causes the align.elc failure: the
byte compiler uses elisp-mode.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Thu, 17 Aug 2017 16:58:01 GMT) Full text and rfc822 format available.

Message #71 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: joaotavora <at> gmail.com (João Távora)
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Reuben Thomas <rrt <at> sc3d.org>
Subject: Re: bug#24901: Caught mistake in elec-pair.el patch
Date: Thu, 17 Aug 2017 17:57:19 +0100
Noam Postavsky <npostavs <at> users.sourceforge.net> writes:

> On Thu, Aug 17, 2017 at 11:36 AM, João Távora <joaotavora <at> gmail.com> wrote:
>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>
>>>> Seems to be there for a reason, unfortunately. It's forward
>>>> referenced in electric.el if I'm not mistaken.
>>>
>>> I don't understand this: electric.el is preloaded, so why would it
>>> need the autoload?
>
> I think you have the direction backwards: electric.el uses the
> autoloaded variable *from* elec-pair.el.

You mean Eli has the direction backwards. I don't have a clue :-)

> As far as I know, the only way to be sure of testing all dependencies
> is deleting all elc files, i.e., a full bootstrap minus the C
> compilation (using ccache can help automate the "minus the C
> compilation" part).

So is 'find . -iname "*.elc" | xargs rm -f' enough? What's ccache?

>> And then there's the problem Noam mentioned in elisp-mode.el.
>
> The elisp-mode.el problem is what causes the align.elc failure: the
> byte compiler uses elisp-mode.

Does this mean you sign off on both patches?

João





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Fri, 18 Aug 2017 01:50:02 GMT) Full text and rfc822 format available.

Message #74 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: npostavs <at> users.sourceforge.net
To: joaotavora <at> gmail.com (João Távora)
Cc: 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, rrt <at> sc3d.org
Subject: Re: bug#24901: Caught mistake in elec-pair.el patch
Date: Thu, 17 Aug 2017 21:51:30 -0400
joaotavora <at> gmail.com (João Távora) writes:

>> As far as I know, the only way to be sure of testing all dependencies
>> is deleting all elc files, i.e., a full bootstrap minus the C
>> compilation (using ccache can help automate the "minus the C
>> compilation" part).
>
> So is 'find . -iname "*.elc" | xargs rm -f' enough?

Actually, now that I think of it, 'rm lisp/loaddefs.el' might be needed
too.

> What's ccache?

https://ccache.samba.org/

    ccache is a compiler cache. It speeds up recompilation by caching
    previous compilations and detecting when the same compilation is being
    done again. Supported languages are C, C++, Objective-C and
    Objective-C++.

So you can ./configure CC='ccache gcc' and then if you do 'make
bootstrap' the C compilation goes by very quickly after the first time.
The lisp compilation still takes a long time, but caching the C part at
least makes it less painful to use an -O2 optimized build which compiles
lisp a bit faster.

>> The elisp-mode.el problem is what causes the align.elc failure: the
>> byte compiler uses elisp-mode.
>
> Does this mean you sign off on both patches?

Yes, I think they're good (I have just a couple of format trivia
nitpicks, below).  I'm under the impression that I'm more tolerant of
explicit `require' than the average Emacser though.

> * lisp/elec-pair.el (electric-pair-pairs): Use backquote and comma.
> (electric-pair-text-pairs): Use backquote and comma.

This could be

    * lisp/elec-pair.el (electric-pair-pairs, electric-pair-text-pairs): Use
    backquote and comma.

>  (defcustom electric-pair-text-pairs
> -  '((?\" . ?\" )
> -    ((nth 0 electric-quote-chars) . (nth 1 electric-quote-chars))
> -    ((nth 2 electric-quote-chars) . (nth 3 electric-quote-chars)))
> +  `((?\" . ?\" )

Can we get rid of that space before the closing paren while we're here?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Fri, 18 Aug 2017 19:22:01 GMT) Full text and rfc822 format available.

Message #77 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 João Távora <joaotavora <at> gmail.com>
Subject: Re: bug#24901: Caught mistake in elec-pair.el patch
Date: Fri, 18 Aug 2017 20:21:29 +0100
(Thanks, everyone, for dealing with this!)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Fri, 18 Aug 2017 22:47:02 GMT) Full text and rfc822 format available.

Message #80 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: joaotavora <at> gmail.com (João Távora)
To: npostavs <at> users.sourceforge.net
Cc: 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>, rrt <at> sc3d.org
Subject: Re: bug#24901: Caught mistake in elec-pair.el patch
Date: Fri, 18 Aug 2017 23:46:49 +0100
npostavs <at> users.sourceforge.net writes:

> Yes, I think they're good (I have just a couple of format trivia
> nitpicks, below).

Thanks. Done, with nitpicks fixed.

Shall I archive the bug again or wait until someone does that
automatically?

João






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24901; Package emacs. (Sat, 19 Aug 2017 00:42:02 GMT) Full text and rfc822 format available.

Message #83 received at 24901 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: João Távora <joaotavora <at> gmail.com>
Cc: 24901 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Reuben Thomas <rrt <at> sc3d.org>
Subject: Re: bug#24901: Caught mistake in elec-pair.el patch
Date: Fri, 18 Aug 2017 20:41:04 -0400
On Fri, Aug 18, 2017 at 6:46 PM, João Távora <joaotavora <at> gmail.com> wrote:

> Shall I archive the bug again or wait until someone does that
> automatically?

The bug is still closed, so it will archive automatically 30 days
after the last response, no need for anything else I think.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 16 Sep 2017 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 7 years and 279 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.