summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/lisp-mode.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/lisp-mode.el')
-rw-r--r--lisp/emacs-lisp/lisp-mode.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el
index 972fe6bafc8..8469aec1362 100644
--- a/lisp/emacs-lisp/lisp-mode.el
+++ b/lisp/emacs-lisp/lisp-mode.el
@@ -20,8 +20,8 @@
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
;;; Commentary:
@@ -172,6 +172,10 @@
(setq paragraph-ignore-fill-prefix t)
(make-local-variable 'fill-paragraph-function)
(setq fill-paragraph-function 'lisp-fill-paragraph)
+ ;; Adaptive fill mode gets the fill wrong for a one-line paragraph made of
+ ;; a single docstring. Let's fix it here.
+ (set (make-local-variable 'adaptive-fill-function)
+ (lambda () (if (looking-at "\\s-+\"[^\n\"]+\"\\s-*$") "")))
;; Adaptive fill mode gets in the way of auto-fill,
;; and should make no difference for explicit fill
;; because lisp-fill-paragraph should do the job.
@@ -631,10 +635,10 @@ Reinitialize the face according to the `defface' specification."
;; Resetting `saved-face' temporarily to nil is needed to let
;; `defface' change the spec, regardless of a saved spec.
(prog1 `(prog1 ,form
- (put ',(eval (nth 1 form)) 'saved-face
+ (put ,(nth 1 form) 'saved-face
',(get (eval (nth 1 form)) 'saved-face))
- (put ',(eval (nth 1 form)) 'customized-face
- ',(eval (nth 2 form))))
+ (put ,(nth 1 form) 'customized-face
+ ,(nth 2 form)))
(put (eval (nth 1 form)) 'saved-face nil)))
((eq (car form) 'progn)
(cons 'progn (mapcar 'eval-defun-1 (cdr form))))