all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Reminder: `set-auto-mode' adjustments
@ 2007-03-01  0:44 Stuart D. Herring
  2007-03-01 17:06 ` Chong Yidong
  0 siblings, 1 reply; 2+ messages in thread
From: Stuart D. Herring @ 2007-03-01  0:44 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

The patch mentioned and approved here and here:

http://lists.gnu.org/archive/html/emacs-devel/2006-05/msg00489.html [me]
http://lists.gnu.org/archive/html/emacs-devel/2006-05/msg00565.html [RMS]

has never been applied, AFAICS.  I've reattached it (the exact same file)
for convenience; install, please?

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

[-- Attachment #2: mode-reapply.patch --]
[-- Type: application/octet-stream, Size: 1861 bytes --]

Index: files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.831
diff -c -r1.831 files.el
*** files.el	9 May 2006 22:55:30 -0000	1.831
--- files.el	10 May 2006 18:10:15 -0000
***************
*** 2192,2203 ****
  If optional arg KEEP-MODE-IF-SAME is non-nil, MODE is chased of
  any aliases and compared to current major mode.  If they are the
  same, do nothing and return nil."
!   (when keep-mode-if-same
!     (while (symbolp (symbol-function mode))
!       (setq mode (symbol-function mode)))
!     (if (eq mode major-mode)
! 	(setq mode nil)))
!   (when mode
      (funcall mode)
      mode))
  
--- 2192,2199 ----
  If optional arg KEEP-MODE-IF-SAME is non-nil, MODE is chased of
  any aliases and compared to current major mode.  If they are the
  same, do nothing and return nil."
!   (unless (and keep-mode-if-same
! 	       (eq (indirect-function mode) (indirect-function major-mode)))
      (funcall mode)
      mode))
  
***************
*** 2722,2731 ****
  		      ok)))))))
  
  (defun hack-one-local-variable (var val)
!   "Set local variable VAR with value VAL."
    (cond ((eq var 'mode)
! 	 (funcall (intern (concat (downcase (symbol-name val))
! 				  "-mode"))))
  	((eq var 'eval)
  	 (save-excursion (eval val)))
  	(t (make-local-variable var)
--- 2733,2745 ----
  		      ok)))))))
  
  (defun hack-one-local-variable (var val)
!   "Set local variable VAR with value VAL.
! If VAR is `mode', call `VAL-mode' as a
! function unless it's already the major mode."
    (cond ((eq var 'mode)
! 	 (let ((mode (intern (concat (downcase (symbol-name val)) "-mode"))))
! 	   (unless (eq (indirect-function mode) (indirect-function major-mode))
! 	     (funcall mode))))
  	((eq var 'eval)
  	 (save-excursion (eval val)))
  	(t (make-local-variable var)

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-01 17:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-01  0:44 Reminder: `set-auto-mode' adjustments Stuart D. Herring
2007-03-01 17:06 ` Chong Yidong

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.