equal
deleted
inserted
replaced
355 |
355 |
356 (defun gadict-copy-pronunciation (&optional headword) |
356 (defun gadict-copy-pronunciation (&optional headword) |
357 "Copy existing pronunciation of selected region or current word to `kill-ring'." |
357 "Copy existing pronunciation of selected region or current word to `kill-ring'." |
358 (interactive |
358 (interactive |
359 (list (if (use-region-p) |
359 (list (if (use-region-p) |
360 (buffer-substring region-beginning region-end) |
360 (buffer-substring (region-beginning) (region-end)) |
361 (thing-at-point 'word)))) |
361 (thing-at-point 'word)))) |
362 (save-excursion |
362 (save-excursion |
363 (gadict-search-floor headword) |
363 (gadict-search-floor headword) |
364 (when (search-forward-regexp "\\[\\([^]]+\\)]") |
364 (when (search-forward-regexp "\\[\\([^]]+\\)]") |
365 (kill-new (match-string 1))))) |
365 (kill-new (match-string 1))))) |