comparison yatexhlp.el @ 546:071cd0ab1c71 dev

Optional second arg. for YaTeX-help suppress ask of new entry creation
author HIROSE Yuuji <yuuji@gentei.org>
date Sat, 02 Jun 2018 16:47:26 +0900
parents c0827f80b18e
children
comparison
equal deleted inserted replaced
545:ea6956f10ce7 546:071cd0ab1c71
1 ;;; yatexhlp.el --- YaTeX helper for LaTeX -*- coding: sjis -*- 1 ;;; yatexhlp.el --- YaTeX helper for LaTeX -*- coding: sjis -*-
2 ;;; 2 ;;;
3 ;;; (c)1994,1998,2004,2014,2015 by HIROSE Yuuji.[yuuji@yatex.org] 3 ;;; (c)1994,1998,2004,2014,2015,2018 by HIROSE Yuuji.[yuuji@yatex.org]
4 ;;; Last modified Sun Sep 17 10:23:19 2017 on firestorm 4 ;;; Last modified Sat Jun 2 16:45:45 2018 on firestorm
5 ;;; $Id$ 5 ;;; $Id$
6 6
7 ;;; Code: 7 ;;; Code:
8 (let ((help-file (concat "YATEXHLP." 8 (let ((help-file (concat "YATEXHLP."
9 (cond (YaTeX-japan "jp") 9 (cond (YaTeX-japan "jp")
300 (or (YaTeX-apropos-file key YaTeX-help-file) 300 (or (YaTeX-apropos-file key YaTeX-help-file)
301 (YaTeX-apropos-file key YaTeX-help-file-private t) 301 (YaTeX-apropos-file key YaTeX-help-file-private t)
302 (message "No matches found."))) 302 (message "No matches found.")))
303 303
304 ;;;###autoload 304 ;;;###autoload
305 (defun YaTeX-help (&optional macro) 305 (defun YaTeX-help (&optional macro ref-only)
306 "Show help buffer of LaTeX/TeX commands or macros. 306 "Show help buffer of LaTeX/TeX commands or macros.
307 Optional argument MACRO, if supplied, is directly selected to keyword." 307 Optional argument MACRO, if supplied, is directly selected to keyword.
308 Non-nil for optional second argument REF-ONLY inhibits call enrich-help
309 for non-interactive use."
308 (interactive) 310 (interactive)
309 (let (p beg end command) 311 (let (p beg end command)
310 (save-excursion 312 (save-excursion
311 (if (looking-at YaTeX-ec-regexp) 313 (if (looking-at YaTeX-ec-regexp)
312 (goto-char (match-end 0))) 314 (goto-char (match-end 0)))
339 YaTeX-help-entries nil nil command))));end excursion 341 YaTeX-help-entries nil nil command))));end excursion
340 342
341 (setq YaTeX-help-saved-config (current-window-configuration)) 343 (setq YaTeX-help-saved-config (current-window-configuration))
342 (or (YaTeX-refer-help command YaTeX-help-file) 344 (or (YaTeX-refer-help command YaTeX-help-file)
343 (YaTeX-refer-help command YaTeX-help-file-private) 345 (YaTeX-refer-help command YaTeX-help-file-private)
346 ref-only
344 (YaTeX-enrich-help command)))) 347 (YaTeX-enrich-help command))))

yatex.org