diff options
author | Alan Mackenzie <acm@muc.de> | 2022-01-11 21:57:54 +0000 |
---|---|---|
committer | Alan Mackenzie <acm@muc.de> | 2022-01-11 21:57:54 +0000 |
commit | 2128cd8c08da84ab40608ac5db0fecfce733cfad (patch) | |
tree | e295275b1a99aed2e5e0cc270f91614062c670f6 /lisp/emacs-lisp/pp.el | |
parent | 4e77177b063f9da8a48709aa3ef416d0ac21837b (diff) | |
parent | 18dac472553e6cd1102b644c2175012e12215c18 (diff) | |
download | emacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.tar.gz emacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.tar.bz2 emacs-2128cd8c08da84ab40608ac5db0fecfce733cfad.zip |
Merge branch 'master' into scratch/correct-warning-pos
Diffstat (limited to 'lisp/emacs-lisp/pp.el')
-rw-r--r-- | lisp/emacs-lisp/pp.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/emacs-lisp/pp.el b/lisp/emacs-lisp/pp.el index 8464b5a5198..d199716b2c5 100644 --- a/lisp/emacs-lisp/pp.el +++ b/lisp/emacs-lisp/pp.el @@ -1,6 +1,6 @@ ;;; pp.el --- pretty printer for Emacs Lisp -*- lexical-binding: t -*- -;; Copyright (C) 1989, 1993, 2001-2021 Free Software Foundation, Inc. +;; Copyright (C) 1989, 1993, 2001-2022 Free Software Foundation, Inc. ;; Author: Randal Schwartz <merlyn@stonehenge.com> ;; Keywords: lisp @@ -24,6 +24,7 @@ ;;; Code: +(require 'cl-lib) (defvar font-lock-verbose) (defgroup pp nil @@ -233,13 +234,14 @@ Use the `pp-max-width' variable to control the desired line length." (cons (cond ((consp (cdr sexp)) (if (and (length= sexp 2) - (eq (car sexp) 'quote)) + (memq (car sexp) '(quote function))) (cond ((symbolp (cadr sexp)) (let ((print-quoted t)) (prin1 sexp (current-buffer)))) ((consp (cadr sexp)) - (insert "'") + (insert (if (eq (car sexp) 'quote) + "'" "#'")) (pp--format-list (cadr sexp) (set-marker (make-marker) (1- (point)))))) (pp--format-list sexp))) |