From 189638d565a4c0e21ff19e8e9867d20063bf53f6 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Wed, 7 Mar 2001 15:21:35 +0000 Subject: [PATCH] (custom-save-delete): Move in front of local variables, otherwise long Custom entries would make them ineffective. --- lisp/ChangeLog | 4 ++++ lisp/cus-edit.el | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 24b6ec8bb57..8fde27aaa79 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,9 @@ 2001-03-07 Gerd Moellmann + * cus-edit.el (custom-save-delete): Move in front of local + variables, otherwise long Custom entries would make them + ineffective. + * uniquify.el: Set maintainer to FSF. 2001-03-07 Eli Zaretskii diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 052b4ca2dee..6f0ca3a591b 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1,6 +1,6 @@ ;;; cus-edit.el --- Tools for customizing Emacs and Lisp packages. ;; -;; Copyright (C) 1996, 1997, 1999, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen ;; Keywords: help, faces @@ -3480,7 +3480,17 @@ or (if there were none) at the end of the buffer." (setq first (point))))))) (if first (goto-char first) - (goto-char (point-max))))) + ;; Move in front of local variables, otherwise long Custom + ;; entries would make them ineffective. + (let ((pos (point-max)) + (case-fold-search t)) + (save-excursion + (goto-char (point-max)) + (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) + 'move) + (when (search-forward "Local Variables:" nil t) + (setq pos (line-beginning-position)))) + (goto-char pos))))) (defun custom-save-variables () "Save all customized variables in `custom-file'." -- 2.39.5