comparison lisp/emacs-lisp/lisp-mode.el @ 90200:f9a65d7ebd29

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-68 Merge from emacs--cvs-trunk--0 Patches applied: * emacs--cvs-trunk--0 (patch 459-473) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 86-87) - Update from CVS
author Miles Bader <miles@gnu.org>
date Thu, 07 Jul 2005 12:43:14 +0000
parents bb71c6cf2009 6b665a797211
children 187d6a1f84f7
comparison
equal deleted inserted replaced
90199:bb71c6cf2009 90200:f9a65d7ebd29
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details. 19 ;; GNU General Public License for more details.
20 20
21 ;; You should have received a copy of the GNU General Public License 21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the 22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 23 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
24 ;; Boston, MA 02111-1307, USA. 24 ;; Boston, MA 02110-1301, USA.
25 25
26 ;;; Commentary: 26 ;;; Commentary:
27 27
28 ;; The base major mode for editing Lisp code (used also for Emacs Lisp). 28 ;; The base major mode for editing Lisp code (used also for Emacs Lisp).
29 ;; This mode is documented in the Emacs manual. 29 ;; This mode is documented in the Emacs manual.
170 (setq local-abbrev-table lisp-mode-abbrev-table) 170 (setq local-abbrev-table lisp-mode-abbrev-table)
171 (make-local-variable 'paragraph-ignore-fill-prefix) 171 (make-local-variable 'paragraph-ignore-fill-prefix)
172 (setq paragraph-ignore-fill-prefix t) 172 (setq paragraph-ignore-fill-prefix t)
173 (make-local-variable 'fill-paragraph-function) 173 (make-local-variable 'fill-paragraph-function)
174 (setq fill-paragraph-function 'lisp-fill-paragraph) 174 (setq fill-paragraph-function 'lisp-fill-paragraph)
175 ;; Adaptive fill mode gets the fill wrong for a one-line paragraph made of
176 ;; a single docstring. Let's fix it here.
177 (set (make-local-variable 'adaptive-fill-function)
178 (lambda () (if (looking-at "\\s-+\"[^\n\"]+\"\\s-*$") "")))
175 ;; Adaptive fill mode gets in the way of auto-fill, 179 ;; Adaptive fill mode gets in the way of auto-fill,
176 ;; and should make no difference for explicit fill 180 ;; and should make no difference for explicit fill
177 ;; because lisp-fill-paragraph should do the job. 181 ;; because lisp-fill-paragraph should do the job.
178 ;; I believe that newcomment's auto-fill code properly deals with it -stef 182 ;; I believe that newcomment's auto-fill code properly deals with it -stef
179 ;;(set (make-local-variable 'adaptive-fill-mode) nil) 183 ;;(set (make-local-variable 'adaptive-fill-mode) nil)
629 ;; buffer, thus allowing `face-user-default-spec' to use the 633 ;; buffer, thus allowing `face-user-default-spec' to use the
630 ;; new customized spec instead of the saved spec. 634 ;; new customized spec instead of the saved spec.
631 ;; Resetting `saved-face' temporarily to nil is needed to let 635 ;; Resetting `saved-face' temporarily to nil is needed to let
632 ;; `defface' change the spec, regardless of a saved spec. 636 ;; `defface' change the spec, regardless of a saved spec.
633 (prog1 `(prog1 ,form 637 (prog1 `(prog1 ,form
634 (put ',(eval (nth 1 form)) 'saved-face 638 (put ,(nth 1 form) 'saved-face
635 ',(get (eval (nth 1 form)) 'saved-face)) 639 ',(get (eval (nth 1 form)) 'saved-face))
636 (put ',(eval (nth 1 form)) 'customized-face 640 (put ,(nth 1 form) 'customized-face
637 ',(eval (nth 2 form)))) 641 ,(nth 2 form)))
638 (put (eval (nth 1 form)) 'saved-face nil))) 642 (put (eval (nth 1 form)) 'saved-face nil)))
639 ((eq (car form) 'progn) 643 ((eq (car form) 'progn)
640 (cons 'progn (mapcar 'eval-defun-1 (cdr form)))) 644 (cons 'progn (mapcar 'eval-defun-1 (cdr form))))
641 (t form))) 645 (t form)))
642 646