[Python-checkins] python/dist/src/Misc python-mode.el,4.12,4.13

bwarsaw@sourceforge.net bwarsaw@sourceforge.net
Mon, 22 Apr 2002 15:05:54 -0700


Update of /cvsroot/python/python/dist/src/Misc
In directory usw-pr-cvs1:/tmp/cvs-serv2206

Modified Files:
	python-mode.el 
Log Message:
Merge in Skip's last few updates w.r.t. py-help-at-point:

(py-mode-map): Bind py-help-at-point to f1 as well as C-c C-h

(py-help-at-point): Make sure the symbol is quoted so things like
pydoc.help('sys.platform') work correctly.  Also, leave the *Python
Output* buffer in help-mode; this may be a bit more controversial.


Index: python-mode.el
===================================================================
RCS file: /cvsroot/python/python/dist/src/Misc/python-mode.el,v
retrieving revision 4.12
retrieving revision 4.13
diff -C2 -d -r4.12 -r4.13
*** python-mode.el	22 Apr 2002 21:48:20 -0000	4.12
--- python-mode.el	22 Apr 2002 22:05:49 -0000	4.13
***************
*** 525,528 ****
--- 525,529 ----
    (define-key py-mode-map "\C-c#"     'py-comment-region)
    (define-key py-mode-map "\C-c?"     'py-describe-mode)
+   (define-key py-mode-map [f1]        'py-help-at-point)
    (define-key py-mode-map "\C-c\C-h"  'py-help-at-point)
    (define-key py-mode-map "\e\C-a"    'py-beginning-of-def-or-class)
***************
*** 2688,2695 ****
      (setq cmd (concat "import pydoc\n"
                        cmd
! 		      "try: pydoc.help(" sym ")\n"
  		      "except: print 'No help available on:', \"" sym "\""))
      (message cmd)
!     (py-execute-string cmd)))
  
  
--- 2689,2699 ----
      (setq cmd (concat "import pydoc\n"
                        cmd
! 		      "try: pydoc.help('" sym "')\n"
  		      "except: print 'No help available on:', \"" sym "\""))
      (message cmd)
!     (py-execute-string cmd)
!     (set-buffer "*Python Output*")
!     ;; BAW: Should we really be leaving the output buffer in help-mode?
!     (help-mode)))