mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	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.
			
			
This commit is contained in:
		
							parent
							
								
									29a90f0a7a
								
							
						
					
					
						commit
						0494955b8f
					
				
					 1 changed files with 6 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -524,6 +524,7 @@ Currently-active file is at the head of the list.")
 | 
			
		|||
  (define-key py-mode-map "\C-c\C-u"  'py-goto-block-up)
 | 
			
		||||
  (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)
 | 
			
		||||
  (define-key py-mode-map "\e\C-e"    'py-end-of-def-or-class)
 | 
			
		||||
| 
						 | 
				
			
			@ -2687,10 +2688,13 @@ A `nomenclature' is a fancy way of saying AWordWithMixedCaseNotUnderscores."
 | 
			
		|||
        (setq cmd (concat "import " base "\n")))
 | 
			
		||||
    (setq cmd (concat "import pydoc\n"
 | 
			
		||||
                      cmd
 | 
			
		||||
		      "try: pydoc.help(" sym ")\n"
 | 
			
		||||
		      "try: pydoc.help('" sym "')\n"
 | 
			
		||||
		      "except: print 'No help available on:', \"" sym "\""))
 | 
			
		||||
    (message cmd)
 | 
			
		||||
    (py-execute-string cmd)))
 | 
			
		||||
    (py-execute-string cmd)
 | 
			
		||||
    (set-buffer "*Python Output*")
 | 
			
		||||
    ;; BAW: Should we really be leaving the output buffer in help-mode?
 | 
			
		||||
    (help-mode)))
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue