Skip to content

Commit

Permalink
Remove bugfix for imenu in Emacs 24.3 and below
Browse files Browse the repository at this point in the history
This is no longer necessary, since we are dropping support for Emacs
24.3

Relates to: #26
  • Loading branch information
vedang committed Oct 10, 2022
1 parent 365d2d8 commit 5563ac9
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions lisp/pdf-outline.el
Original file line number Diff line number Diff line change
Expand Up @@ -572,23 +572,6 @@ not call `imenu-sort-function'."
(cons title
(nconc (nreverse keep-at-top) menulist))))

;; bugfix for imenu in Emacs 24.3 and below.
(when (condition-case nil
(progn (imenu--truncate-items '(("" 0))) nil)
(error t))
(eval-after-load "imenu"
'(defun imenu--truncate-items (menulist)
"Truncate all strings in MENULIST to `imenu-max-item-length'."
(mapc (lambda (item)
;; Truncate if necessary.
(when (and (numberp imenu-max-item-length)
(> (length (car item)) imenu-max-item-length))
(setcar item (substring (car item) 0 imenu-max-item-length)))
(when (imenu--subalist-p item)
(imenu--truncate-items (cdr item))))
menulist))))



(provide 'pdf-outline)

Expand Down

0 comments on commit 5563ac9

Please sign in to comment.